View source: R/extract_variants.R
extract_variants | R Documentation |
Performs targeted extraction of variants from chromosome .vcf files using Tabix index (.tbi) files.
extract_variants(
chr_files,
gwas_info,
autosomes = TRUE,
range = 0,
grch37 = TRUE,
keep_all = FALSE
)
chr_files |
Filenames (in order) for the chromosome-wise .vcf files |
gwas_info |
An object generated by get_trait_variants() or get_pQTLs(). Alternatively, a character vector of rsids. |
autosomes |
If TRUE, only extracts variants from the autosomes. |
range |
Variants are extracted from the start position until start position + range (in bp). |
grch37 |
If TRUE, the build is grch37; if FALSE, grch38 is used. |
keep_all |
If TRUE, keeps all variants in the search range, even those not in gwas_info. |
A list with two data.frames: 'gt', containing the genotype data in number of risk alleles (0/1/2), and 'fix', containing information on the variants: rsid, chromosome, position, reference and alternative allele, and imputation quality information (e.g. DR2).
TG_gwas_info <- get_trait_variants('thrombin generation',trait_list=NULL,ask_about_efo=FALSE)
# TG_variants <- extract_variants(chromosome_files, TG_gwas_info)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.