seqVCF_Header {SeqArray} | R Documentation |
Parses the header of a VCF file.
seqVCF_Header(vcf.fn, getnum=FALSE)
vcf.fn |
the file name; or a |
getnum |
if |
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 |
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.
# 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)