2011-01-27 43 views
3

我在BioJava中搜索一個方法從PDB文件中獲取Atom序列。我觀察了BioJava API,但是getAtomSequence()捕獲了氨基酸。 我在BioJava中嘗試了其他幾種方法,但沒有任何工作,因爲我想。生物信息學 - 需要得到ATOMS序列

有人可以幫我嗎?

感謝

回答

3

我解決它... 解決方案的興趣:自學

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

+1 – oezi 2011-01-28 09:15:14