Bioinformatics - you need to get the ATOMS sequence

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

Can someone help me?

thank

+3
source share
1 answer

I decided this ... Solution for those 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());
            }
        }
+3
source

Source: https://habr.com/ru/post/1788250/


All Articles