java.lang.Object
org.broadinstitute.hellbender.tools.walkers.annotator.AnnotationUtils

public final class AnnotationUtils extends Object
  • Field Details

  • Method Details

    • encodeValueList

      public static String encodeValueList(List<Double> valueList, String precisionFormat)
      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

      public static String encodeStringList(List<String> stringList)
      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

      public 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 annotations
      Parameters:
      somethingList - the ArrayList with String data
      Returns:
      a delimited String
    • decodeAnyASListWithRawDelim

      public static List<String> decodeAnyASListWithRawDelim(String somethingList)
      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

      public static List<String> decodeAnyASList(String somethingList)
      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

      public static boolean isAlleleSpecific(InfoFieldAnnotation annotation)
      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

      public static List<String> getAlleleLengthListOfString(String rawDataString)
      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)