Thread längste Kette von N's in String bestimmen (2 answers)
Opened by ingobulla at 2013-03-07 15:02

GwenDragon
 2013-03-07 15:15
#166262 #166262
User since
2005-01-17
14746 Artikel
Admin1
[Homepage]
user image
Code (perl): (dl )
1
2
3
4
5
6
$string='GAAGANNNNNNNNNNACGCATACTACCGGTGCCCAGCTGCCATNNNNNNNGAGAGAGATCNNNNNNGAGANNNNNNNATTCTCTNNNNCTCAGATCCNNNNNNNNNNNNNNNNNNNNNGAGA'; 
(@ns) = $string =~ /N+/g; 
print 'Länge der Ns',"\n";
for (sort @ns) {
   print length($_),"\n";
}

View full thread längste Kette von N's in String bestimmen