public class VCFEncoder extends Object
Modifier and Type | Field and Description |
---|---|
static Charset |
VCF_CHARSET
The encoding used for VCF files: ISO-8859-1
|
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
void |
addGenotypeData(VariantContext vc,
Map<Allele,String> alleleMap,
List<String> genotypeFormatKeys,
StringBuilder builder) |
Map<Allele,String> |
buildAlleleStrings(VariantContext vc) |
String |
encode(VariantContext context) |
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
|
void |
setAllowMissingFieldsInHeader(boolean allow)
Deprecated.
|
void |
setVCFHeader(VCFHeader header)
Deprecated.
|
public static final Charset VCF_CHARSET
public VCFEncoder(VCFHeader header, boolean allowMissingFieldsInHeader, boolean outputTrailingFormatFields)
@Deprecated public void setVCFHeader(VCFHeader header)
@Deprecated public void setAllowMissingFieldsInHeader(boolean allow)
public String encode(VariantContext context)
public static String formatVCFDouble(double d)
d
- public void addGenotypeData(VariantContext vc, Map<Allele,String> alleleMap, List<String> genotypeFormatKeys, StringBuilder builder)
public Map<Allele,String> buildAlleleStrings(VariantContext vc)