Skip to content

Commit 2634fbb

Browse files
author
grondilu
committed
Merge pull request #8 from grondilu/master
MPRT rosalind solution
2 parents 4d410e6 + 4f9bdb0 commit 2634fbb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

rosalind/mprt-grondilu.pl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
use v6;
2+
3+
my $N-glycosylation = rx / N <-[P]> <[ST]> <-[P]> /;
4+
for $*IN.lines -> $id {
5+
my $fasta = qqx{wget -O - -q "http://www.uniprot.org/uniprot/$id.fasta"};
6+
given join '', grep /^ <.alpha>+ $/, $fasta.split: "\n" {
7+
if $N-glycosylation {
8+
say $id;
9+
say gather for m:overlap/$N-glycosylation/ { take .from + 1}
10+
}
11+
}
12+
}
13+
14+
# vim: ft=perl6

0 commit comments

Comments
 (0)