create_phenotype: Create a new phenotype in the current project.

create_phenotypeR Documentation

Create a new phenotype in the current project.

Description

Create a new phenotype in the current project.

Usage

create_phenotype(
  name,
  result_type,
  conn,
  description = NULL,
  url = NULL,
  category = NULL,
  query = NULL,
  tags = NULL,
  data = NULL
)

Arguments

name

Unique (lowercase) phenotype name in the project

result_type

Type of phenotype (supported types: "SET", "QT" and "CATEGORY")

conn

gor connection structure, create it using platform_connect

description

Optional Phenotype description

url

Reference URL for the phenotype (to dataset or other reference)

category

Enter the category for the phenotype (must be defined in the project - see get_categories) (optional)

query

NOR query that defines this phenotype (optional)

tags

comma separated string of tags eg. "height,weight" or character vector "c("height", "weight") (optional)

data

data.frame or list of phenotype PN values to be applied to phenotype_upload_data (optional)

Value

a list with the phenotype object

Examples

## Not run: 
api_key <- Sys.getenv("GOR_API_KEY")
project <- Sys.getenv("GOR_PROJECT")
conn <- platform_connect(api_key, project)
name <- "height"
result_type <- "QT"
description <- "Height of individuals"
phenotype <- create_phenotype(name, result_type, conn, description)

## End(Not run)

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