Class VCFEncoder


  • public class VCFEncoder
    extends Object
    Functions specific to encoding VCF records.
    • Field Detail

      • VCF_CHARSET

        public static final Charset VCF_CHARSET
        The encoding used for VCF files: ISO-8859-1. When writing VCF4.3 is implemented, this should change to UTF-8.
    • Constructor Detail

      • VCFEncoder

        public VCFEncoder​(VCFHeader header,
                          boolean allowMissingFieldsInHeader,
                          boolean outputTrailingFormatFields)
        Prepare a VCFEncoder that will encode records appropriate to the given VCF header, optionally allowing missing fields in the header.
    • Method Detail

      • setVCFHeader

        @Deprecated
        public void setVCFHeader​(VCFHeader header)
        Deprecated.
        since 10/24/13 use the constructor
      • setAllowMissingFieldsInHeader

        @Deprecated
        public void setAllowMissingFieldsInHeader​(boolean allow)
        Deprecated.
        since 10/24/13 use the constructor
      • formatVCFDouble

        public static String formatVCFDouble​(double d)
        Takes a double value and pretty prints it to a String for display

        Large doubles => gets %.2f style formatting Doubles < 1 / 10 but > 1/100 => get %.3f style formatting Double < 1/100 => %.3e formatting

        Parameters:
        d -
        Returns: