my $seq = ...; my $len = ...; die if $len > length($seq); my $start = rand( length($seq) - $len + 1 ); my $subseq = substr( $seq, $start, $len );
I presume you know how to create and write to a file.
In reply to Re: Random sequence creator with range
by ikegami
in thread Random sequence creator with range
by ashnator
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |