WAP to find out the percentage of amino acid residues from a protein data bank file ( PDB ID: 1XYZ.pdb)
Question
WAP to find out the percentage of amino acid residues from a protein data bank file ( PDB ID: 1XYZ.pdb)
Solution
Sure, here is a Python script that can be used to calculate the percentage of amino acid residues from a PDB file. This script assumes that you have the Biopython library installed. If not, you can install it using pip:
pip install biopython
Here is the Python script:
from Bio.PDB import PDBParser
def count_amino_acids(pdb_file):
parser = PDBParser()
structure = parser.get_structure('protein', pdb_file)
amino_acids = ['ALA', 'ARG', 'ASN', 'ASP', 'CYS', 'GLU', 'GLN', 'GLY', 'HIS', 'ILE', 'LEU', 'LYS', 'MET', 'PHE', 'PRO', 'SER', 'THR', 'TRP', 'TYR', 'VAL']
aa_count = {aa: 0 for aa in amino_acids}
for model in structure:
for chain in model:
for residue in chain:
if residue.get_resname() in aa_count:
aa_count[residue.get_resname()] += 1
total_residues = sum(aa_count.values())
percentages = {aa: (count / total_residues) * 100 for aa, count in aa_count.items()}
return percentages
pdb_file = '1XYZ.pdb' # replace with your pdb file path
percentages = count_amino_acids(pdb_file)
for aa, percentage in percentages.items():
print(f'{aa}: {percentage}%')
This script first defines a list of the 20 standard amino acids. It then creates a dictionary to keep track of the count of each amino acid in the PDB file. It uses the Biopython PDBParser to parse the PDB file and iterates over each residue in each chain in each model in the structure. If the residue is an amino acid (i.e., its name is in the list of
Similar Questions
Write down a python script to extract coordinates of aromatic residues of chain A from a protein data bank file (PDB ID: 1ABC.pdb)
The amino acids coded by a single codon areGroup of answer choicesMet and TyrMet and TrpTrp and TyrCys and TyrCys and Met
Current estimates indicate that what % of the human genome is translated into protein?Group of answer choices2.5%15%1.5%25%
Draw an α amino acid with an ethyl −−CH2CH3 side chain. Draw the molecule as it would appear at physiological pH.
Which type of BLAST can be used to compare an amino acid query sequence against a protein sequence database? BLASTN BLASTX tBLASTn BLASTP
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.