Created
November 16, 2015 16:24
-
-
Save TamaDP/0d990c348f62d0bb5e66 to your computer and use it in GitHub Desktop.
Trying format for output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
use strict; | |
use warnings; | |
my (@proteins, @peptides); | |
my ($protein, $i, $j); | |
@proteins = qw( | |
DAAAAATTLTTTAMTTTTTTCKMMFRPPPPPGGGGGGGGGGGG | |
ALTAMCMNVWEITYHKGSDVNRRASFAQPPPQPPPPLLAIKPASDASD | |
DAAAAATTLTTTAMTTTTTTCK | |
); | |
for $protein (@proteins) { | |
@peptides = split /(?<=[KR])(?!P)/, $protein; | |
} | |
for (@proteins){ | |
for ($i=0, $i<@proteins, $i++){ | |
print "> Protein: $i|Peptide: | No cleavages\n"; | |
print "$_\n" for @peptides; | |
} | |
} | |
#Prints 9 times: | |
#> Protein: 1|Peptide: | No cleavages | |
#DAAAAATTLTTTAMTTTTTTCK |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment