View source: R/linkage_disequilibrium.R
get_ld_variants_by_by_window | R Documentation |
Gets linkage disequilibrium data for variants from Ensembl REST API. There are four ways to query, either by:
get_ld_variants_by_window(variant_id, genomic_window_size,
...)
get_ld_variants_by_pair(variant_id1,
variant_id2, ...)
get_ld_variants_by_range(genomic_range, ...)
get_ld_variants_by_pair_combn(variant_id,
...)
get_ld_variants_by_window(
variant_id,
genomic_window_size = 500L,
species_name = "homo_sapiens",
population = "1000GENOMES:phase_3:CEU",
d_prime = 0,
r_squared = 0.05,
verbose = FALSE,
warnings = TRUE,
progress_bar = TRUE
)
get_ld_variants_by_pair(
variant_id1,
variant_id2,
species_name = "homo_sapiens",
population = "1000GENOMES:phase_3:CEU",
d_prime = 0,
r_squared = 0.05,
verbose = FALSE,
warnings = TRUE,
progress_bar = TRUE
)
get_ld_variants_by_range(
genomic_range,
species_name = "homo_sapiens",
population = "1000GENOMES:phase_3:CEU",
d_prime = 0,
r_squared = 0.05,
verbose = FALSE,
warnings = TRUE,
progress_bar = TRUE
)
get_ld_variants_by_pair_combn(
variant_id,
species_name = "homo_sapiens",
population = "1000GENOMES:phase_3:CEU",
d_prime = 0,
r_squared = 0.05,
verbose = FALSE,
warnings = TRUE,
progress_bar = TRUE
)
variant_id |
Variant identifiers, e.g., |
genomic_window_size |
An integer vector specifying the genomic window
size in kilobases (kb) around the variant indicated in |
species_name |
The species name, i.e., the scientific name, all letters
lowercase and space replaced by underscore. Examples: |
population |
Population for which to compute linkage disequilibrium. See
|
d_prime |
|
r_squared |
|
verbose |
Whether to be verbose about the http requests and respective responses' status. |
warnings |
Whether to show warnings. |
progress_bar |
Whether to show a progress bar. |
variant_id1 |
The first variant of a pair of variants. Used with
|
variant_id2 |
The second variant of a pair of variants. Used with
|
genomic_range |
Genomic range formatted as a string
|
A tibble
of 6 variables:
species_name
Ensembl species name: this is the name used internally
by Ensembl to uniquely identify a species by name. It is the scientific
name but formatted without capitalisation and spacing converted with an
underscore, e.g., 'homo_sapiens'
.
population
Population for which to compute linkage disequilibrium.
variant_id1
First variant identifier.
variant_id2
Second variant identifier.
d_prime
D'
between the two variants.
r_squared
r^2
between the two variants.
# Retrieve variants in LD by a window size of 1kb:
# 1kb: 500 bp upstream and 500 bp downstream of variant.
get_ld_variants_by_window('rs123', genomic_window_size = 1L)
# Retrieve LD measures for pairs of variants:
get_ld_variants_by_pair(
variant_id1 = c('rs123', 'rs35439278'),
variant_id2 = c('rs122', 'rs35174522')
)
# Retrieve variants in LD within a genomic range
get_ld_variants_by_range('7:100000..100500')
# Retrieve all pair combinations of variants in LD
get_ld_variants_by_pair_combn(c('rs6978506', 'rs12718102', 'rs13307200'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.