blib/htdocs/tutorial/bin/random_feature.pl untested

filter: Statementstmt 0.0% 0 / 24 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 8 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 0.0% 0 / 40 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/perl
2  
3 use strict;
4 use constant FLEN => 4000;
5 use constant SLEN => 50000;
6 use constant FNUM => 15;
7  
8 my $ftype = shift or "feature";
9 my $fclass = shift or "Feature";
10 my $fprefix = shift or "f";
11  
12  
13 open STDOUT,"|sort -k4,4n" or die;
14  
15 for (1..FNUM) {
16 my $start = int(rand(SLEN));
17 my $end = $start + int(rand(FLEN));
18 $end = SLEN if $end > SLEN;
19 my $strand = rand(1) > 0.5 ? '+' : '-';
20 my $name = sprintf("$fprefix%02d",$_);
21 print <<END;
22 ctgA example $ftype $start $end . $strand . $fclass $name
23 END
24 }
25  
26 close STDOUT;