ArrayList unknownSequences;\r
CutAndPasteTransfer output = new CutAndPasteTransfer();\r
StringBuffer sbuffer = new StringBuffer();\r
+ boolean uniprotFlag = false;\r
\r
public SequenceFeatureFetcher()\r
{}\r
StringBuffer remainingIds = new StringBuffer("uniprot:");\r
for (int i = 0; i < ids.size(); i++)\r
{\r
+ if(ids.get(i).toString().indexOf("|")>-1)\r
+ {\r
+ remainingIds.append(ids.get(i).toString().substring(\r
+ ids.get(i).toString().lastIndexOf("|") + 1));\r
+ uniprotFlag = true;\r
+ }\r
remainingIds.append(ids.get(i) + ";");\r
}\r
EBIFetchClient ebi = new EBIFetchClient();\r
sequence = dataset.findName(idmatch);\r
}\r
\r
- if (sequence == null)\r
+ if(sequence!=null)\r
+ ids.remove(sequence.getName());\r
+\r
+ else if (sequence == null && uniprotFlag)\r
+ {\r
+ sequence = dataset.findName("UniProt/Swiss-Prot|"+entry.getAccession().elementAt(0)+"|"+idmatch);\r
+ ids.remove(idmatch);\r
+ }\r
+\r
+ if(sequence ==null)\r
{\r
System.out.println(idmatch+" not found");\r
continue;\r
}\r
\r
- ids.remove(sequence.getName());\r
unknownSequences.remove(sequence);\r
\r
String nonGapped = AlignSeq.extractGaps("-. ", sequence.getSequence());\r