public abstract class SequencePartitioning
extends java.lang.Object
| Constructor and Description |
|---|
SequencePartitioning() |
| Modifier and Type | Method and Description |
|---|---|
static int |
floorDiv(int x,
int y) |
static int |
floorMod(int x,
int y) |
int |
getAbsolutePosition(GeneFeature feature,
int positionInFeature)
Returns absolute position in reference sequence for the specified local position in specified
feature
or -1 if this position can't be projected. |
protected int |
getLength(GeneFeature.ReferenceRange refRange) |
int |
getLength(GeneFeature feature) |
abstract int |
getPosition(ReferencePoint referencePoint)
Return position of specific anchor point
|
protected com.milaboratory.core.Range |
getRange(GeneFeature.ReferenceRange refRange) |
com.milaboratory.core.Range |
getRange(GeneFeature feature)
Return sequence range for non-composite gene features
|
com.milaboratory.core.Range[] |
getRanges(GeneFeature feature) |
int |
getRelativePosition(GeneFeature feature,
ReferencePoint referencePoint)
Returns a relative position of specified
referencePoint in specified feature or -1 if this
position is not available. |
com.milaboratory.core.Range |
getRelativeRange(GeneFeature feature,
GeneFeature subFeature)
Returns a relative range of specified
subFeature in specified feature or null if this is not
available. |
com.milaboratory.core.sequence.TranslationParameters |
getTranslationParameters(GeneFeature feature)
Calculates translation parameters ( ~ translation frame ) for given gene feature using current sequence
partitioning.
|
java.util.List<RangeTranslationParameters> |
getTranslationParameters(int length)
Returns RangeTranslationParameters for all ranges in current partitioning that can be transcribed
|
protected boolean |
isAvailable(GeneFeature.ReferenceRange refRange) |
boolean |
isAvailable(GeneFeature feature)
Checks if position of gene feature can be obtained using this partitioning
|
boolean |
isAvailable(ReferencePoint referencePoint)
Checks if position of anchor point can be obtained using this partitioning
|
abstract boolean |
isReversed()
Return true if sequence partitioning is defined on the reverse-complement strand of the sequence,
false if on forward strand.
|
public abstract int getPosition(ReferencePoint referencePoint)
referencePoint - anchor pointpublic abstract boolean isReversed()
public boolean isAvailable(ReferencePoint referencePoint)
referencePoint - anchor pointpublic boolean isAvailable(GeneFeature feature)
feature - gene featurepublic com.milaboratory.core.Range getRange(GeneFeature feature)
feature - gene featurepublic com.milaboratory.core.Range[] getRanges(GeneFeature feature)
public int getLength(GeneFeature feature)
protected com.milaboratory.core.Range getRange(GeneFeature.ReferenceRange refRange)
protected int getLength(GeneFeature.ReferenceRange refRange)
protected boolean isAvailable(GeneFeature.ReferenceRange refRange)
public com.milaboratory.core.Range getRelativeRange(GeneFeature feature, GeneFeature subFeature)
subFeature in specified feature or null if this is not
available.feature - gene featuresubFeature - a part of featuresubFeature in specified feature or null if this is not
availablepublic int getRelativePosition(GeneFeature feature, ReferencePoint referencePoint)
referencePoint in specified feature or -1 if this
position is not available.feature - gene featurereferencePoint - reference pointreferencePoint in specified feature or -1 if this
position is not availablepublic int getAbsolutePosition(GeneFeature feature, int positionInFeature)
feature
or -1 if this position can't be projected.feature - gene featurepositionInFeature - local position in gene featurefeature
or -1 if this position can't be projectedpublic com.milaboratory.core.sequence.TranslationParameters getTranslationParameters(GeneFeature feature)
feature - target gene featurepublic java.util.List<RangeTranslationParameters> getTranslationParameters(int length)
length - length of original sequence (Integer.MAX_VALUE can be used if value is not known in advance, this
value will be set for final range and must be processed accordingly)public static int floorDiv(int x,
int y)
public static int floorMod(int x,
int y)