Thanks for your reply
Could you please description again
First: keep pdb id in text file
Second: add this pdb id-txt to PDBeurope?
Hello
Could you please tell me one tool can show name of organism with pdb id
Thanks
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
Thanks for your reply
Could you please description again
First: keep pdb id in text file
Second: add this pdb id-txt to PDBeurope?
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.
which line start the second script?
starts with #!/bin/bash
second box - first script starts with #!/bin/bash
fourth box - second script, also starts with #!/bin/bash
Thanks for your reply
This script is linux command?
Could you please more description about how to run
Yes, this is to run in linux.
First script
biostar.bashDo bash biostar.bash
Second Script
Keep pdb ids in a file called pdb_ids.txt
biostar.bashpdb_ids.txt in a folder, open terminal in that folder, do bash biostar.bashLog in to answer this question.
You can retrieve this type of information from the 'pdb header' which is found in PDB file itself.
Example
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.
Simply this doesn't work ?
grep "ORGANISM_SCIENTIFIC" *.pdb | awk -F":" '{ print $1"\t"$NF}'