Class VariantContextWriterConstructionHelper


  • public final class VariantContextWriterConstructionHelper
    extends Object
    Helper for creating a VariantContextWriter from a OutputStream.

    Part of the Jannovar-HTSJDK bridge.

    Author:
    Manuel Holtgrewe
    • Constructor Detail

      • VariantContextWriterConstructionHelper

        public VariantContextWriterConstructionHelper()
    • 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 new VariantContextWriter that uses the header from reader but has the header extended header through extendHeaderFields(htsjdk.variant.vcf.VCFHeader).
        Parameters:
        header - the VCF header to use for the construction
        outStream - OutputStream to write to
        additionalHeaderLines - additional VCFHeaderLines 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 new VariantContextWriter that uses the header from reader but has the header extended header through extendHeaderFields(htsjdk.variant.vcf.VCFHeader).
        Parameters:
        header - the VCF header to use for the construction
        fileName - path to output file
        additionalHeaderLines - additional VCFHeaderLines 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 new VariantContextWriter that uses the header from reader but has the header extended header through extendHeaderFields(htsjdk.variant.vcf.VCFHeader).
        Parameters:
        header - the VCF header to use for the construction
        fileName - path to output file
        additionalHeaderLines - additional VCFHeaderLines to add
        generateIndex - 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 construction
        fileName - path to output file
        Returns:
        A correct writer for variantContexts
      • extendHeaderFields

        public static htsjdk.variant.vcf.VCFHeader extendHeaderFields​(htsjdk.variant.vcf.VCFHeader header)
        Extend a VCFHeader with the given fields.
        Parameters:
        header - the VCFHeader to extend
        Returns:
        extended VCFHeader