-
-
Save lmmx/15ca4ae2445544f92394 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
use strict; | |
use warnings; | |
my $n_missed_cleavages = 0; | |
my @proteins = qw( | |
DAAAAATTLTTTAMTTTTTTCKMMFRPPPPPGGGGGGGGGGGG | |
ALTAMCMNVWEITYHKGSDVNRRASFAQPPPQPPPPLLAIKPASDASD | |
DAAAAATTLTTTAMTTTTTTCK | |
); | |
my $n_proteins = scalar @proteins; | |
print "Processing $n_proteins proteins\n"; | |
for my $i (0..$#proteins) { | |
my $printed_i = $i+1; | |
print "Protein: $printed_i\n"; | |
my $protein = $proteins[$i]; | |
my @peptides = split /(?<=[KR])(?!P)/, $protein; | |
my $j; | |
print scalar @peptides . " peptides for protein $printed_i\n"; | |
for my $j (0..$#peptides) { | |
my $printed_j = $j+1; | |
print "> Protein: $printed_i|Peptide:$printed_j| $n_missed_cleavages cleavages\n"; | |
print "$peptides[$j]\n"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment