public class VCFEncoder extends Object
Modifier and Type | Field | Description |
---|---|---|
static Charset |
VCF_CHARSET |
The encoding used for VCF files: ISO-8859-1
|
Constructor | 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 | 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
|
void |
setAllowMissingFieldsInHeader(boolean allow) |
Deprecated.
since 10/24/13 use the constructor
|
void |
setVCFHeader(VCFHeader header) |
Deprecated.
since 10/24/13 use the constructor
|
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)
Large doubles => gets %.2f style formatting Doubles < 1 / 10 but > 1/100 => get %.3f style formatting Double < 1/100 => %.3e formatting
d
- public void addGenotypeData(VariantContext vc, Map<Allele,String> alleleMap, List<String> genotypeFormatKeys, StringBuilder builder)
public Map<Allele,String> buildAlleleStrings(VariantContext vc)