简体   繁体   English

生物信息学 - 需要获得ATOMS序列

[英]Bioinformatics - Need to get the ATOMS sequence

I search a method in BioJava to get the Atom sequence from a PDB file. 我在BioJava中搜索一个方法,从PDB文件中获取Atom序列。 I watched the BioJava API but for the getAtomSequence() it catches the amino acids. 我观察了BioJava API但是对于getAtomSequence()它捕获了氨基酸。 I tried with several other method in BioJava but nothing worked as I want. 我尝试使用BioJava中的其他几种方法,但没有任何方法可行。

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());
            }
        }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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