Namespace: api

plco.api

Sub-module grouping API methods.

Properties:
Name Type Description
download function

plco.api.download

metadata function

plco.api.metadata

participants function

plco.api.participants

pca function

plco.api.pca

phenotypes function

plco.api.phenotypes

points function

plco.api.points

summary function

plco.api.summary

variants function

plco.api.variants

ping function

plco.api.ping

Source:

Methods

(static) download(parms, phenotype_idopt, get_link_onlyopt)

Downloads the original association results in tsv.gz format.

Parameters:
Name Type Attributes Default Description
parms object | string | Array.<Array>

A JSON object, query string, or 2-d array containing the query parameters.

phenotype_id integer <optional>
3080

A numeric phenotype id.

get_link_only string <optional>

Optional. If set to 'true', returns the download link instead of redirecting automatically to the file.

Source:
Returns:

Results of the API call.

(static) metadata(parms, phenotype_idopt, sexopt, ancestryopt, rawopt)

Retrieves metadata for phenotypes specified

Parameters:
Name Type Attributes Default Description
parms object | string | Array.<Array>

A JSON object, query string, or 2-d array containing the query parameters.

phenotype_id number <optional>
3080

A phenotype id.

sex string <optional>
female

A sex, which may be "all", "female", or "male".

ancestry string <optional>
european

A character vector specifying ancestries to retrieve data for.

raw string <optional>

Optional. If true, returns data in an array of arrays instead of an array of objects.

Source:
Returns:

A dataframe containing phenotype metadata

Example
plco.api.metadata()
plco.api.metadata({ phenotype_id: 3080, sex: "female", ancestry: "european" })
plco.api.metadata("phenotype_id=3080&sex=female&ancestry=european")
plco.api.metadata([["phenotype_id",3080], ["sex","female"], ["ancestry","european"]])
plco.api.metadata({}, 3080, "female", "european")

(static) participants(parms, phenotype_idopt, columnsopt, precisionopt, rawopt)

Retrieves aggregate counts for participants. Aggregate counts under 10 are returned as "< 10".

Parameters:
Name Type Attributes Default Description
parms object | string | Array.<Array>

A JSON object, query string, or 2-d array containing the query parameters.

phenotype_id integer <optional>
2250

A numeric phenotype id.

columns string <optional>

Optional. A character vector specifying properties for which to retrieve counts for. Valid properties are: value, ancestry, genetic_ancestry, sex, and age.

precision integer <optional>

Optional. For continuous phenotypes, a numeric value specifying the -log10(precision) to which values should be rounded to.

raw string <optional>

Optional. If true, returns data in an array of arrays instead of an array of objects.

Source:
Returns:

Results of the API call.

(static) pca(parms, phenotype_idopt, platformopt, pc_xopt, pc_yopt, limitopt, rawopt)

Retrieve PCA coordinates for the specified phenotype and platform.

Parameters:
Name Type Attributes Default Description
parms object | string | Array.<Array>

A JSON object, query string, or 2-d array containing the query parameters.

phenotype_id integer <optional>
3080

A numeric phenotype id.

platform string <optional>
PLCO_GSA

A character vector specifying the platform to retrieve data for.

pc_x integer <optional>
1

A numeric value (1-20) specifying the x axis's principal component.

pc_y integer <optional>
2

A numeric value (1-20) specifying the y axis's principal component.

limit integer <optional>

Optional. A numeric value to limit the number of variants returned (used for pagination). Capped at 1 million.

raw string <optional>

Optional. If true, returns data in an array of arrays instead of an array of objects.

Source:
Returns:

A dataframe containing pca coordinates.

Example
plco.api.pca()
plco.api.pca({}, 3080, 'PLCO_GSA', 1, 1, 1000)
plco.api.pca({phenotype_id: 3080, platform: 'PLCO_GSA', pc_x: 1, pc_y: 1, limit: 1000 })
plco.api.pca("phenotype_id=3080&platform=PLCO_GSA&pc_x=1&pc_y=1&limit=1000")
plco.api.pca([["phenotype_id",3080], ["platform","PLCO_GSA"], ["pc_x",1], ["pc_y",1], ["limit",1000]])

(static) phenotypes(parms, qopt, rawopt)

Retrieves phenotypes

Parameters:
Name Type Attributes Description
parms object | string | Array.<Array>

A JSON object, query string, or 2-d array containing the query parameters.

q string <optional>

Optional. A query term

raw string <optional>

Optional. If true, returns data in an array of arrays instead of an array of objects.

Source:
Returns:

If query is specified, a list of phenotypes that contain the query term is returned. Otherwise, a tree of all phenotypes is returned.

Example
plco.api.phenotypes()
plco.api.phenotypes({ q: "first_ca125_level" })
plco.api.phenotypes("q=first_ca125_level")
plco.api.phenotypes([["q","first_ca125_level"]])
plco.api.phenotypes({}, "first_ca125_level")

(static) ping()

Returns the status of the PLCO API.

Source:

(static) points(parms, phenotype_idopt, sexopt, ancestryopt, rawopt)

Retrieves sampled variants suitable for visualizing a QQ plot for the specified phenotype, sex, and ancestry.

Parameters:
Name Type Attributes Default Description
parms object | string | Array.<Array>

A JSON object, query string, or 2-d array containing the query parameters.

phenotype_id integer <optional>
3080

A numeric phenotype id.

sex string <optional>
female

A character vector specifying a sex to retrieve data for.

ancestry string <optional>
european

A character vector specifying ancestries to retrieve data for.

raw string <optional>

Optional. If true, returns data in an array of arrays instead of an array of objects.

Source:
Returns:

A dataframe containing variants.

(static) summary(parms, phenotype_idopt, sexopt, ancestryopt, p_value_nlog_minopt, rawopt)

Retrieve variants for all chromosomes at a resolution of 400x800 bins across the whole genome and specified -log10(p) range

Parameters:
Name Type Attributes Default Description
parms object | string | Array.<Array>

A JSON object, query string, or 2-d array containing the query parameters.

phenotype_id number <optional>
3080

A phenotype id.

sex string <optional>
female

A sex, which may be "all", "female", or "male".

ancestry string <optional>
european

A character vector specifying ancestries to retrieve data for.

p_value_nlog_min number <optional>
4

A numeric value >= 0 specifying the minimum -log10(p) for variants.

raw string <optional>

Optional. If true, returns data in an array of arrays instead of an array of objects.

Source:
Returns:

A dataframe with aggregated variants.

Example
plco.api.summary()
plco.api.summary({ phenotype_id: 3080, sex: "female", ancestry: "european", p_value_nlog_min: 4 })
plco.api.summary("phenotype_id=3080&sex=female&ancestry=european&p_value_nlog_min=4")
plco.api.summary([["phenotype_id",3080], ["sex","female"], ["ancestry","european"], ["p_value_nlog_min",4]])
plco.api.summary({}, 3080, "female", "european", 4)

(static) variants(parms, phenotype_idopt, sexopt, ancestryopt, chromosomeopt, columnsopt, snpopt, positionopt, position_minopt, position_maxopt, p_value_nlog_minopt, p_value_nlog_maxopt, p_value_minopt, p_value_maxopt, orderByopt, orderopt, offsetopt, limitopt, rawopt)

Retrieve variants for specified phenotype, sex, ancestry, chromosome, and other optional fields.

Parameters:
Name Type Attributes Default Description
parms object | string | Array.<Array>

A JSON object, query string, or 2-d array containing the query parameters.

phenotype_id number <optional>
3080

Phenotype id(s)

sex string <optional>
female

A sex, which may be "all", "female", or "male".

ancestry string <optional>
european

An ancestry, which may be "african_american", "east_asian", or "european".

chromosome number <optional>
8

A chromosome number.

columns string <optional>

Optional Properties for each variant. Default: all properties.

snp string <optional>

Optional Snps.

position number <optional>

Optional The exact position of the variant within a chromosome.

position_min number <optional>

Optional The minimum chromosome position for variants.

position_max number <optional>

Optional The maximum chromosome position for variants.

p_value_nlog_min number <optional>

Optional The minimum -log10(p) of variants in the chromosome.

p_value_nlog_max number <optional>

Optional The maximum -log10(p) of variants in the chromosome.

p_value_min number <optional>

Optional The minimum p-value of variants in the chromosome.

p_value_max number <optional>

Optional The maximum p-value of variants in the chromosome.

orderBy string <optional>

Optional A property to order variants by. May be "id", "snp", "chromosome", "position", "p_value", or "p_value_nlog".

order string <optional>

Optional An order in which to sort variants. May be "asc" or "desc".

offset number <optional>

Optional The number of records by which to offset the variants (for pagination)

limit number <optional>

Optional The maximum number of variants to return (for pagination). Highest allowed value is 1 million.

raw string <optional>

Optional. If true, returns data in an array of arrays instead of an array of objects.

Source:
Returns:

A dataframe with variants.

Example
plco.api.variants()
plco.api.variants({ phenotype_id: 3080, sex: "female", ancestry: "european", chromosome: 8, limit: 10 })
plco.api.variants("phenotype_id=3080&sex=female&ancestry=european&chromosome=8&limit=10")
plco.api.variants([["phenotype_id",3080], ["sex","female"], ["ancestry","european"], ["chromosome",8], ["limit",10]])
plco.api.variants({}, 3080, "female", "european", 8)