How To Get All Different Variants Of A Peptide?
2
0
Entering edit mode
11.8 years ago
Panos ★ 1.8k

I have a peptide like this

SNINNIING

Let's suppose that for 2 of the positions I have alternative amino acids. For example, the first "S" could be "T" and the last "G" could be "E". This means that I can have 3 alternative peptides

TNINNIING (S -> T)
SNINNIINE (G -> E)
TNINNIINE (both)

Is there a way to get these additional peptides using Perl? My problems begin when I have 3 or more alternative amino acids, because otherwise I could it by hand!

perl • 2.7k views
ADD COMMENT
1
Entering edit mode

The title of your question suggests that you want to know how to permute any peptide sequence to any other sequence of the same length. Is that correct?

ADD REPLY
0
Entering edit mode

Yes, but the permutations are not random. I know that, for example I only have T instead of S. It's like I have a peptide with ambiguities

  [TS]NINNIIN[GE]

and want to obtain all 4 possible combinations.

ADD REPLY
0
Entering edit mode

Not related to the question, but I can't see your entire comment Neilfws... If I go to my profile and then to messages, I see sentences that I can't see here.

ADD REPLY
0
Entering edit mode

Yes; original comment was different, I edited it but the old one still shows in message feeds. I don't know why.

ADD REPLY
1
Entering edit mode
ADD COMMENT
1
Entering edit mode
11.8 years ago
Woa ★ 2.9k

use strict; use warnings; use Regexp::Genex qw(:all); my $regex="(T|S)NINNIIN(G|E)"; print $_,"\n" for strings($regex);

produces the following output:

TNINNIING
TNINNIINE
SNINNIING
SNINNIINE
ADD COMMENT
0
Entering edit mode

I wonder why this code formats correctly in preview but not when posted?

ADD REPLY
0
Entering edit mode

Thanks Woa! I installed the module and worked like a charm!

ADD REPLY

Login before adding your answer.

Traffic: 2785 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