Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
GLR fixes for cons-grondilu.pl, itwv-grondilu.pl and mprt-grondilu.pl
  • Loading branch information
stmuk committed Sep 24, 2015
1 parent 6ee4669 commit 6503bbe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion categories/rosalind/cons-grondilu.pl
Expand Up @@ -60,6 +60,6 @@
take <A C G T>[$_] given first { @profile[$_][c] == $max }, ^4;
}

say .key, ': ', @profile[.value] for enum <A C G T>.sort;
say [~] .key, ': ', @profile[.value] for enum <A C G T>.sort;

# vim: expandtab shiftwidth=4 ft=perl6
3 changes: 2 additions & 1 deletion categories/rosalind/itwv-grondilu.pl
Expand Up @@ -43,11 +43,12 @@ ($a, $b)

my %seen;
for @motif -> $a {
say gather for @motif -> $b {
my @arr = gather for @motif -> $b {
my @interwove = interwove($a, $b).unique;
take %seen{sort($a, $b).join(':')} //=
+so grep rx/ <@interwove> /, $dna;
}
say "{@arr}"
}

# vim: expandtab shiftwidth=4 ft=perl6
3 changes: 2 additions & 1 deletion categories/rosalind/mprt-grondilu.pl
Expand Up @@ -45,7 +45,8 @@ ($input-file = Nil)
given join '', grep /^ <.alpha>+ $/, $fasta.split: "\n" {
if $N-glycosylation {
say $id;
say gather for m:overlap/$N-glycosylation/ { take .from + 1}
my @arr = gather for m:overlap/$N-glycosylation/ { take .from + 1}
say "{@arr}"
}
}
}
Expand Down

0 comments on commit 6503bbe

Please sign in to comment.