- System.out.println("Source: " + sp.getDbName() + " (" + db
- + "): retrieving test:" + sp.getTestQuery());
- AlignmentI al = null;
- try
- {
- al = sp.getSequenceRecords(sp.getTestQuery());
- if (al != null && al.getHeight() > 0
- && sp.getDbSourceProperties() != null)
- {
- boolean dna = sp.getDbSourceProperties().containsKey(
- DBRefSource.DNACODINGSEQDB)
- || sp.getDbSourceProperties().containsKey(
- DBRefSource.DNASEQDB)
- || sp.getDbSourceProperties().containsKey(
- DBRefSource.CODINGSEQDB);
- // try and find products
- String types[] = jalview.analysis.CrossRef
- .findSequenceXrefTypes(dna, al.getSequencesArray());
- if (types != null)
- {
- System.out.println("Xref Types for: "
- + (dna ? "dna" : "prot"));
- for (int t = 0; t < types.length; t++)
- {
- System.out.println("Type: " + types[t]);
- SequenceI[] prod = jalview.analysis.CrossRef
- .findXrefSequences(al.getSequencesArray(), dna,
- types[t]).getSequencesArray();
- System.out.println("Found "
- + ((prod == null) ? "no" : "" + prod.length)
- + " products");
- if (prod != null)
- {
- for (int p = 0; p < prod.length; p++)
- {
- System.out.println("Prod " + p + ": "
- + prod[p].getDisplayId(true));
- }
- }
- }
- }
- else
- {
- noProds.addElement((dna ? new Object[]
- { al, al } : new Object[]
- { al }));
- }
-
- }
- } catch (Exception ex)
- {
- System.out.println("ERROR:Failed to retrieve test query.");
- ex.printStackTrace(System.out);
- }
-
- if (al == null)
- {
- System.out.println("ERROR:No alignment retrieved.");
- StringBuffer raw = sp.getRawRecords();
- if (raw != null)
- System.out.println(raw.toString());
- else
- System.out.println("ERROR:No Raw results.");
- }
- else