Package org.snpeff.vcf
Class VcfHeader
java.lang.Object
org.snpeff.vcf.VcfHeader
- All Implemented Interfaces:
Serializable
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
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add all missing lines from 'vcfHeader'void
add
(VcfHeaderEntry vcfHeader) Add header linevoid
addFormat
(VcfHeaderFormat vcfFormat) Add a 'FORMAT' meta infovoid
addInfo
(VcfHeaderInfo vcfInfo) Add a VCF INFO header definitionvoid
Add line to header (can add many lines)String[]
getLines()
int
Number of samplesGet pedigree (if any)Get sample namesint
getSampleNum
(String sameplName) Sample number (position in "#CHROM" line)Get all VcfInfo entriesGet Info type for a given IDboolean
hasFormat
(VcfHeaderFormat vcfFormat) Do we already have this 'format' entry?boolean
hasInfo
(VcfHeaderInfo vcfInfo) Do we already have this 'info' header?static boolean
isFormatLine
(String line) static boolean
isInfoLine
(String line) void
parse()
Parse header linesprotected void
void
Remove header line starting with a prefixvoid
removeInfo
(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
-