Class AnnotationUtils
java.lang.Object
org.broadinstitute.hellbender.tools.walkers.annotator.AnnotationUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondecodeAnyASList
(String somethingList) Helper function to convert a comma-separated String (such as a vc.getAttrbute().toString() output) to a List of StringsdecodeAnyASListWithRawDelim
(String somethingList) Helper method to split a "raw" annotation string delimited with "|"static String
encodeAnyASListWithRawDelim
(List<?> somethingList) Helper function to convert a List of Strings to a @{value ALLELE_SPECIFIC_RAW_DELIM)-separated String, as for raw annotationsstatic String
encodeStringList
(List<String> stringList) Helper function to convert a List of Strings to a comma-separated Stringstatic String
encodeValueList
(List<Double> valueList, String precisionFormat) Helper function to parse the list into the annotation stringstatic String
generateMissingDataWarning
(htsjdk.variant.variantcontext.VariantContext vc, htsjdk.variant.variantcontext.Genotype g, AlleleLikelihoods<GATKRead, htsjdk.variant.variantcontext.Allele> likelihoods) getAlleleLengthListOfString
(String rawDataString) Handles all the Java and htsjdk parsing shenanigansstatic boolean
isAlleleSpecific
(InfoFieldAnnotation annotation) Helper function to determine if an annotation is allele-specific
-
Field Details
-
ALLELE_SPECIFIC_RAW_DELIM
- See Also:
-
ALLELE_SPECIFIC_REDUCED_DELIM
- See Also:
-
ALLELE_SPECIFIC_SPLIT_REGEX
- See Also:
-
BRACKET_REGEX
- See Also:
-
LIST_DELIMITER
- See Also:
-
-
Method Details
-
encodeValueList
Helper function to parse the list into the annotation string- Parameters:
valueList
- the ArrayList returned from StrandBiasBySample.annotate()- Returns:
- the array used by the per-sample Strand Bias annotation
-
encodeStringList
Helper function to convert a List of Strings to a comma-separated String- Parameters:
stringList
- the ArrayList with String data- Returns:
- a comma-separated String
-
encodeAnyASListWithRawDelim
Helper function to convert a List of Strings to a @{value ALLELE_SPECIFIC_RAW_DELIM)-separated String, as for raw annotations- Parameters:
somethingList
- the ArrayList with String data- Returns:
- a delimited String
-
decodeAnyASListWithRawDelim
Helper method to split a "raw" annotation string delimited with "|"- Parameters:
somethingList
- a String, possibly read from a VCF- Returns:
- a List of Strings
-
decodeAnyASList
Helper function to convert a comma-separated String (such as a vc.getAttrbute().toString() output) to a List of Strings- Parameters:
somethingList
- the allele-specific annotations string; may have brackets- Returns:
- a list of allele-specific annotation entries
-
isAlleleSpecific
Helper function to determine if an annotation is allele-specific- Parameters:
annotation
- the annotation to be tested- Returns:
- true if the annotation is expected to have values per-allele
-
getAlleleLengthListOfString
Handles all the Java and htsjdk parsing shenanigans- Parameters:
rawDataString
- should not have surrounding brackets- Returns:
-
generateMissingDataWarning
public static String generateMissingDataWarning(htsjdk.variant.variantcontext.VariantContext vc, htsjdk.variant.variantcontext.Genotype g, AlleleLikelihoods<GATKRead, htsjdk.variant.variantcontext.Allele> likelihoods)
-