简体   繁体   中英

Bioinformatics - Need to get the ATOMS sequence

I search a method in BioJava to get the Atom sequence from a PDB file. I watched the BioJava API but for the getAtomSequence() it catches the amino acids. I tried with several other method in BioJava but nothing worked as I want.

Can anybody help me here ?

Thanks

I resolved it ... Solution for the interested :

try{

        PDBFileReader read=new PDBFileReader();
        Structure pdb=read.getStructure(filename);
        System.out.println("PDB code :"+pdb.getPDBCode());

        List chains=Collections.synchronizedList(new ArrayList());
        chains=pdb.getChains();

        for(Iterator iter=chains.iterator();iter.hasNext();){
        Chain c=(Chain)(iter.next());
        System.out.println("Chain :"+c.getName()+"\n"+"Seq aa :"+c.getAtomSequence());
        for(int j=0;j<c.getAtomLength();j++){
            for (int k=0; k < c.getAtomGroup(j).size(); k++ ){
            Atom a=c.getAtomGroup(j).getAtom(k);
            System.out.println("Name : "+a.getName()+" X : "+a.getX()+" Y : "+a.getY()+" Z : "+a.getZ());
            }
        }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM