Question: Uniprot Accession and Position to peptide sequence
gravatar for desc
3.8 years ago by
desc0 wrote:

I have a data frame of Uniprot Accessions and amino acid positions within each represented protein. I would like to extract a peptide of some length (lets say +/- 5 amino acids, total length of 11 residues), from Uniprot surrounding each position.

Example: Accession_position: P02699_311 Result: YIMMNKQFRNC

I've seen similar posts, but no solutions pertaining to solving this issue. Does anyone have hints for where to look to solve this, or better yet a solution already?

peptide uniprot R • 1.1k views
ADD COMMENTlink modified 3.8 years ago by Elisabeth Gasteiger1.7k • written 3.8 years ago by desc0
gravatar for Jean-Karim Heriche
3.8 years ago by
EMBL Heidelberg, Germany
Jean-Karim Heriche21k wrote:


use strict;
use warnings;
use Bio::DB::SwissProt;

my $pos = 311;
my $gb = new Bio::DB::SwissProt(); 
my $seqObj = $gb->get_Seq_by_id('P02699');
my $seq = $seqObj->seq();
my $peptide = substr($seq,$pos-6,11);
ADD COMMENTlink modified 3.8 years ago • written 3.8 years ago by Jean-Karim Heriche21k

Thanks! We ended up using a C script, but this worked well, and could be adapted with a for loop to run over a larger file.

ADD REPLYlink written 3.8 years ago by desc0
gravatar for Elisabeth Gasteiger
3.8 years ago by
Elisabeth Gasteiger1.7k wrote:

You have solved your problem, but just in case it may be useful for others: You could write a script to transform your "identifiers" from P02699_311 to P02699[306-316] and then submit the resulting lists to the batch retrieve service on the UniProt website,

You can download the results in various formats, including FASTA (select "source list"), which looks like this:

ADD COMMENTlink written 3.8 years ago by Elisabeth Gasteiger1.7k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1862 users visited in the last hour