get_data: Retrieve phenotype data or phenotype matrix data from the...

View source: R/get_data.R

get_dataR Documentation

Retrieve phenotype data or phenotype matrix data from the server.

Description

If input is phenotype matrix object then phenotypes need te have been added to the phenotype matrix object. Create it using get_phenotype_matrix and add to it using phemat_add_phenotype or phemat_add_phenotypes

Usage

get_data(pheno_obj, ...)

## S3 method for class 'phenotype'
get_data(pheno_obj, conn = NULL, ...)

## S3 method for class 'phenotype_matrix'
get_data(pheno_obj, conn = NULL, ...)

## S3 method for class 'playlist'
get_data(pheno_obj, missing_value = NULL, base = NULL, ...)

## S3 method for class 'phenotype_list'
get_data(pheno_obj, missing_value = NULL, base = NULL, ...)

## Default S3 method:
get_data(pheno_obj, conn, missing_value = NA, base = NULL, ...)

Arguments

pheno_obj

phenotype names, phenotype, phenotype matrix or phenotype playlist structure.

...

additional arguments

conn

platform connection structure, create it using platform_connect

missing_value

The string to substitute for a missing value in the data

base

Optional name of base set

Value

tibble from server

Methods (by class)

  • get_data(phenotype): Get phenotype data

  • get_data(phenotype_matrix): Get data for phenotypes in phenotype matrix

  • get_data(playlist): Get data phenotypes in phenotype playlist

  • get_data(phenotype_list): Get data phenotypes in phenotype list

  • get_data(default): Get data phenotype/s by phenotype names

Examples

## Not run: 
api_key <- Sys.getenv("GOR_API_KEY")
project <- Sys.getenv("GOR_PROJECT")
conn <- platform_connect(api_key, project)
phenotype_mat <- get_phenotype_matrix()
phenotype_mat <-  phemat_add_phenotypes(...)
phenotype_data <- get_data(phenotype_mat, conn)

## End(Not run)

wuxi-nextcode/gorr documentation built on Jan. 1, 2023, 7:54 a.m.