<p>Since you are already on UniProtKB, the simplest way will be if you add this information to the output table and download it as a that you can import and filter in R.</p>

<p>To get additional annotations, click the button labelled "Columns" on top of the UniPortKB website. 
<a href="https://i.sstatic.net/gQdsF.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/gQdsF.jpg" alt="UniProt button row"></a><br>
This allows you to add a wide variety of annotations such as subcellular location to the output. Tick the checkmark for subcellular location and save on the top right.<br>
<a href="https://i.sstatic.net/HDAP1.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/HDAP1.jpg" alt="UniProtKB column selection"></a><br>
Then you can download the proteome-wide annotation for example as a tab-separated list using the "Download" dialog next to the "Columns" selection. This list can be imported into R.</p>

CC BY-SA 4.0
2019-07-30T20:25:45.510Z
Hi PPK,Thanks for the information on how to download the subcellular location info from UniProtKB. The file seems very large to be downloaded. I am in the process of downloading.
Jun
CC BY-SA 4.0
2019-07-30T15:42:38.377Z
2019-07-30T15:42:38.377Z
PPK
<p>After my post of the question, I went to try the UniProt.ws package in the RStudio again. I realized that there is a mistake in the example code in the package. The up object is from a human database, but the keys the example provides are the ENTRZID from mouse proteins. When I tried human ENTRZID numbers, it worked. The only problem for the select method in the UniProt.ws is that it can't retrieve the protein information for a large batch of proteins. The maximum number that worked for me is about 80 proteins per time.</p>

CC BY-SA 4.0
2019-07-30T20:31:44.323Z
2019-07-30T20:31:44.323Z
Jun
<p>I have a list of proteins with their gene names/symbols. I would like to identify which of them are extracellular proteins or plasma membrane proteins. </p>

<p>I can get this information in UniprotKB by searching the proteins one by one. Because I have hundreds of proteins, I wonder whether I can do a systematic search of the UniprotKB in RStudio. I tried the UniProt.ws select method. But I couldn't even get the example code in the package work. I downloaded the uniprot_sprot.dat file. But I don't know how to read this file correctly in RStudio. I used tab-delimited format. It turned out there is only one variable in the file. </p>

<p>Can anybody tell me what I should do to solve the problem? I am pretty new to any computer languages. </p>

CC BY-SA 4.0
2019-07-29T19:51:53.933Z
Can you give us an example ID and where on the UniProt website you see the field you're looking for? Examples always help make the question more specific and grounded.
Ram RS
CC BY-SA 4.0
2019-07-30T07:18:01.860Z
Welcome to the site. I edited a bit the question to make it easier to find it and read. You could use gene ontology cellular component to know where a protein can end. Also, show how did you try to read the file and why did you download that file? I couldn't find anywhere that it has the information you seek.
llrs
<r><sequence-annotation><uniprot>
How to retrieve the subcellular location info from uniprot?
# How to retrieve the subcellular location info from uniprot?

(Asked by: username_0 on 2019-07-29)

I have a list of proteins with their gene names/symbols. I would like to identify which of them are extracellular proteins or plasma membrane proteins.

I can get this information in UniprotKB by searching the proteins one by one. Because I have hundreds of proteins, I wonder whether I can do a systematic search of the UniprotKB in RStudio. I tried the UniProt.ws select method. But I couldn't even get the example code in the package work. I downloaded the uniprot\_sprot.dat file. But I don't know how to read this file correctly in RStudio. I used tab-delimited format. It turned out there is only one variable in the file.

Can anybody tell me what I should do to solve the problem? I am pretty new to any computer languages.

**Tags:** r, sequence-annotation, uniprot
> **Comments:**
> **username_1**: Can you give us an example ID and where on the UniProt website you see the field you're looking for? Examples always help make the question more specific and grounded.  
> **username_2**: Welcome to the site. I edited a bit the question to make it easier to find it and read. You could use gene ontology cellular component to know where a protein can end. Also, show how did you try to read the file and why did you download that file? I couldn't find anywhere that it has the information you seek.  

---

## 2 answers

### Answer by username_3 on 2019-07-30. Score: 2

Since you are already on UniProtKB, the simplest way will be if you add this information to the output table and download it as a that you can import and filter in R.

To get additional annotations, click the button labelled "Columns" on top of the UniPortKB website.
[![UniProt button row](https://i.sstatic.net/gQdsF.jpg)](https://i.sstatic.net/gQdsF.jpg)  
This allows you to add a wide variety of annotations such as subcellular location to the output. Tick the checkmark for subcellular location and save on the top right.  
[![UniProtKB column selection](https://i.sstatic.net/HDAP1.jpg)](https://i.sstatic.net/HDAP1.jpg)  
Then you can download the proteome-wide annotation for example as a tab-separated list using the "Download" dialog next to the "Columns" selection. This list can be imported into R.

> **Comments:**
> **username_0**: Hi PPK,Thanks for the information on how to download the subcellular location info from UniProtKB. The file seems very large to be downloaded. I am in the process of downloading.  

---

### Answer by username_0 on 2019-07-30. Score: 0

After my post of the question, I went to try the UniProt.ws package in the RStudio again. I realized that there is a mistake in the example code in the package. The up object is from a human database, but the keys the example provides are the ENTRZID from mouse proteins. When I tried human ENTRZID numbers, it worked. The only problem for the select method in the UniProt.ws is that it can't retrieve the protein information for a large batch of proteins. The maximum number that worked for me is about 80 proteins per time.


---

