Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
GLR fix for grph-grondilu.pl
  • Loading branch information
stmuk committed Sep 24, 2015
1 parent 6503bbe commit dbb1158
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions categories/rosalind/grph-grondilu.pl
Expand Up @@ -44,14 +44,15 @@ END

sub MAIN($input-file = Nil) {
my $input = !$input-file ?? $default-data !! $input-file.IO.slurp;
my %dna = gather for

my %dna = (gather for
$input.match(/ ^^ '>Rosalind_' (<digit> **4) \n (<[\nACGT]>*) /, :g) {
take ~.[0], ~.[1].subst(/\n/,'', :g);
}
})>>.list.flat;

for (%dna X %dna).flat -> $a, $b {
next if $a.key eq $b.key;
say 'Rosalind_' «~« ($a, $b.key
print " {'Rosalind_' «~« ($a, $b.key}"
if $a.value.substr(*-3) eq $b.value.substr(0, 3);
}
}
Expand Down

0 comments on commit dbb1158

Please sign in to comment.