import java.awt.*;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.xml.sax.SAXException;
+
+import fr.orsay.lri.varna.exceptions.ExceptionFileFormatOrSyntax;
+import fr.orsay.lri.varna.exceptions.ExceptionLoadingFailed;
+import fr.orsay.lri.varna.exceptions.ExceptionPermissionDenied;
+
import jalview.datamodel.*;
import jalview.io.FileParse;
*/
boolean VisibleChainAnnotation = false;
- public PDBfile(String inFile, String inType) throws IOException
+ public PDBfile(String inFile, String inType) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
{
super(inFile, inType);
}
- public PDBfile(FileParse source) throws IOException
+ public PDBfile(FileParse source) throws IOException, ExceptionFileFormatOrSyntax, ParserConfigurationException, SAXException, ExceptionPermissionDenied, ExceptionLoadingFailed
{
super(source);
}
{
// TODO set the filename sensibly - try using data source name.
id = safeName(getDataName());
-
+
chains = new Vector();
PDBChain tmpchain;
// maintain reference to
// dataset
seqs.addElement(chainseq);
+ if(isRNA(chainseq)==true)
+ {
+ System.out.println("this is a PDB format and RNA sequence");
+ }
+
AlignmentAnnotation[] chainannot = chainseq.getAnnotation();
+
if (chainannot != null)
{
for (int ai = 0; ai < chainannot.length; ai++)
{
+
chainannot[ai].visible = VisibleChainAnnotation;
annotations.addElement(chainannot[ai]);
}
1.0f / (float) i, .4f, 1.0f));
}
}
+ public boolean isRNA(SequenceI seqs)
+ {
+ for (int i=0;i<seqs.getLength();i++){
+ if((seqs.getCharAt(i)!='A') &&(seqs.getCharAt(i)!='C')&&(seqs.getCharAt(i)!='G')&&(seqs.getCharAt(i)!='U'))
+ {
+ return false;
+ }
+ }
+
+ return true;
+
+
+ }
}