git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2a198f3
)
na pdb: recognise NA residue names
author
jprocter
<Jim Procter>
Fri, 30 Oct 2009 10:22:45 +0000
(10:22 +0000)
committer
jprocter
<Jim Procter>
Fri, 30 Oct 2009 10:22:45 +0000
(10:22 +0000)
src/MCview/PDBChain.java
patch
|
blob
|
history
diff --git
a/src/MCview/PDBChain.java
b/src/MCview/PDBChain.java
index
61ad26a
..
a556137
100755
(executable)
--- a/
src/MCview/PDBChain.java
+++ b/
src/MCview/PDBChain.java
@@
-204,6
+204,8
@@
public class PDBChain
public void makeResidueList()
{
int count = 0;
public void makeResidueList()
{
int count = 0;
+ Object symbol;
+ boolean nucleotide=false;
StringBuffer seq = new StringBuffer();
Vector resFeatures = new Vector();
Vector resAnnotation = new Vector();
StringBuffer seq = new StringBuffer();
Vector resFeatures = new Vector();
Vector resAnnotation = new Vector();
@@
-254,17
+256,26
@@
public class PDBChain
resFeatures.addElement(sf);
resAnnotation.addElement(new Annotation(tmpat.tfactor));
// Keep totting up the sequence
resFeatures.addElement(sf);
resAnnotation.addElement(new Annotation(tmpat.tfactor));
// Keep totting up the sequence
- if (ResidueProperties.getAA3Hash().get(tmpat.resName) == null)
+ if ((symbol=ResidueProperties.getAA3Hash().get(tmpat.resName)) == null)
{
{
- seq.append("X");
+ if (ResidueProperties.nucleotideIndex[tmpat.resName.charAt(0)]==-1)
+ {
+ seq.append("X");
// System.err.println("PDBReader:Null aa3Hash for " +
// tmpat.resName);
// System.err.println("PDBReader:Null aa3Hash for " +
// tmpat.resName);
+ } else {
+ // nucleotide flag
+ nucleotide=true;
+ seq.append(tmpat.resName.charAt(0));
+ }
}
else
{
}
else
{
-
- seq.append(ResidueProperties.aa[((Integer) ResidueProperties
- .getAA3Hash().get(tmpat.resName)).intValue()]);
+ if (nucleotide)
+ {
+ System.err.println("Warning: mixed nucleotide and amino acid chain.. its gonna do bad things to you!");
+ }
+ seq.append(ResidueProperties.aa[((Integer) symbol).intValue()]);
}
count++;
}
}
count++;
}
@@
-300,7
+311,7
@@
public class PDBChain
resAnnotation.setElementAt(null, i);
}
AlignmentAnnotation tfactorann = new AlignmentAnnotation(
resAnnotation.setElementAt(null, i);
}
AlignmentAnnotation tfactorann = new AlignmentAnnotation(
- "PDB.CATempFactor", "CA Temperature Factor for "
+ "PDB.TempFactor", "Temperature Factor for "
+ sequence.getName(), annots, 0, max,
AlignmentAnnotation.LINE_GRAPH);
tfactorann.setSequenceRef(sequence);
+ sequence.getName(), annots, 0, max,
AlignmentAnnotation.LINE_GRAPH);
tfactorann.setSequenceRef(sequence);