converting from a PDB file to FASTA file

Issue #520 resolved
sai_bhavani created an issue

hello i am using bio3d to convert from PDB to FASTA so that to know the aminoacid composition i have been using

p = read.pdb('P_int.pdb' , maxlines = -1, multi = FALSE, rm.insert = FALSE, rm.alt = TRUE, ATOM.only = FALSE, hex = FALSE, verbose = TRUE) "print"(p,printseq=TRUE)

and my output is

Call: read.pdb(file = "P_int.pdb", maxlines = -1, multi = FALSE, rm.insert = FALSE, rm.alt = FALSE, ATOM.only = FALSE, hex = FALSE, verbose = TRUE)

Total Models#: 1

Total Atoms#: 89, XYZs#: 267 Chains#: 2 (values: A T)

Protein Atoms#: 89 (residues/Calpha atoms#: 10) >Nucleic acid Atoms#: 0 (residues/phosphate atoms#: 0)

Non-protein/nucleic Atoms#: 0 (residues: 0) >Non-protein/nucleic resid values: [ none ]

Protein sequence: >TGGGRGNTGV + attr: atom, xyz, calpha, call

for some reason my entire pdb is not being converted in to FASTA file i.e,. no on residues in my pdb and fasta sequence are not equal...

can anyone help me with this?

Comments (6)

  1. sai_bhavani reporter

    for the same attached file there are total of 31 residues in the file and its just printing out 19 residues when i use "pdbseq()"

    as.fasta(pdbseq(p)) 1 . 19 seq1 TGGGRNTGVTGGGRDGTGV > 1 . 19

    Call: as.fasta(x = pdbseq(p))

    Class: fasta

    Alignment dimensions: 1 sequence rows; 19 position columns (19 non-gap, 0 gap)

    • attr: id, ali, call
  2. Xinqiu Yao

    Hi,

    Just looking at the first a few lines of your pdb explains why the mismatch: You have a few residues without 'CA' atoms. Is that a mistake? Bio3D works fine with low-resolution structures (if it is the case) but 'CA' atoms are considered essential and will ignore residues without them.

  3. sai_bhavani reporter

    thank you for the response!! the file ii have there has all the interface atoms so there might be cases that side chains might be at interface but may be residue is not..

    that clears my doubt .. i will take care of the CA atoms

  4. Log in to comment