seqVCF_Header | R Documentation |
Parses the meta-information lines of a VCF or BCF file.
seqVCF_Header(vcf.fn, getnum=FALSE, verbose=TRUE)
vcf.fn |
the file name of VCF or BCF format;
or a |
getnum |
if |
verbose |
when |
The ID description contains four columns: ID
– variable name;
Number
– the number of elements, see the webpage of the 1000 Genomes
Project; Type
– data type; Description
– a variable
description.
Return a list (with a class name "SeqVCFHeaderClass", S3 object):
fileformat |
the file format |
info |
the ID description in the INFO field |
filter |
the ID description in the FILTER field |
format |
the ID description in the FORMAT field |
alt |
the ID description in the ALT field |
contig |
the description in the contig field |
assembly |
the link of assembly |
reference |
genome reference, or |
header |
the other header lines |
ploidy |
ploidy, two for humans |
num.sample |
the number of samples |
num.variant |
the number of variants, applicable only if
|
sample.id |
a vector of sample IDs in the VCF/BCF file |
Xiuwen Zheng
Danecek, P., Auton, A., Abecasis, G., Albers, C.A., Banks, E., DePristo, M.A., Handsaker, R.E., Lunter, G., Marth, G.T., Sherry, S.T., et al. (2011). The variant call format and VCFtools. Bioinformatics 27, 2156-2158.
seqVCF_SampID
, seqVCF2GDS
# the VCF file
(vcf.fn <- seqExampleFileName("vcf"))
# or vcf.fn <- "C:/YourFolder/Your_VCF_File.vcf"
# get sample id
seqVCF_Header(vcf.fn, getnum=TRUE)
# use a connection object
f <- file(vcf.fn, "r")
seqVCF_Header(f, getnum=TRUE)
close(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.