public class FilterBAMAndGetStatsPlugin
Plugin to Filter out the BAMs and build a stats file to get numbers of each of the CIGAR operators for each reference range as well as how many reads hit each one.
public FilterBAMAndGetStatsPlugin(@Nullable java.awt.Frame parentFrame, boolean isInteractive)
Plugin to Filter out the BAMs and build a stats file to get numbers of each of the CIGAR operators for each reference range as well as how many reads hit each one.
public FilterBAMAndGetStatsPlugin()
Plugin to Filter out the BAMs and build a stats file to get numbers of each of the CIGAR operators for each reference range as well as how many reads hit each one.
@Nullable public net.maizegenetics.plugindef.DataSet processData(@Nullable net.maizegenetics.plugindef.DataSet input)
public void processSAMRecords(@NotNull htsjdk.samtools.SamReader samReader, boolean pairedEnd, @NotNull java.util.Map<java.lang.Integer,java.lang.Integer> hapIdToRefRangeMap, double maxRefRangeError, @NotNull java.lang.String outputBamFile, @NotNull java.lang.String outputStatsFile)
Function that processes the records within a SAM file similar to what is done in Minimap2Utils. This will keep track of the alignment stats as it is going and will output the correct values.
@NotNull public java.util.Map<kotlin.Pair,java.util.List> keepHapIdsForSingleRefRange(@NotNull java.util.Map<kotlin.Pair,? extends java.util.List<htsjdk.samtools.SAMRecord>> bestHitMap, @NotNull java.util.Map<java.lang.Integer,java.lang.Integer> hapIdToRangeMap, double maxRefRangeError)
Simple function to remobve hapIds if they cross multiple reference ranges.
@NotNull public kotlin.Pair<kotlin.Pair,java.util.List> removeExtraRangeAlignments(@NotNull java.util.Map.Entry<kotlin.Pair,? extends java.util.List<htsjdk.samtools.SAMRecord>> entry, @NotNull java.util.Map<java.lang.Integer,java.lang.Integer> hapIdToRangeMap, double maxRefRangeError)
Simple function to go through the records grouped by range and remove any suboptimal alignments.
public int findBestRefRangeFromRecords(@NotNull java.util.Map<java.lang.Integer,? extends java.util.List<? extends htsjdk.samtools.SAMRecord>> refRangeToIdMapping, double maxRefRangeError)
Function to check to see if the read hits a multiple reference ranges less than maxRefRangeError Basically this is to filter out any reads which hit multiple reference ranges equally well
@Nullable public javax.swing.ImageIcon getIcon()
@NotNull public java.lang.String getButtonName()
@NotNull public java.lang.String getToolTipText()
@NotNull public java.lang.String bamFile()
Name of the BAM file to process. Also will support SAM Files
@NotNull public FilterBAMAndGetStatsPlugin bamFile(@NotNull java.lang.String value)
Set bamFile. Name of the BAM file to process. Also will support SAM Files
value
- bamFile@NotNull public java.lang.String outputBamFile()
Name of the output filtered BAM/SAM file.
@NotNull public FilterBAMAndGetStatsPlugin outputBamFile(@NotNull java.lang.String value)
Set Output Bam File. Name of the output filtered BAM/SAM file.
value
- Output Bam File@NotNull public java.lang.String outputStatsFile()
Name of the output stats file of RefRange to total counts.
@NotNull public FilterBAMAndGetStatsPlugin outputStatsFile(@NotNull java.lang.String value)
Set Output Stats File. Name of the output stats file of RefRange to total counts.
value
- Output Stats Filepublic boolean isPairedEnd()
Flag to set if you are using Paired End reads.
@NotNull public FilterBAMAndGetStatsPlugin isPairedEnd(boolean value)
Set Is Paired End. Flag to set if you are using Paired End reads.
value
- Is Paired Endpublic double maxRefRangeError()
Maximum allowed error when choosing best reference range to count. Error is computed 1 - (mostHitRefCount/totalHits)
@NotNull public FilterBAMAndGetStatsPlugin maxRefRangeError(double value)
Set Max Ref Range Err. Maximum allowed error when choosing best reference range to count. Error is computed 1
(mostHitRefCount/totalHits)
value
- Max Ref Range Err