load_GT_vcf | R Documentation |
Note, the genotype VCF can be very big for whole genome. It would be more efficient to only keep the wanted variants and samples. bcftools does such jobs nicely.
load_GT_vcf(vcf_file, rowname_format = "full", na.rm = TRUE, keep_GP = TRUE)
vcf_file |
character(1), path to VCF file for donor genotypes |
rowname_format |
the format of rowname: NULL is the default from vcfR, short is CHROM_POS, and full is CHROM_POS_REF_ALT |
na.rm |
logical(1), if TRUE, remove the variants with NA values |
keep_GP |
logical(1), if TRUE, check if GP (genotype probability) exists it will be returned |
A list representing the loaded genotype information with two
components: GT, the usual numeric representation of genotype and GP the
genotype probabilities. Note that if keep_GP
is false the GP
component will be NULL.
vcf_file <- system.file("extdata", "cellSNP.cells.vcf.gz", package = "cardelino" ) GT_dat <- load_GT_vcf(vcf_file, na.rm = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.