pdb id and organism
1
0
Entering edit mode
9.6 years ago
gbahramali ▴ 20

Hello

Could you please tell me one tool can show name of organism with pdb id

Thanks

sequence • 2.7k views
ADD COMMENT
1
Entering edit mode

Simply this doesn't work ?

grep "ORGANISM_SCIENTIFIC" *.pdb | awk -F":" '{ print $1"\t"$NF}'
ADD REPLY
0
Entering edit mode

You can retrieve this type of information from the 'pdb header' which is found in PDB file itself.

Example

HEADER    TRANSFERASE (CARBAMOYL-P,ASPARTATE)     22-SEP-89   8AT1
TITLE     CRYSTAL STRUCTURES OF ASPARTATE CARBAMOYLTRANSFERASE LIGATED WITH
TITLE    2 PHOSPHONOACETAMIDE, MALONATE, AND CTP OR ATP AT 2.8-ANGSTROMS
TITLE    3 RESOLUTION AND NEUTRAL P*H
COMPND    MOL_ID: 1;
COMPND   2 MOLECULE: ASPARTATE CARBAMOYLTRANSFERASE (R STATE), CATALYTIC CHAIN;
COMPND   3 CHAIN: A, C;
COMPND   4 EC: 2.1.3.2;
COMPND   5 ENGINEERED: YES;
COMPND   6 MOL_ID: 2;
COMPND   7 MOLECULE: ASPARTATE CARBAMOYLTRANSFERASE REGULATORY CHAIN;
COMPND   8 CHAIN: B, D;
COMPND   9 ENGINEERED: YES
SOURCE    MOL_ID: 1;
SOURCE   2 ORGANISM_SCIENTIFIC: ESCHERICHIA COLI;  # this line
SOURCE   3 ORGANISM_TAXID: 562;
SOURCE   4 MOL_ID: 2;
SOURCE   5 ORGANISM_SCIENTIFIC: ESCHERICHIA COLI;
SOURCE   6 ORGANISM_TAXID: 562
ADD REPLY
0
Entering edit mode

Thanks for reply

I know this item exist in pdb id header but I have many pdb id and I want to know that the organism of every one.

ADD REPLY
0
Entering edit mode
9.6 years ago
venu 7.1k

If you have all pdb files, keep them in a directory, run the following. At the end you will get a file organ.txt, contains the information as follows

3adk
ORGANISM: SUS SCROFA;
5pti
ORGANISM: BOS TAURUS;

Script

#!/bin/bash

for f in *.pdb
do
  sed -n "/ORGANISM_SCIENTIFIC:/p" $f > ""$f".orga"
done

for f in *.orga
do
  echo "$f" >> organisms.txt
  cat $f >> organisms.txt
done

sed "s/.orga//" organisms.txt | sed "s/SOURCE   2 //" | sed "s/_SCIENTIFIC//" > organ.txt

rm *.orga

Otherwise run the following. Keep all ids in a file called pdb_ids.txt. It retrieves the pdb header of every pdb id in your file from PDBeurope database, then the organism name of every id.

pdb_ids.txt

5pti
3adk
..

​Script

#!/bin/bash

while read -r I 
do
  wget -O ""$i".header" "http://www.ebi.ac.uk/pdbe/static/entry/$i.header"
  sed -n "/ORGANISM_SCIENTIFIC:/p" ""$i".header" > ""$i".orga"
done < pdb_ids.txt

for f in *.orga
do
  echo "$f" >> organisms.txt
  cat $f >> organisms.txt
done

sed "s/.orga//" organisms.txt | sed "s/SOURCE 2 //" | sed "s/_SCIENTIFIC//" > organ.txt

rm *.header
rm *.orga

```

Keep the script in a file biostar.bash and execute bash biostar.bash

ADD COMMENT
0
Entering edit mode

Thanks for your reply

Could you please description again

First: keep pdb id in text file

Second: add this pdb id-txt to PDBeurope?

ADD REPLY
0
Entering edit mode

If you have all .pdb file of every id, keep them in a directory and run the first script in that directory. If you don't have .pdb file, then keep all ids as shown in above answer run the second script. In both cases you will get the same result.

ADD REPLY
0
Entering edit mode

which line start the second script?

ADD REPLY
0
Entering edit mode

starts with #!/bin/bash

second box - first script starts with #!/bin/bash

fourth box - second script, also starts with #!/bin/bash

ADD REPLY
0
Entering edit mode

Thanks for your reply

This script is linux command?

Could you please more description about how to run

ADD REPLY
0
Entering edit mode

Yes, this is to run in linux.

First script

  • Copy all the pdb files into a folder.
  • Copy the script into a file called biostar.bash
  • Open a terminal in that folder
  • Do bash biostar.bash

    Second Script

  • Keep pdb ids in a file called pdb_ids.txt

  • Copy the second script into a file called biostar.bash
  • Keep pdb_ids.txt in a folder, open terminal in that folder, do bash biostar.bash
ADD REPLY

Login before adding your answer.

Traffic: 1693 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6