public class ClippingUtility extends Object
Modifier and Type | Field and Description |
---|---|
static double |
MAX_ERROR_RATE
The default value used for the maximum error rate when matching read bases to clippable sequence.
|
static double |
MAX_PE_ERROR_RATE
The default value used for the maximum error rate when matching paired end read bases to clippable sequence.
|
static int |
MIN_MATCH_BASES
The default value used for the minimum number of contiguous bases to match against.
|
static int |
MIN_MATCH_PE_BASES
The default value used for the minimum number of contiguous bases to match against in a paired end read
|
static int |
NO_MATCH
The value returned by methods returning int when no match is found.
|
Constructor and Description |
---|
ClippingUtility() |
Modifier and Type | Method and Description |
---|---|
static AdapterPair |
adapterTrimIlluminaPairedReads(SAMRecord read1,
SAMRecord read2,
AdapterPair... adapters)
Invokes adapterTrimIlluminaPairedReads with default less stringent parameters for a pair of reads.
|
static String |
adapterTrimIlluminaPairedReads(SAMRecord read1,
SAMRecord read2,
AdapterPair adapters)
Deprecated.
Use the varargs version. This no longer returns a warning string..
|
static String |
adapterTrimIlluminaPairedReads(SAMRecord read1,
SAMRecord read2,
AdapterPair adapters,
int minMatchBases,
double maxErrorRate)
Deprecated.
Use the varargs version. This no longer returns a warning string..
|
static AdapterPair |
adapterTrimIlluminaPairedReads(SAMRecord read1,
SAMRecord read2,
int minMatchBases,
double maxErrorRate,
AdapterPair... adapters)
Invokes adapterTrimIlluminaRead with explicit parameters for a pair of reads.
|
static AdapterPair |
adapterTrimIlluminaSingleRead(SAMRecord read,
AdapterPair... adapters)
Invokes adapterTrimIlluminRead with default parameters for a single read.
|
static void |
adapterTrimIlluminaSingleRead(SAMRecord read,
AdapterPair adapter)
Deprecated.
Use the varargs version. This no longer returns a warning string..
|
static void |
adapterTrimIlluminaSingleRead(SAMRecord read,
AdapterPair adapter,
int minMatchBases,
double maxErrorRate)
Deprecated.
Use the varargs version. This no longer returns a warning string..
|
static AdapterPair |
adapterTrimIlluminaSingleRead(SAMRecord read,
int minMatchBases,
double maxErrorRate,
AdapterPair... adapters)
Invokes adapterTrimIlluminRead with explicit matching thresholds for a single read.
|
static int |
findIndexOfClipSequence(byte[] read,
byte[] adapterSequence,
int minMatch,
double maxErrorRate)
Finds the first index of the adapterSequence sequence in the read sequence requiring at least minMatch
bases of pairwise alignment with a maximum number of errors dictated by maxErrorRate.
|
public static final int MIN_MATCH_BASES
public static final int MIN_MATCH_PE_BASES
public static final double MAX_ERROR_RATE
public static final double MAX_PE_ERROR_RATE
public static final int NO_MATCH
public static void adapterTrimIlluminaSingleRead(SAMRecord read, AdapterPair adapter)
public static void adapterTrimIlluminaSingleRead(SAMRecord read, AdapterPair adapter, int minMatchBases, double maxErrorRate)
public static AdapterPair adapterTrimIlluminaSingleRead(SAMRecord read, AdapterPair... adapters)
read
- SAM/BAM read to trimadapters
- which adapters to try to use (indexed, paired_end, or single_end)public static AdapterPair adapterTrimIlluminaSingleRead(SAMRecord read, int minMatchBases, double maxErrorRate, AdapterPair... adapters)
read
- SAM/BAM read to trimminMatchBases
- minimum number of contiguous bases to match against in a readmaxErrorRate
- maximum error rate when matching read basesadapters
- which adapters to try (indexed, paired_end, or single_end)public static String adapterTrimIlluminaPairedReads(SAMRecord read1, SAMRecord read2, AdapterPair adapters)
public static String adapterTrimIlluminaPairedReads(SAMRecord read1, SAMRecord read2, AdapterPair adapters, int minMatchBases, double maxErrorRate)
public static AdapterPair adapterTrimIlluminaPairedReads(SAMRecord read1, SAMRecord read2, AdapterPair... adapters)
read1
- first read of the pairread2
- second read of the pairadapters
- which adapters to use (indexed, paired_end, or single_end, nextera), attempted in orderpublic static AdapterPair adapterTrimIlluminaPairedReads(SAMRecord read1, SAMRecord read2, int minMatchBases, double maxErrorRate, AdapterPair... adapters)
read1
- first read of the pair.
If read1 is a negative strand, a copy of its bases will be reverse complemented.read2
- second read of the pair.
If read2 is a negative strand, a copy of its bases will be reverse complementedminMatchBases
- minimum number of contiguous bases to match against in a readmaxErrorRate
- maximum error rate when matching read basesadapters
- which adapters to use (indexed, paired_end, or single_end, nextera), attempted in orderpublic static int findIndexOfClipSequence(byte[] read, byte[] adapterSequence, int minMatch, double maxErrorRate)
read
-