/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
- * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
+ * Copyright (C) $$Year-Rel$$ The Jalview Authors
*
* This file is part of Jalview.
*
* Jalview is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+ * as published by the Free Software Foundation, either version 3
+ * of the License, or (at your option) any later version.
*
* Jalview is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
- * You should have received a copy of the GNU General Public License along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU General Public License
+ * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
+ * The Jalview Authors are detailed in the 'AUTHORS' file.
*/
package jalview.analysis;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Vector;
-import java.util.Hashtable;
-
import jalview.datamodel.AlignedCodonFrame;
import jalview.datamodel.Alignment;
import jalview.datamodel.AlignmentI;
-import jalview.datamodel.DBRefSource;
import jalview.datamodel.DBRefEntry;
+import jalview.datamodel.DBRefSource;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceI;
import jalview.ws.SequenceFetcher;
import jalview.ws.seqfetcher.ASequenceFetcher;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Vector;
+
/**
* Functions for cross-referencing sequence databases. user must first specify
* if cross-referencing from protein or dna (set dna==true)
{
Vector rseqs = new Vector();
Alignment ral = null;
- AlignedCodonFrame cf = new AlignedCodonFrame(0); // nominal width
+ AlignedCodonFrame cf = new AlignedCodonFrame(); // nominal width
for (int s = 0; s < seqs.length; s++)
{
SequenceI dss = seqs[s];
for (int r = 0; xrfs != null && r < xrfs.length; r++)
{
if (source != null && !source.equals(xrfs[r].getSource()))
+ {
continue;
+ }
if (xrfs[r].hasMap())
{
if (xrfs[r].getMap().getTo() != null)
{
found |= searchDataset(dss, xrfs[r], dataset, rseqs, cf); // ,false,!dna);
if (found)
+ {
xrfs[r] = null; // we've recovered seqs for this one.
+ }
}
}
}
for (int r = 0; r < xrfs.length; r++)
{
if (xrfs[r] != null)
+ {
t[l++] = xrfs[r];
+ }
}
xrfs = t;
try
{
boolean found = false;
if (lrfs == null)
+ {
return false;
+ }
for (int i = 0; i < lrfs.length; i++)
{
DBRefEntry xref = new DBRefEntry(lrfs[i]);
boolean found = false;
SequenceI[] typer = new SequenceI[1];
if (dataset == null)
+ {
return false;
+ }
if (dataset.getSequences() == null)
{
System.err.println("Empty dataset sequence set - NO VECTOR");
synchronized (ds = dataset.getSequences())
{
for (SequenceI nxt : ds)
+ {
if (nxt != null)
{
if (nxt.getDatasetSequence() != null)
}
}
+ }
}
return found;
}