从基因字符串创建字符表
作者:L. Grondin
http://rosalind.info/problems/cstr/
示例输入
ATGCTACC CGTTTACC ATTCGACC AGTCTCCC CGTCTATC
示例输出
10110 10100
源代码:cstr-grondilu.pl
use v6; my @default-data = qw:to/END/; ATGCTACC CGTTTACC ATTCGACC AGTCTCCC CGTCTATC END sub MAIN($input-file = Nil) { my @input = $input-file ?? $input-file.IO.lines !! @default-data; my @dna = map { [.comb] }, @input; my @c = @dna[0][]; for ^@c -> $c { my @line = map { +so .[$c] eq @c[$c] }, @dna; say @line.join if 1 < ([+] @line) < @dna-1; } }