Class FlowBasedReadUtils

java.lang.Object
org.broadinstitute.hellbender.utils.read.FlowBasedReadUtils

public class FlowBasedReadUtils extends Object
utility class for flow based read
  • Field Details

    • FLOW_SUM_OF_BASE_QUALITY_THRESHOLD

      public static final int FLOW_SUM_OF_BASE_QUALITY_THRESHOLD
      See Also:
    • DEFAULT_FLOW_BASED_ARGUMENT_COLLECTION

      public static final FlowBasedArgumentCollection DEFAULT_FLOW_BASED_ARGUMENT_COLLECTION
    • FLOW_BASED_INSIGNIFICANT_END

      public static final int FLOW_BASED_INSIGNIFICANT_END
      See Also:
  • Constructor Details

    • FlowBasedReadUtils

      public FlowBasedReadUtils()
  • Method Details

    • readEndMarkedUncertain

      public static boolean readEndMarkedUncertain(GATKRead rec)
    • readEndMarkedUnclipped

      public static boolean readEndMarkedUnclipped(GATKRead rec, boolean FLOW_Q_IS_KNOWN_END)
    • getReadFlowOrder

      public static byte[] getReadFlowOrder(htsjdk.samtools.SAMFileHeader header, GATKRead read)
    • flowSumOfBaseQualities

      public static int flowSumOfBaseQualities(GATKRead read)
      Computes the sum of base qualities of the given flow read.
    • isFlow

      public static boolean isFlow(GATKRead rec)
    • isFlow

      public static boolean isFlow(htsjdk.samtools.SAMRecord rec)
    • getReadGroupInfo

      public static FlowBasedReadUtils.ReadGroupInfo getReadGroupInfo(htsjdk.samtools.SAMFileHeader hdr, GATKRead read)
    • findFirstUsableFlowOrder

      public static String findFirstUsableFlowOrder(htsjdk.samtools.SAMFileHeader hdr, FlowBasedArgumentCollection fbargs)
      Finds a usable FlowOrder to be used for engine calculation (when no specufic flow order already established for a specific read)
    • findLeftClipping

      public static int[] findLeftClipping(int baseClipping, int[] flow2base, int[] key)
    • findRightClipping

      public static int[] findRightClipping(int baseClipping, int[] rFlow2Base, int[] rKey)
    • convertToFlowBasedRead

      public static FlowBasedRead convertToFlowBasedRead(GATKRead read, htsjdk.samtools.SAMFileHeader header)
      create a FlowBasedRead from a proper SAMRecord
    • getStrandedUnclippedStartForFlow

      public static int getStrandedUnclippedStartForFlow(GATKRead read, htsjdk.samtools.SAMFileHeader header, MarkDuplicatesSparkArgumentCollection mdArgs)
    • getStrandedUnclippedEndForFlow

      public static int getStrandedUnclippedEndForFlow(GATKRead read, htsjdk.samtools.SAMFileHeader header, MarkDuplicatesSparkArgumentCollection mdArgs)
    • getMarkDupReadStart

      public static int getMarkDupReadStart(GATKRead gatkRead, boolean endSemantics, htsjdk.samtools.SAMFileHeader header, MarkDuplicatesSparkArgumentCollection mdArgs)
      Get a starting location for the read, mainly for the purpose of comparing it with another one to find duplicates. To reduce uniqueness, there might be different definitions of what a read start is. To begin with, it can be the (hard) clipped or unclipped start. Furthermore, the MarkDuplicates tool defines additional options for determining the start location, such as skipping the first HMER, allowing for uncertainty or the returning of the unclipped location based on a mapping quality value threshold. Note that this function operates in the REFERENCE direction - meaning that for reverse reads it should be called to get the read's end.
      Parameters:
      gatkRead - - read to get the MarkDuplicates' start location
      endSemantics - - location is sought under end-of-fragment semantics
      header - - reads file SAMHeader
      mdArgs - - MarkDuplicates argument collection
      Returns:
      - read start location, for MarkDuplicates
    • getMarkDupReadEnd

      public static int getMarkDupReadEnd(GATKRead gatkRead, boolean endSemantics, htsjdk.samtools.SAMFileHeader header, MarkDuplicatesSparkArgumentCollection mdArgs)
    • getFlowMatrixModsInstructions

      public static int[] getFlowMatrixModsInstructions(String flowMatrixMods, int maxHmer)
      Retrieve flow matrix modifications matrix from its string argument format. This matrix contains logic for modifying the flow matrix as it is read in. If the value of [n] is not zero, then the hmer probability for hmer length n will be copied to the [n] position For the implementation logic, see FlowBasedRead.fillFlowMatrix