Package org.snpeff.vcf
Class VcfHeader
java.lang.Object
org.snpeff.vcf.VcfHeader
Represents the header of a vcf file.
References: http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-41
- Author:
- pablocingolani
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd all missing lines from 'vcfHeader'voidadd(VcfHeaderEntry vcfHeader) Add header linevoidaddFormat(VcfHeaderFormat vcfFormat) Add a 'FORMAT' meta infovoidaddInfo(VcfHeaderInfo vcfInfo) Add a VCF INFO header definitionvoidAdd line to header (can add many lines)String[]getLines()intNumber of samplesGet pedigree (if any)Get sample namesintgetSampleNum(String sameplName) Sample number (position in "#CHROM" line)Get all VcfInfo entriesGet Info type for a given IDbooleanhasFormat(VcfHeaderFormat vcfFormat) Do we already have this 'format' entry?booleanhasInfo(VcfHeaderInfo vcfInfo) Do we already have this 'info' header?static booleanisFormatLine(String line) static booleanisInfoLine(String line) voidparse()Parse header linesprotected voidvoidRemove header line starting with a prefixvoidremoveInfo(String infoId) Remove header line matching an INFO fieldtoString()Get header information
-
Field Details
-
INFO_PREFIX
- See Also:
-
FORMAT_PREFIX
- See Also:
-
PEDIGREE_PREFIX
- See Also:
-
CHROM_PREFIX
- See Also:
-
-
Constructor Details
-
VcfHeader
public VcfHeader()
-
-
Method Details
-
isFormatLine
-
isInfoLine
-
add
Add all missing lines from 'vcfHeader' -
add
Add header line -
addFormat
Add a 'FORMAT' meta info -
addInfo
Add a VCF INFO header definition -
addLine
Add line to header (can add many lines) -
getLines
-
getNumberOfSamples
public int getNumberOfSamples()Number of samples -
getPedigree
Get pedigree (if any) -
getSampleNames
Get sample names -
getSampleNum
Sample number (position in "#CHROM" line)- Returns:
- -1 if not found
-
getVcfHeaderFormat
-
getVcfHeaderFormat
-
getVcfHeaderInfo
Get all VcfInfo entries -
getVcfHeaderInfo
Get Info type for a given ID -
hasFormat
Do we already have this 'format' entry? -
hasInfo
Do we already have this 'info' header? -
parse
public void parse()Parse header lines -
parseSampleNames
-
parseSampleNum
protected void parseSampleNum() -
remove
Remove header line starting with a prefix -
removeInfo
Remove header line matching an INFO field -
toString
Get header information
-