\r
public class Sequence implements SequenceI\r
{\r
- protected String name;\r
- protected String sequence;\r
+ protected String name;\r
+ protected String sequence;\r
protected String description;\r
- protected int start;\r
- protected int end;\r
- protected String displayId;\r
- protected Color color = Color.white;\r
+ protected int start;\r
+ protected int end;\r
+ protected String displayId;\r
+ protected Color color = Color.white;\r
String pdbId;\r
- PDBfile pdb;\r
-\r
- public int maxchain = -1;\r
- public int pdbstart;\r
- public int pdbend;\r
- public int seqstart;\r
- public int seqend;\r
\r
public Vector sequenceFeatures = new Vector();\r
public void setSequenceFeatures(Vector v)\r
return pdbId;\r
}\r
\r
- public void setPDBfile(PDBfile pdb)\r
- {\r
- this.pdb = pdb;\r
- int max = -10;\r
- maxchain = -1;\r
-\r
- for (int i=0; i < pdb.chains.size(); i++) {\r
-\r
- System.out.println("PDB sequence = " + ((PDBChain)pdb.chains.elementAt(i)).sequence);\r
- // Now lets compare the sequences to get\r
- // the start and end points.\r
-\r
-\r
- StringTokenizer str = new StringTokenizer(sequence, ".");\r
- String newString = "";\r
-\r
- while (str.hasMoreTokens()) {\r
- newString += str.nextToken();\r
- }\r
- // Align the sequence to the pdb\r
- AlignSeq as = new AlignSeq(this,((PDBChain)pdb.chains.elementAt(i)).sequence,"pep");\r
- as.calcScoreMatrix();\r
- as.traceAlignment();\r
- as.printAlignment();\r
-\r
- System.out.println("Score = " + as.maxscore);\r
- if (as.maxscore > max) {\r
- System.out.println("New max score");\r
- max = as.maxscore;\r
- maxchain = i;\r
-\r
- pdbstart = as.seq2start;\r
- pdbend = as.seq2end;\r
- seqstart = as.seq1start - 1 ;\r
- seqend = as.seq1end -1;\r
- }\r
-\r
- System.out.println("PDB start/end " + pdbstart + " " + pdbend);\r
- System.out.println("SEQ start/end " + seqstart + " " + seqend);\r
- }\r
- }\r
\r
public Sequence(String name, String sequence, int start, int end)\r
{\r