<p>Consider the circumstances in which entries will have more than one accession (taken from the same page you linked in the original post).</p>
<blockquote>
<p>Entries will have more than one accession number if they have been merged or split. For example, when two entries are merged into one, the accession numbers from both entries are stored in the AC line(s).</p>
<p>If an existing entry is split into two or more entries (a rare occurrence), the original accession numbers are retained in all the derived entries and a new primary accession number is added to all the entries.</p>
</blockquote>
<p>As mentioned in the comments, this <em>does not</em> imply that there is or should be a single &quot;primary&quot; UniProt accession associated with (for example) an Ensembl gene ID. In some cases, a single protein record may have multiple accessions due to annotation changes, and the suggestion from your original post is to only report the primary accession. However, there may be multiple proteins associated with an Ensembl gene ID, and each protein will have its own accession (or set of accessions).</p>
<p>Choosing a single representative isoform for a gene is an entirely different question.</p>

CC BY-SA 3.0
2017-09-06T20:22:17.557Z
2017-09-06T20:22:17.557Z
2020-06-18T08:30:41.743Z
Daniel Standage
<p>Not with no other information, no. There is no way of looking at a list of accessions and guessing which one is primary. Primary accessions are just accessions like any other; they don't have any specific characteristics. </p>

<p>This is further complicated by the fact that each gene can (and usually does, for higher eukaryotes) have multiple transcripts, each of which can produce a different protein product. So in order to go from gene identifier to a protein, you need to first find the relevant transcript. </p>

<p>So, as a first step, get the primary transcript IDs for each of your genes and then retrieve the protein accessions associated to them. </p>

CC BY-SA 3.0
2017-09-07T16:04:08.560Z
2017-09-07T16:11:13.207Z
2017-09-07T16:11:13.207Z
terdon
<p>Reposting my answer from the <a href="https://biology.stackexchange.com/questions/65595/how-to-determine-the-primary-uniprot-accession-number-from-a-list-of-accession-n/65606#65606%22related%20ticket%20in%20the%20Biology%20section%22">related ticket in the Biology section</a>:</p>

<p>I think there is an issue with the terminology. The "primary" accession number, is the first accession number in cases where an entry has more than one accession number, as described in <a href="http://www.uniprot.org/help/accession_numbers" rel="nofollow noreferrer">http://www.uniprot.org/help/accession_numbers</a>:</p>

<blockquote>
  <p>Entries can have more than one accession number. This can be due to
  two distinct mechanisms:</p>

<pre><code>a) When two or more entries are merged, the accession numbers from all entries are kept. The first accession number is referred to as the
</code></pre>
  
  <p>‘Primary (citable) accession number’, while the others are referred to
  as ‘Secondary accession numbers’. These are listed in alphanumerical
  order.</p>

<pre><code>b) If an existing entry is split into two or more entries (‘demerged’), new ‘primary’ accession numbers are attributed to all
</code></pre>
  
  <p>the split entries while all original accession numbers are retained as
  ‘secondary’ accession numbers.</p>
  
  <p>Example: P29358 which has been ‘demerged’ into P68250 and P68251.</p>
</blockquote>

<p>Both reviewed and unreviewed entries can have primary accession numbers.</p>

<p>What you probably mean, as previous posters understood, are accession numbers of reviewed entries as opposed to unreviewed ones.</p>

<p>In that case, you can indeed add "reviewed:yes" to your query, e.g. when you are using the UniProt ID mapping, <a href="http://www.uniprot.org/help/uploadlists" rel="nofollow noreferrer">http://www.uniprot.org/help/uploadlists</a></p>

CC BY-SA 3.0
2017-09-08T08:12:31.687Z
2017-09-08T08:12:31.687Z
Elisabeth.Gasteiger
<p>Given a list of Uniprot IDs that are linked to an Ensembl gene ID, is there a way to systematically determine the UniProt accession corresponding to the protein product of the gene's primary transcript <strong>with no other information</strong>? </p>

<p><a href="http://web.expasy.org/docs/userman.html#AC_line" rel="nofollow noreferrer">According to ExPasy</a></p>

<blockquote>
  <p>Researchers who wish to cite entries in their publications should
  always cite the first accession number. This is commonly referred to
  as the 'primary accession number'. 'Secondary accession numbers' are
  sorted alphanumerically.</p>
</blockquote>

<p>But what if the order has been jumbled or compiled from a different source and resorted?</p>

<p>For example:</p>

<p>Ensembl:</p>

<p>ENSMUSG00000035642</p>

<p>Uniprot: </p>

<p>Q8R0P4, Q8CF11, D6RJK8, D6RJJ4, D3Z442, D3Z1Q3, D3YZD8, D3YY39, D3YX09, D3YWY5</p>

<p><a href="https://biology.stackexchange.com/questions/65595/how-to-determine-the-primary-uniprot-accession-number-from-a-list-of-accession-n/65606#65606%22related%20ticket%20in%20the%20Biology%20section%22">This question is cross listed on the Biology stack-exchange.</a></p>

CC BY-SA 3.0
2017-09-06T11:57:52.963Z
If I understand this correctly, each Uniprot entry has the same primary accession number (which you can find in the "Entry Information" tab of the Uniprot entry; ctrl+f "primary"). Some of the IDs that you give here describe different sequences (which thus have different Uniprot entries and different primary accession numbers). I have checked the first 5 IDs you show here. They all map to different sequences, and **should** have different accession numbers. They are isoforms, mutated or truncated sequences and God knows what else, but they are definitely not the same protein sequence.
galicae
CC BY-SA 3.0
2017-09-06T12:05:46.117Z
I never claimed these are representative of the same protein squence. The question above states: _Given a list of Uniprot IDs that are linked to an Ensembl ID_
James Draper
CC BY-SA 3.0
2017-09-06T15:04:29.773Z
No, you didn't :) What I am trying to say is that the way I understand it there shouldn't be an 1:1 mapping between Ensembl and UniProt in the first place. They describe different things. Am I missing something? It seems to me like you are trying to pick one protein ID to connect to one gene ID.
galicae
CC BY-SA 3.0
2017-09-06T15:31:52.650Z
@galicae didn't do what? I'm trying to determine if there is a simple procedure to identify the primary Uniprot accession number from a list of associated accession numbers with no other outside information. I don't think I can state it more clearly.
James Draper
CC BY-SA 3.0
2017-09-07T09:26:34.790Z
@JamesDraper do you mean the primary UniProt accession of the protein product of the primary transcript associated with that gene? Or do you mean the primary UniProt accession of each of the protein isoforms encoded by the gene? Please [edit] your question and clarify what you need since there is often (usually) a one-to-many relationship between genes and proteins.
terdon
CC BY-SA 3.0
2017-09-07T13:59:59.360Z
@JamesDraper you said you "never claimed these are representative". I agreed :)
galicae
CC BY-SA 3.0
2017-09-07T14:59:30.400Z
@terdon the first option you mentioned. Feel free to edit the post as you see fit.
James Draper
CC BY-SA 3.0
2017-09-07T14:59:48.967Z
@galicae I'm glad that we are on the same page.
James Draper
CC BY-SA 3.0
2017-09-07T15:05:28.197Z
@JamesDraper OK, and how do you need to do this? Manually? Does it need to be scalable to hundreds of accessions? You mention "no other information", does that mean that going from the Ensembl Gene ID, to the Ensembl Transcript ID for the primary transcript and then getting the UniProt accession(s) associated with that is not an option?
terdon
CC BY-SA 3.0
2017-09-07T15:20:41.777Z
@terdon honestly I was was hoping that this question had a simple obvious answer that I just didn't know like: sort in in descending order and take the first member of that list. Or if the something like the primary accession could be recognized by  some kind of special regex. However it has become abundantly clear that the answer to the question is no there is no way to determine the primary accession from the a list of associated accession numbers with **no outside info**. If anyone would like to restate that as answer I'll accept and upvote.
James Draper
<proteins><public-databases><identifiers>
How to determine the primary Uniprot accession number from a set of accession numbers?
# How to determine the primary Uniprot accession number from a set of accession numbers?

(Asked by: username_0 on 2017-09-05)

Given a list of Uniprot IDs that are linked to an Ensembl gene ID, is there a way to systematically determine the UniProt accession corresponding to the protein product of the gene's primary transcript **with no other information**?

[According to ExPasy](http://web.expasy.org/docs/userman.html#AC_line)

> Researchers who wish to cite entries in their publications should
> always cite the first accession number. This is commonly referred to
> as the 'primary accession number'. 'Secondary accession numbers' are
> sorted alphanumerically.

But what if the order has been jumbled or compiled from a different source and resorted?

For example:

Ensembl:

ENSMUSG00000035642

Uniprot:

Q8R0P4, Q8CF11, D6RJK8, D6RJJ4, D3Z442, D3Z1Q3, D3YZD8, D3YY39, D3YX09, D3YWY5

[This question is cross listed on the Biology stack-exchange.](https://biology.stackexchange.com/questions/65595/how-to-determine-the-primary-uniprot-accession-number-from-a-list-of-accession-n/65606#65606%22related%20ticket%20in%20the%20Biology%20section%22)

**Tags:** proteins, public-databases, identifiers
> **Comments:**
> **username_1**: If I understand this correctly, each Uniprot entry has the same primary accession number (which you can find in the "Entry Information" tab of the Uniprot entry; ctrl+f "primary"). Some of the IDs that you give here describe different sequences (which thus have different Uniprot entries and different primary accession numbers). I have checked the first 5 IDs you show here. They all map to different sequences, and **should** have different accession numbers. They are isoforms, mutated or truncated sequences and God knows what else, but they are definitely not the same protein sequence.  
> **username_0**: I never claimed these are representative of the same protein squence. The question above states: _Given a list of Uniprot IDs that are linked to an Ensembl ID_  
> **username_1**: No, you didn't :) What I am trying to say is that the way I understand it there shouldn't be an 1:1 mapping between Ensembl and UniProt in the first place. They describe different things. Am I missing something? It seems to me like you are trying to pick one protein ID to connect to one gene ID.  
> **username_0**: @galicae didn't do what? I'm trying to determine if there is a simple procedure to identify the primary Uniprot accession number from a list of associated accession numbers with no other outside information. I don't think I can state it more clearly.  
> **username_2**: @JamesDraper do you mean the primary UniProt accession of the protein product of the primary transcript associated with that gene? Or do you mean the primary UniProt accession of each of the protein isoforms encoded by the gene? Please [edit] your question and clarify what you need since there is often (usually) a one-to-many relationship between genes and proteins.  
> **username_1**: @JamesDraper you said you "never claimed these are representative". I agreed :)  
> **username_0**: @terdon the first option you mentioned. Feel free to edit the post as you see fit.  
> **username_0**: @galicae I'm glad that we are on the same page.  
> **username_2**: @JamesDraper OK, and how do you need to do this? Manually? Does it need to be scalable to hundreds of accessions? You mention "no other information", does that mean that going from the Ensembl Gene ID, to the Ensembl Transcript ID for the primary transcript and then getting the UniProt accession(s) associated with that is not an option?  
> **username_0**: @terdon honestly I was was hoping that this question had a simple obvious answer that I just didn't know like: sort in in descending order and take the first member of that list. Or if the something like the primary accession could be recognized by  some kind of special regex. However it has become abundantly clear that the answer to the question is no there is no way to determine the primary accession from the a list of associated accession numbers with **no outside info**. If anyone would like to restate that as answer I'll accept and upvote.  

---

## 3 answers

### Answer by username_4 on 2017-09-08. Score: 4 | Accepted answer

Reposting my answer from the related ticket in the Biology section:
I think there is an issue with the terminology. The "primary" accession number, is the first accession number in cases where an entry has more than one accession number, as described in http://www.uniprot.org/help/accession_numbers:

Entries can have more than one accession number. This can be due to
  two distinct mechanisms:
a) When two or more entries are merged, the accession numbers from all entries are kept. The first accession number is referred to as the

‘Primary (citable) accession number’, while the others are referred to
  as ‘Secondary accession numbers’. These are listed in alphanumerical
  order.
b) If an existing entry is split into two or more entries (‘demerged’), new ‘primary’ accession numbers are attributed to all

the split entries while all original accession numbers are retained as
  ‘secondary’ accession numbers.
Example: P29358 which has been ‘demerged’ into P68250 and P68251.

Both reviewed and unreviewed entries can have primary accession numbers.
What you probably mean, as previous posters understood, are accession numbers of reviewed entries as opposed to unreviewed ones.
In that case, you can indeed add "reviewed:yes" to your query, e.g. when you are using the UniProt ID mapping, http://www.uniprot.org/help/uploadlists


---

### Answer by username_3 on 2017-09-06. Score: 3

Consider the circumstances in which entries will have more than one accession (taken from the same page you linked in the original post).

> Entries will have more than one accession number if they have been merged or split. For example, when two entries are merged into one, the accession numbers from both entries are stored in the AC line(s).
>
> If an existing entry is split into two or more entries (a rare occurrence), the original accession numbers are retained in all the derived entries and a new primary accession number is added to all the entries.

As mentioned in the comments, this *does not* imply that there is or should be a single "primary" UniProt accession associated with (for example) an Ensembl gene ID. In some cases, a single protein record may have multiple accessions due to annotation changes, and the suggestion from your original post is to only report the primary accession. However, there may be multiple proteins associated with an Ensembl gene ID, and each protein will have its own accession (or set of accessions).

Choosing a single representative isoform for a gene is an entirely different question.


---

### Answer by username_2 on 2017-09-07. Score: 0

Not with no other information, no. There is no way of looking at a list of accessions and guessing which one is primary. Primary accessions are just accessions like any other; they don't have any specific characteristics.

This is further complicated by the fact that each gene can (and usually does, for higher eukaryotes) have multiple transcripts, each of which can produce a different protein product. So in order to go from gene identifier to a protein, you need to first find the relevant transcript.

So, as a first step, get the primary transcript IDs for each of your genes and then retrieve the protein accessions associated to them.


---

