| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | |||
| 5 | my @bases = qw(g a t c); | ||
| 6 | |||
| 7 | my $length = shift || 50000; | ||
| 8 | my @nucleotides = map {$bases[rand @bases]} (1..$length); | ||
| 9 | my $nucleotides = join '',@nucleotides; | ||
| 10 | $nucleotides =~ s/(.{1,60})/$1\n/g; | ||
| 11 | |||
| 12 | print ">ctgA\n$nucleotides"; | ||
| 13 |