/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9.0b2)
- * Copyright (C) 2015 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignmentOrder;
import jalview.datamodel.ColumnSelection;
+import jalview.datamodel.SearchResultMatchI;
import jalview.datamodel.SearchResults;
-import jalview.datamodel.SearchResults.Match;
+import jalview.datamodel.SearchResultsI;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceGroup;
import jalview.datamodel.SequenceI;
/*
* Determine all mappings from this position to mapped sequences.
*/
- SearchResults sr = buildSearchResults(seq, seqpos, mappings);
+ SearchResultsI sr = buildSearchResults(seq, seqpos, mappings);
if (!sr.isEmpty())
{
* @param seqmappings
* @return
*/
- public static SearchResults buildSearchResults(SequenceI seq, int index,
+ public static SearchResultsI buildSearchResults(SequenceI seq, int index,
List<AlignedCodonFrame> seqmappings)
{
- SearchResults results = new SearchResults();
+ SearchResultsI results = new SearchResults();
addSearchResults(results, seq, index, seqmappings);
return results;
}
* @param index
* @param seqmappings
*/
- public static void addSearchResults(SearchResults results, SequenceI seq,
+ public static void addSearchResults(SearchResultsI results, SequenceI seq,
int index, List<AlignedCodonFrame> seqmappings)
{
if (index >= seq.getStart() && index <= seq.getEnd())
* Copy group name, colours etc, but not sequences or sequence colour scheme
*/
SequenceGroup mappedGroup = new SequenceGroup(sg);
- mappedGroup.cs = mapTo.getGlobalColourScheme();
+ mappedGroup.setColourScheme(mapTo.getGlobalColourScheme());
mappedGroup.clear();
int minStartCol = -1;
*/
List<AlignedCodonFrame> mapping = Arrays
.asList(new AlignedCodonFrame[] { acf });
- SearchResults sr = buildSearchResults(selected,
+ SearchResultsI sr = buildSearchResults(selected,
startResiduePos, mapping);
- for (Match m : sr.getResults())
+ for (SearchResultMatchI m : sr.getResults())
{
mappedStartResidue = m.getStart();
mappedEndResidue = m.getEnd();
}
sr = buildSearchResults(selected, endResiduePos, mapping);
- for (Match m : sr.getResults())
+ for (SearchResultMatchI m : sr.getResults())
{
mappedStartResidue = Math.min(mappedStartResidue,
m.getStart());
* Get the residue position and find the mapped position.
*/
int residuePos = fromSeq.findPosition(col);
- SearchResults sr = buildSearchResults(fromSeq, residuePos, mappings);
- for (Match m : sr.getResults())
+ SearchResultsI sr = buildSearchResults(fromSeq, residuePos, mappings);
+ for (SearchResultMatchI m : sr.getResults())
{
int mappedStartResidue = m.getStart();
int mappedEndResidue = m.getEnd();