how to extract secondary structure from PDB file using Biojava? I want to analysis the secondary structure, wander that can use Biojava to extract from Pdb file?
how to extract secondary structure from PDB file using Biojava? I want to analysis the secondary structure, wander that can use Biojava to extract from Pdb file?
You may try Stride or PDBsum. You can input your PDBID. The server will generate the secondary structure for the same.
Stride is available here http://webclu.bio.wzw.tum.de/cgi-bin/stride/stridecgi.py
PDBsum is here http://www.ebi.ac.uk/pdbsum/
Hope this will help you
Just extract it from the header:
http://www.wwpdb.org/documentation/format33/sect5.html
Probably you have to write your own parser but.. otherwise, you can use DSSP and parse that output which is easier. Or Stride, as Anuraj mentioned.
Biojava apparently has something about it too: http://www.biojava.org/docs/api/org/biojava/bio/structure/secstruc/SecStruc.html
You could do something like this:
import java.util.Map;
import org.biojava.bio.structure.AminoAcid;
import org.biojava.bio.structure.Chain;
import org.biojava.bio.structure.Group;
import org.biojava.bio.structure.Structure;
import org.biojava.bio.structure.align.util.AtomCache;
import org.biojava.bio.structure.io.FileParsingParameters;
public class DemoShowSecStruc {
public static void main(String[] args){
try {
FileParsingParameters params = new FileParsingParameters();
params.setParseSecStruc(true);
AtomCache cache = new AtomCache();
cache.setFileParsingParams(params);
Structure s = cache.getStructure("4hhb");
for ( Chain c : s.getChains()) {
for (Group g: c.getAtomGroups()){
if ( g instanceof AminoAcid ){
AminoAcid aa = (AminoAcid)g;
Map<String,String> sec = aa.getSecStruc();
System.out.println(c.getChainID() + " " + g.getResidueNumber() + " " + g.getPDBName() + " " + " " +sec);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
great. I got it ! thanks~
if I want get secondary structure from a predicted PDB file, how to do that?