[Biojava-l] PdbToXMLConverter with PDBConverter
jon portuondo murguiondo
jon portuondo murguiondo <jon.portuondo01@campus.upf.es>
Fri, 27 Dec 2002 20:00:02
Hello, I have the first output! The problem I had was that PdbToXMLConverter doesn't have main method.
This is the program that Matthew gave me, called PDBConverter.java:
----------------------------------------------------------------------------------------------------
package org.biojava.bio.program;
import java.io.*;
import org.biojava.bio.program.*;
public class PDBConverter {
public static void main(String[] args)
throws Exception {
StringBuffer sbuf = new StringBuffer();
BufferedReader in = new BufferedReader(
new FileReader(
new File(args[0]) ) );
for(
String line = in.readLine();
line != null;
line = in.readLine()
) {
sbuf.append(line);
}
PdbToXMLConverter converter =
new PdbToXMLConverter(sbuf.toString());
converter.convert();
}
}
--------------------------------------------------------------------------------------------------
With this program I finally get an output from PdbToXMLConverter, but it is really odd:
------------------------------------------------------------------------------------------------
<?xml version="1.0"?>
no protocol: HEADER LIGASE 08-SEP-00 1FS1 TITLE INSIGHTS INTO SCF UBIQUITIN LIGASES FROM THE STRUCTURE OF TITLE 2 THE SKP1-SKP2 COMPLEX COMPND MOL_ID: 1; COMPND 2 MOLECULE: CYCLIN A/CDK2-ASSOCIATED P19; COMPND 3 CHAIN: A, C; COMPND 4 FRAGMENT: RESIDUES 101-153; COMPND 5 SYNONYM: SKP2 F-BOX; COMPND 6 ENGINEERED: YES; COMPND 7 MOL_ID: 2; COMPND 8 MOLECULE: CYCLIN A/CDK2-ASSOCIATED P45; COMPND 9 CHAIN: B, D; COMPND 10 FRAGMENT: RESIDUES 1-147;
COMPND 11 SYNONYM: SKP1; COMPND 12 ENGINEERED: YES SOURCE MOL_ID: 1; SOURCE 2 ORGANISM_SCIENTIFIC: HOMO SAPIENS; SOURCE 3 ORGANISM_COMMON: HUMAN; SOURCE 4 EXPRESSION_SYSTEM: ESCHERICHIA COLI; SOURCE 5 EXPRESSION_SYSTEM_COMMON: BACTERIA; SOURCE 6 MOL_ID: 2; SOURCE 7 ORGANISM_SCIENTIFIC: HOMO SAPIENS; SOURCE ---------------------------------------------------------------------------------------------------
There is no change of line and I am sure that would be more defects on that expected XML.
To get it run I typed:
java org.biojava.bio.program.PDBConverter /home/jon/1FS1.pdb
I would like to understand why the output is so odd and how can I get the expected structured XML.
Thanks for all!