package jalview.gui;
import jalview.api.FeatureColourI;
-import jalview.datamodel.AlignedCodonFrame;
-import jalview.datamodel.Mapping;
-import jalview.datamodel.SearchResultMatchI;
import jalview.datamodel.SearchResults;
import jalview.datamodel.SearchResultsI;
import jalview.datamodel.SequenceFeature;
name.setText(sf.getType());
description.setText(sf.getDescription());
group.setText(sf.getFeatureGroup());
- start.setValue(new Integer(sf.getBegin()));
- end.setValue(new Integer(sf.getEnd()));
+ start.setValue(Integer.valueOf(sf.getBegin()));
+ end.setValue(Integer.valueOf(sf.getEnd()));
SearchResultsI highlight = new SearchResults();
highlight.addResult(sequences.get(0), sf.getBegin(),
name.setText(featureType);
group.setText(featureGroup);
- start.setValue(new Integer(firstFeature.getBegin()));
- end.setValue(new Integer(firstFeature.getEnd()));
+ start.setValue(Integer.valueOf(firstFeature.getBegin()));
+ end.setValue(Integer.valueOf(firstFeature.getEnd()));
description.setText(firstFeature.getDescription());
updateColourButton(mainPanel, colour,
(oldcol = fcol = getFeatureStyle(featureType)));
{
Arrays.sort(renderOrder, order);
}
-
- /**
- * Answers a (possibly empty) list of features in this alignment at a position
- * (or range) which is mappable from the given sequence residue position in a
- * mapped alignment.
- *
- * @param sequence
- * @param pos
- * @return
- */
- public List<SequenceFeature> findComplementFeaturesAtResidue(
- SequenceI sequence, int pos)
- {
- SequenceI ds = sequence.getDatasetSequence();
- List<SequenceFeature> result = new ArrayList<>();
- List<AlignedCodonFrame> mappings = this.av.getAlignment()
- .getCodonFrame(sequence);
- for (AlignedCodonFrame acf : mappings)
- {
- Mapping mapping = acf.getMappingForSequence(sequence);
- if (mapping.getMap().getFromRatio() == mapping.getMap().getToRatio())
- {
- continue; // we are only looking for 3:1 or 1:3 mappings
- }
- SearchResultsI sr = new SearchResults();
- acf.markMappedRegion(ds, pos, sr);
- for (SearchResultMatchI match : sr.getResults())
- {
- for (int i = match.getStart(); i <= match.getEnd(); i++)
- {
- List<SequenceFeature> fs = findFeaturesAtResidue(
- match.getSequence(), i);
- for (SequenceFeature sf : fs)
- {
- if (!result.contains(sf))
- {
- result.addAll(fs);
- }
- }
- }
- }
- }
-
- return result;
- }
}