importVCF | R Documentation |
Import a VCF function
importVCF(
file,
na.seq = "./.",
simplify = TRUE,
getInfo = TRUE,
formatFields = NULL
)
file |
The file name |
na.seq |
The missing value definition |
simplify |
Logical |
getInfo |
Logical |
formatFields |
Vector with names |
This function imports a VCF file.
In case the logicl flag 'phased' is set to TRUE then the genotypes are expected to be in the format 0|0, otherwise they are expected to be like 0/1 . If the flag simplify is set genotypes like 0/2 or 1/2 will be set to 0,1,2 coding and multi-alternatives are ignored.
If you would like to extract in addition to the genotype information further any other data from th vcf file formatted in the FORMAT field, you can specify their names in the formatFields option. Currently, it only accepts a single value.
The example file was downloaded from here:
ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/pilot_data/release/2010_07/exon/snps/
A vcf object
Daniel Fischer
# Define here the location on HDD for the example file
fpath <- system.file("extdata","example.vcf", package="GenomicTools.fileHandler")
# Import the example vcf file
importVCF(fpath)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.