public interface QuickScanningSequenceScore extends SequenceScore
SequenceScore
that provide additional methods for computing scores of infix sequences
and filtering infix sequences.Modifier and Type | Method and Description |
---|---|
void |
fillInfixScore(int[] seq,
int start,
int length,
double[] scores)
Computes the position-wise scores of an infix of the sequence
seq (which must be encoded by the
same alphabet as this QuickScanningSequenceScore ) beginning at start and extending for length
positions. |
boolean[][] |
getInfixFilter(int kmer,
double thresh,
int... start)
Computes arrays that indicate, for a given set of starting positions and a given k-mer length, if a sequence
containing this k-mer may yield a score above
threshold , choosing the best-scoring option among
all non-specified positions (i.e., those outside the k-mer). |
clone, getAlphabetContainer, getCharacteristics, getInstanceName, getLength, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getLogScoreFor, getNumericalCharacteristics, isInitialized, toString
void fillInfixScore(int[] seq, int start, int length, double[] scores)
seq
(which must be encoded by the
same alphabet as this QuickScanningSequenceScore
) beginning at start
and extending for length
positions. The scores are computed per position and filled into the provided array scores
, which is of the same
length as seq
.
This must be implemented such that ToolBox.sum(double...)
applied to scores
computed from 0
to seq.length
returns the same value as SequenceScore.getLogScoreFor(de.jstacs.data.sequences.Sequence)
called
on the IntSequence
created from seq
.seq
- the sequencestart
- the start of the infixlength
- the length of the infixscores
- the array of scores to be (partly) filledboolean[][] getInfixFilter(int kmer, double thresh, int... start)
threshold
, choosing the best-scoring option among
all non-specified positions (i.e., those outside the k-mer).
This method is implemented as an upper bound on the scores, i.e., there may be k-mers that are considered
to score above threshold (i.e., that have entry true
) although they are not, but there may not be k-mers that are considered to be below
threshold (i.e., that have entry false
), although there exist sequences containing this k-mer that do.
The returned array is indexed by the starting positions (in the same order as provided in starts
) in the first dimension, and in the second dimension
it is indexed by an integer representation of the k-mers, assigning the highest priority to the first k-mer position, i.e.,
DiscreteAlphabet
).kmer
- the k-mer lengththresh
- the thresholdstart
- the starting position(s)