Class FlowBasedReadUtils
java.lang.Object
org.broadinstitute.hellbender.utils.read.FlowBasedReadUtils
utility class for flow based read
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FlowBasedArgumentCollection
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FlowBasedRead
convertToFlowBasedRead
(GATKRead read, htsjdk.samtools.SAMFileHeader header) create a FlowBasedRead from a proper SAMRecordstatic 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)static int[]
findLeftClipping
(int baseClipping, int[] flow2base, int[] key) static int[]
findRightClipping
(int baseClipping, int[] rFlow2Base, int[] rKey) static int
Computes the sum of base qualities of the given flow read.static int[]
getFlowMatrixModsInstructions
(String flowMatrixMods, int maxHmer) Retrieve flow matrix modifications matrix from its string argument format.static int
getMarkDupReadEnd
(GATKRead gatkRead, boolean endSemantics, htsjdk.samtools.SAMFileHeader header, MarkDuplicatesSparkArgumentCollection mdArgs) 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.static byte[]
getReadFlowOrder
(htsjdk.samtools.SAMFileHeader header, GATKRead read) getReadGroupInfo
(htsjdk.samtools.SAMFileHeader hdr, GATKRead read) static int
getStrandedUnclippedEndForFlow
(GATKRead read, htsjdk.samtools.SAMFileHeader header, MarkDuplicatesSparkArgumentCollection mdArgs) static int
getStrandedUnclippedStartForFlow
(GATKRead read, htsjdk.samtools.SAMFileHeader header, MarkDuplicatesSparkArgumentCollection mdArgs) static boolean
isFlow
(htsjdk.samtools.SAMRecord rec) static boolean
static boolean
static boolean
readEndMarkedUnclipped
(GATKRead rec, boolean FLOW_Q_IS_KNOWN_END)
-
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
-
FLOW_BASED_INSIGNIFICANT_END
public static final int FLOW_BASED_INSIGNIFICANT_END- See Also:
-
-
Constructor Details
-
FlowBasedReadUtils
public FlowBasedReadUtils()
-
-
Method Details
-
readEndMarkedUncertain
-
readEndMarkedUnclipped
-
getReadFlowOrder
-
flowSumOfBaseQualities
Computes the sum of base qualities of the given flow read. -
isFlow
-
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 locationendSemantics
- - location is sought under end-of-fragment semanticsheader
- - reads file SAMHeadermdArgs
- - 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
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
-