Bioinformatics/Global alignment: Difference between revisions
m
→{{header|Raku}}: Thanks SqrtNegInf for the Rakuish uplifts ; some obsessive but insignificant changes ; it seems a little bit slower with the default topic array variable ?
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: more idiomatic) |
m (→{{header|Raku}}: Thanks SqrtNegInf for the Rakuish uplifts ; some obsessive but insignificant changes ; it seems a little bit slower with the default topic array variable ?) |
||
Line 515:
sub printCounts(\seq) {
my
say "\nNucleotide counts for ", seq, " :";
say
}
Line 524:
S1 = s1.substr: $offset ;
with S1.index(s2.substr(0,1)) -> $p { $offset += $p } else { return False }
}
}
Line 537 ⟶ 536:
sub shortestCommonSuperstring {
my \ß = $ = [~] my @ss = deduplicate @_ ; # ShortestSuper
for @ss.permutations -> @perm {
my \sup = $ = @perm[0];
for @perm.rotor(2 => -1)
ß = sup if sup.chars < ß.chars ;
}
|