Uniprot Accession and Position to peptide sequence
2
0
Entering edit mode
7.9 years ago
desc • 0

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?

uniprot R peptide • 1.8k views
ADD COMMENT
2
Entering edit mode
7.9 years ago

Try:

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode
7.9 years ago

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, http://www.uniprot.org/uploadlists

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

>sp|P02699|306-316
YIMMNKQFRNC
>sp|P02699|308-318
MMNKQFRNCMV
>sp|P02699|309-319
MNKQFRNCMVT
ADD COMMENT

Login before adding your answer.

Traffic: 2514 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6