{\r
Vector rseqs = new Vector();\r
Alignment ral = null;\r
- AlignedCodonFrame cf=new AlignedCodonFrame(dataset.getWidth()); // nominal width\r
+ AlignedCodonFrame cf=new AlignedCodonFrame(0); // nominal width\r
for (int s = 0; s < seqs.length; s++)\r
{\r
SequenceI dss = seqs[s];\r
{\r
System.out.println("Attempting to find ds Xrefs refs.");\r
DBRefEntry[] lrfs = CrossRef.findXDbRefs(!dna, seqs[s].getDBRef()); // less ambiguous would be a 'find primary dbRefEntry' method.\r
+ // filter for desired source xref here\r
found = CrossRef.searchDatasetXrefs(dss, !dna, lrfs, dataset, rseqs, cf);\r
}\r
for (int r = 0; xrfs!=null && r < xrfs.length; r++)\r
if (dataset != null)\r
{\r
found = searchDataset(dss, xrfs[r], dataset, rseqs, cf);\r
+ if (found)\r
+ xrfs[r] = null; // we've recovered seqs for this one.\r
}\r
}\r
}\r
for (int r = 0; r < xrfs.length; r++)\r
{\r
// filter out any irrelevant or irretrievable references\r
- if ((source != null && !source.equals(xrfs[r].getSource()))\r
- || !sftch.isFetchable(xrfs[r].getSource()))\r
+ if (xrfs[r]==null || ((source != null && !source.equals(xrfs[r].getSource()))\r
+ || !sftch.isFetchable(xrfs[r].getSource())))\r
{\r
l--;\r
xrfs[r] = null;\r
* \r
* @param sequenceI\r
* @param xrf\r
- * @param dna\r
* @param dataset\r
* @param rseqs\r
- * @param cf \r
+ * @param cf\r
* @return true if sequences were found and added\r
*/\r
public static boolean searchDataset(SequenceI sequenceI, DBRefEntry xrf,\r
}\r
}\r
}\r
+ // TODO: add mapping between sequences if necessary\r
+ found = true;\r
}\r
\r
- // TODO: add mapping between sequences if necessary\r
- found = true;\r
}\r
}\r
}\r