Answers.Body: <p>There is not a simple way and there are factor that you also need to consider before starting.</p>
  
  <ol>
  <li>Are you using gene names or gene accession numbers/id (NCBI/Uniprot)?</li>
  <li>If not, are the names the current standard ones (<em>e.g.</em> scraped names from old papers is a definite no)</li>
  <li>PDB residue index is rarely the same as protein index.</li>
  <li>Do you want a perfect match or do you want say 80% homology?</li>
  <li>Which PDBs do you want for a protein?</li>
  </ol>
  
  <h2>Personal example</h2>
  
  <p>For a website I have developed I have a route that gets all the PDBs for a given gene. (<a href="https://michelanglo.sgc.ox.ac.uk/name" rel="nofollow noreferrer">enter link description here</a>). The way I did it is that I parsed Uniprot using a <a href="https://github.com/matteoferla/protein-module-for-VENUS" rel="nofollow noreferrer">custom parser</a> and made a dictionary/DB for each species with many synonyms for a gene going to a Uniprot ID and then from there I have another dictionary/DB that goes from Uniprot to PDBs if any. I went for Uniprot as I needed other data too (e.g. features) to present to the user. Including a renumbering option.
  All this is way overkill for what you need. However, if you specify the species I can easily share a JSON file online.</p>
  
  <h2>SIFTs</h2>
  
  <p>If point 3 is important and you have Uniprot IDs I would suggest going with <a href="https://www.ebi.ac.uk/pdbe/docs/sifts/" rel="nofollow noreferrer">SIFTs</a>. It has the offsets and has mapping for Uniprot IDs (pdb_chain_uniprot.tsv).</p>
  
  <h2>Gene names</h2>
  
  <p>In terms of mapping gene names to NCBI/Uniprot/Ensembl IDs, there are mapping tables everywhere. But if you may have obscure synonyms, using the NCBI API is a good option. 
  Uniprot data is better for protein and has PDB codes and chains, but the API gives a XML reply which is a bit annoying (I wrote a parser for it, but I think there was going to be one in Biopython).</p>
  
  <h2>Homologues</h2>
  
  <p>If you would like homologues, say your organism is human and you are okay with mouse, you can either use the threaded SwissModel models or use the blast query in RCSB PDB (not the PDBe, which has better data normally) or NCBI set to PDB database.
  Swissmodel actually contains also PDB structures, so that may be a good starting point if your organism is <a href="https://swissmodel.expasy.org/repository" rel="nofollow noreferrer">one of those where precompiled exists</a>.</p>
  
  <h2>Parts</h2>
  
  <p>Some proteins, especially mammalian are formed by separate domains linked together, especially the docking scaffolds. In which case you may care for a specific model within the gene, hence the indexing issue and the potential getting features.
  If you want a single PDB structure for each gene and do not care about the technical I have <a href="https://github.com/matteoferla/protein_fuser" rel="nofollow noreferrer">some Pymol-using py3 code</a> to fuse models together with the N and C termini aligned on line. But I strongly discourage that and would argue for protein feature based routes.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-08T17:07:17.520Z
Answers.Text: Thanks for the suggestions. I get some more information but I think I could not get the specific answer. My main problem is this: I have my human protein targets (around 500) as gene names (like EGFR and so on). I also do not mind info from other species as I can input this species info into model as well. I want to develop ML model and predict compound hits for each protein if possible. For this, I need to have structural data for each protein. I want to be able to get it with an R or Python script of possible. If you know of such software or tutorial over a script, I would be glad to hear.
Answers.UserDisplayName: entropy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-09T08:21:03.753Z
Answers.Text: In which case. Download the [Swiss-model](https://swissmodel.expasy.org/repository) collection and see if it suits. It runs off Uniprot IDs, so [here is a JSON file](https://github.com/matteoferla/Michelanglo-data/blob/master/dictionary/taxid9606-names2uniprot.json), containing a dictionary with key=names and value=uniprot id. As mentioned the Swiss-model file contains both the renumbered structures and threaded structures (=close homologue structures converted to that species basically).
Answers.UserDisplayName: Matteo Ferla
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-09T08:30:40.597Z
Answers.Text: In terms of your application, I am not sure what you mean by "compound hits". You mean `epistatic mutations` (_i.e._ one residue change alleviates the strain from another mutation) or is it a typo of `compound het`? I am assuming the former as the latter makes less sense. To calculate the &Delta;&Delta;G (the energy of being folding) of a mutation you need forcefield calculations (I'd recommend looking into Rosetta `pmut_scan` as that has double mutations too. Not sure how ML fits in, but that is your remit. Although it does sound like Tom Blundell's [SDM](http://marid.bioc.cam.ac.uk/sdm2).
Answers.UserDisplayName: Matteo Ferla
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-10T16:16:37.497Z
Answers.Text: I think the JSON file helps answering my question, thanks, and I will accept that. Regarding second comment, there may be a confusion. I am trying to find ligands that bind to my target proteins.
Answers.UserDisplayName: entropy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-10T16:54:35.343Z
Answers.Text: Ha. That's funny and awkward for me. I talk to folk doing Fragment based screening most days and they say compound hit all the time and I didn't click that it was that. Sorry.
Answers.UserDisplayName: Matteo Ferla
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-08T14:17:19.303Z
Answers.LastActivityDate: 2019-10-08T14:17:19.303Z
Answers.UserDisplayName: Matteo Ferla
Body: <p>I have a list of around 500 protein targets (human). I only have their protein symbols. As an example:</p>
  
  <p>EGFR
  AR
  FOXA1
  CXCR3
  ...</p>
  
  <p>I want to get structural data (atomic coordinate) from PDB (Protein Data Bank) at once, either programmatically (Python or R) or with a web api. Do you know a clear step by step tutorial for this task or code example?</p>
  
  <p>If that is not available, at least I need to find the PDB IDs of my list of protein symbols at once.</p>
  
  <p>thanks</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-09-10T20:53:57.617Z
Comments.Text: Biopython PDB is a good start together with associated documents. It is better to describe the list of proteins for a more detailed answer
Comments.UserDisplayName: M__
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-09-10T21:12:13.817Z
Comments.Text: What do you mean by a "protein symbol"?
Comments.UserDisplayName: jgreener
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-09-10T21:23:06.320Z
Comments.Text: I mean they are like gene symbols. For example, CXCR3, EGFR and so on.
Comments.UserDisplayName: entropy
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-09-10T23:38:20.777Z
Comments.Text: I think I should have mentioned you @jgreener
Comments.UserDisplayName: entropy
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-09-11T08:33:01.787Z
Comments.Text: Please [edit] your question and add a few lines of your input file with the list of proteins. That way, we can use that to test our answers and we can know what kind of IDs you have. Also, if all you have are things like CXCR3, so gene names and not protein IDs, we will need to know the species.
Comments.UserDisplayName: terdon
Tags: <bioconductor><python><protein-structure><pdb>
Title: I have a list of protein targets. How to get structural data (atomic coordinate) from PDB?
ThreadText: # I have a list of protein targets. How to get structural data (atomic coordinate) from PDB?
  
  (Asked by: username_0 on 2019-09-10)
  
  I have a list of around 500 protein targets (human). I only have their protein symbols. As an example:
  
  EGFR
  AR
  FOXA1
  CXCR3
  ...
  
  I want to get structural data (atomic coordinate) from PDB (Protein Data Bank) at once, either programmatically (Python or R) or with a web api. Do you know a clear step by step tutorial for this task or code example?
  
  If that is not available, at least I need to find the PDB IDs of my list of protein symbols at once.
  
  thanks
  
  **Tags:** bioconductor, python, protein-structure, pdb
  
  > **Comments:**
  > **username_1**: Biopython PDB is a good start together with associated documents. It is better to describe the list of proteins for a more detailed answer  
  > **username_2**: What do you mean by a "protein symbol"?  
  > **username_0**: I mean they are like gene symbols. For example, CXCR3, EGFR and so on.  
  > **username_0**: I think I should have mentioned you @username_2  
  > **username_3**: Please [edit] your question and add a few lines of your input file with the list of proteins. That way, we can use that to test our answers and we can know what kind of IDs you have. Also, if all you have are things like CXCR3, so gene names and not protein IDs, we will need to know the species.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2019-10-08. Score: 2 | Accepted answer
  
  There is not a simple way and there are factor that you also need to consider before starting.
  
  1. Are you using gene names or gene accession numbers/id (NCBI/Uniprot)?
  2. If not, are the names the current standard ones (*e.g.* scraped names from old papers is a definite no)
  3. PDB residue index is rarely the same as protein index.
  4. Do you want a perfect match or do you want say 80% homology?
  5. Which PDBs do you want for a protein?
  
  ## Personal example
  
  For a website I have developed I have a route that gets all the PDBs for a given gene. ([enter link description here](https://michelanglo.sgc.ox.ac.uk/name)). The way I did it is that I parsed Uniprot using a [custom parser](https://github.com/username_4/protein-module-for-VENUS) and made a dictionary/DB for each species with many synonyms for a gene going to a Uniprot ID and then from there I have another dictionary/DB that goes from Uniprot to PDBs if any. I went for Uniprot as I needed other data too (e.g. features) to present to the user. Including a renumbering option.
  All this is way overkill for what you need. However, if you specify the species I can easily share a JSON file online.
  
  ## SIFTs
  
  If point 3 is important and you have Uniprot IDs I would suggest going with [SIFTs](https://www.ebi.ac.uk/pdbe/docs/sifts/). It has the offsets and has mapping for Uniprot IDs (pdb\_chain\_uniprot.tsv).
  
  ## Gene names
  
  In terms of mapping gene names to NCBI/Uniprot/Ensembl IDs, there are mapping tables everywhere. But if you may have obscure synonyms, using the NCBI API is a good option.
  Uniprot data is better for protein and has PDB codes and chains, but the API gives a XML reply which is a bit annoying (I wrote a parser for it, but I think there was going to be one in Biopython).
  
  ## Homologues
  
  If you would like homologues, say your organism is human and you are okay with mouse, you can either use the threaded SwissModel models or use the blast query in RCSB PDB (not the PDBe, which has better data normally) or NCBI set to PDB database.
  Swissmodel actually contains also PDB structures, so that may be a good starting point if your organism is [one of those where precompiled exists](https://swissmodel.expasy.org/repository).
  
  ## Parts
  
  Some proteins, especially mammalian are formed by separate domains linked together, especially the docking scaffolds. In which case you may care for a specific model within the gene, hence the indexing issue and the potential getting features.
  If you want a single PDB structure for each gene and do not care about the technical I have [some Pymol-using py3 code](https://github.com/username_4/protein_fuser) to fuse models together with the N and C termini aligned on line. But I strongly discourage that and would argue for protein feature based routes.
  
  > **Comments:**
  > **username_0**: Thanks for the suggestions. I get some more information but I think I could not get the specific answer. My main problem is this: I have my human protein targets (around 500) as gene names (like EGFR and so on). I also do not mind info from other species as I can input this species info into model as well. I want to develop ML model and predict compound hits for each protein if possible. For this, I need to have structural data for each protein. I want to be able to get it with an R or Python script of possible. If you know of such software or tutorial over a script, I would be glad to hear.  
  > **username_4**: In which case. Download the [Swiss-model](https://swissmodel.expasy.org/repository) collection and see if it suits. It runs off Uniprot IDs, so [here is a JSON file](https://github.com/username_4/Michelanglo-data/blob/master/dictionary/taxid9606-names2uniprot.json), containing a dictionary with key=names and value=uniprot id. As mentioned the Swiss-model file contains both the renumbered structures and threaded structures (=close homologue structures converted to that species basically).  
  > **username_4**: In terms of your application, I am not sure what you mean by "compound hits". You mean `epistatic mutations` (_i.e._ one residue change alleviates the strain from another mutation) or is it a typo of `compound het`? I am assuming the former as the latter makes less sense. To calculate the &Delta;&Delta;G (the energy of being folding) of a mutation you need forcefield calculations (I'd recommend looking into Rosetta `pmut_scan` as that has double mutations too. Not sure how ML fits in, but that is your remit. Although it does sound like Tom Blundell's [SDM](http://marid.bioc.cam.ac.uk/sdm2).  
  > **username_0**: I think the JSON file helps answering my question, thanks, and I will accept that. Regarding second comment, there may be a confusion. I am trying to find ligands that bind to my target proteins.  
  > **username_4**: Ha. That's funny and awkward for me. I talk to folk doing Fragment based screening most days and they say compound hit all the time and I didn't click that it was that. Sorry.  
  
  ---
  
  