int endResidue = seqs[i].findPosition(endCol);
String[] types = featureTypes == null ? null : featureTypes
.toArray(new String[featureTypes.size()]);
- List<SequenceFeature> sfs = seqs[i].getFeatures().findFeatures(
- startResidue, endResidue, types);
+ List<SequenceFeature> sfs = seqs[i].findFeatures(startResidue,
+ endResidue, types);
seqScores[i] = 0;
scores[i] = 0.0;
{
int ist = sq.findPosition(sqcol.getStartRes());
int iend = sq.findPosition(sqcol.getEndRes()); // see JAL-2526
- List<SequenceFeature> sfs = sq.getFeatures().findFeatures(ist,
- iend, featureType);
+ List<SequenceFeature> sfs = sq.findFeatures(ist, iend, featureType);
boolean overlap = false;
for (SequenceFeature sf : sfs)
{
}
if (!Comparison.isGap(seq.getCharAt(res)))
{
- List<SequenceFeature> features = seq.getFeatures()
- .findFeatures(seqPos, seqPos);
+ List<SequenceFeature> features = seq.findFeatures(seqPos,
+ seqPos);
for (SequenceFeature sf : features)
{
if (sf.isContactFeature())
List<SequenceFeature> overlaps = seq.findFeatures(seqRange.start,
seqRange.end, type);
- for (SequenceFeature sequenceFeature : overlaps)
+ for (SequenceFeature sf : overlaps)
{
/*
* a feature type may be flagged as shown but the group
* an instance of it belongs to may be hidden
*/
- if (featureGroupNotShown(sequenceFeature))
+ if (featureGroupNotShown(sf))
{
continue;
}
- Color featureColour = getColour(sequenceFeature);
- boolean isContactFeature = sequenceFeature.isContactFeature();
+ Color featureColour = getColour(sf);
+ boolean isContactFeature = sf.isContactFeature();
- // todo overload findIndex using Location data
- int featureStartCol = seq.findIndex(sequenceFeature.begin);
- int featureEndCol = seq.findIndex(sequenceFeature.end);
+ int featureStartCol = seq.findIndex(sf.begin);
+ int featureEndCol = sf.begin == sf.end ? featureStartCol : seq
+ .findIndex(sf.end);
if (isContactFeature)
{
boolean drawn = renderFeature(g, seq,
drawnColour = featureColour;
}
}
- else if (showFeature(sequenceFeature))
+ else if (showFeature(sf))
{
/*
* showing feature score by height of colour
* include features at the position provided their feature type is
* displayed, and feature group is null or marked for display
*/
- List<SequenceFeature> features = sequence.getFeatures().findFeatures(
- res, res, visibleTypes);
+ List<SequenceFeature> features = sequence.findFeatures(res, res,
+ visibleTypes);
for (SequenceFeature sf : features)
{