Class VariantContextWriterConstructionHelper
- java.lang.Object
-
- de.charite.compbio.jannovar.htsjdk.VariantContextWriterConstructionHelper
-
public final class VariantContextWriterConstructionHelper extends Object
- Author:
- Manuel Holtgrewe
-
-
Constructor Summary
Constructors Constructor Description VariantContextWriterConstructionHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static htsjdk.variant.vcf.VCFHeader
extendHeaderFields(htsjdk.variant.vcf.VCFHeader header)
Extend aVCFHeader
with the givenfields
.static htsjdk.variant.variantcontext.writer.VariantContextWriter
openVariantContextWriter(htsjdk.variant.vcf.VCFHeader header, OutputStream outStream, Collection<htsjdk.variant.vcf.VCFHeaderLine> additionalHeaderLines)
Return a newVariantContextWriter
that uses the header fromreader
but has the header extended header throughextendHeaderFields(htsjdk.variant.vcf.VCFHeader)
.static htsjdk.variant.variantcontext.writer.VariantContextWriter
openVariantContextWriter(htsjdk.variant.vcf.VCFHeader header, String fileName)
Forward to#openVariantContextWriter(VCFHeader, String, InfoFields, Collection)
.static htsjdk.variant.variantcontext.writer.VariantContextWriter
openVariantContextWriter(htsjdk.variant.vcf.VCFHeader header, String fileName, Collection<htsjdk.variant.vcf.VCFHeaderLine> additionalHeaderLines)
Return a newVariantContextWriter
that uses the header fromreader
but has the header extended header throughextendHeaderFields(htsjdk.variant.vcf.VCFHeader)
.static htsjdk.variant.variantcontext.writer.VariantContextWriter
openVariantContextWriter(htsjdk.variant.vcf.VCFHeader header, String fileName, Collection<htsjdk.variant.vcf.VCFHeaderLine> additionalHeaderLines, boolean generateIndex)
Return a newVariantContextWriter
that uses the header fromreader
but has the header extended header throughextendHeaderFields(htsjdk.variant.vcf.VCFHeader)
.
-
-
-
Method Detail
-
openVariantContextWriter
public static htsjdk.variant.variantcontext.writer.VariantContextWriter openVariantContextWriter(htsjdk.variant.vcf.VCFHeader header, OutputStream outStream, Collection<htsjdk.variant.vcf.VCFHeaderLine> additionalHeaderLines)
Return a newVariantContextWriter
that uses the header fromreader
but has the header extended header throughextendHeaderFields(htsjdk.variant.vcf.VCFHeader)
.- Parameters:
header
- the VCF header to use for the constructionoutStream
-OutputStream
to write toadditionalHeaderLines
- additionalVCFHeaderLine
s to add- Returns:
- A correct writer for variantContexts
-
openVariantContextWriter
public static htsjdk.variant.variantcontext.writer.VariantContextWriter openVariantContextWriter(htsjdk.variant.vcf.VCFHeader header, String fileName, Collection<htsjdk.variant.vcf.VCFHeaderLine> additionalHeaderLines)
Return a newVariantContextWriter
that uses the header fromreader
but has the header extended header throughextendHeaderFields(htsjdk.variant.vcf.VCFHeader)
.- Parameters:
header
- the VCF header to use for the constructionfileName
- path to output fileadditionalHeaderLines
- additionalVCFHeaderLine
s to add- Returns:
- A correct writer for variantContexts
-
openVariantContextWriter
public static htsjdk.variant.variantcontext.writer.VariantContextWriter openVariantContextWriter(htsjdk.variant.vcf.VCFHeader header, String fileName, Collection<htsjdk.variant.vcf.VCFHeaderLine> additionalHeaderLines, boolean generateIndex)
Return a newVariantContextWriter
that uses the header fromreader
but has the header extended header throughextendHeaderFields(htsjdk.variant.vcf.VCFHeader)
.- Parameters:
header
- the VCF header to use for the constructionfileName
- path to output fileadditionalHeaderLines
- additionalVCFHeaderLine
s to addgenerateIndex
- whether or not to generate an index- Returns:
- A correct writer for variantContexts
-
openVariantContextWriter
public static htsjdk.variant.variantcontext.writer.VariantContextWriter openVariantContextWriter(htsjdk.variant.vcf.VCFHeader header, String fileName)
Forward to#openVariantContextWriter(VCFHeader, String, InfoFields, Collection)
. *- Parameters:
header
- the VCF header to use for the constructionfileName
- path to output file- Returns:
- A correct writer for variantContexts
-
extendHeaderFields
public static htsjdk.variant.vcf.VCFHeader extendHeaderFields(htsjdk.variant.vcf.VCFHeader header)
Extend aVCFHeader
with the givenfields
.- Parameters:
header
- theVCFHeader
to extend- Returns:
- extended VCFHeader
-
-