int absStart = entry.getUniprotSequence().getContent().indexOf(\r
nonGapped.toString());\r
\r
+ int residueOffset = 0;\r
if (absStart == -1)\r
{\r
- unknownSequences.add(sequence.getName());\r
- sbuffer.append(sequence.getName() +\r
- " SEQUENCE NOT %100 MATCH \n");\r
+ // Is UniprotSequence contained in dataset sequence?\r
+ absStart = nonGapped.toString().indexOf(entry.getUniprotSequence().getContent());\r
+ if(absStart == -1)\r
+ {\r
+ unknownSequences.add(sequence.getName());\r
+ sbuffer.append(sequence.getName() +\r
+ " SEQUENCE NOT %100 MATCH \n");\r
+\r
+ continue;\r
+ }\r
+ else\r
+ {\r
+ if(entry.getFeatures()!=null)\r
+ {\r
+ Enumeration e = entry.getFeatures().elements();\r
+ while (e.hasMoreElements())\r
+ {\r
+ SequenceFeature sf = (SequenceFeature) e.nextElement();\r
+ sf.setBegin(sf.getBegin() + absStart + 1);\r
+ sf.setEnd(sf.getEnd() + absStart + 1);\r
+ }\r
+ }\r
+\r
+ sbuffer.append(sequence.getName() +\r
+ " HAS "+absStart+" PREFIXED RESIDUES COMPARED TO UNIPROT - ANY SEQUENCE FEATURES"\r
+ +" HAVE BEEN ADJUSTED ACCORDINGLY \n");\r
+ absStart = 0;\r
+ }\r
\r
- continue;\r
}\r
\r
int absEnd = absStart + nonGapped.toString().length();\r