Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
# this is an example of how i create the arrays + for (my $i=0; $i < @dna; $i++) { ++$genome_size; + + # calculate the frequency of each dinucleo seperate to begin with # these are all symmetrised frequencies e.g Faa* + my $token = $dna[$i] . $dna[$i+1]; + if ($token =~ 'tt') { ++$tt_count; push @found, $i+1; $tt_pos = $i+1; # print "tt \t $tt_count \t $tt_pos\n"; push @tt_found, "$tt_count \t $tt_pos\n"; } + + if ($token =~ 'cg') { ++$cg_count; $cg_pos = $i+1; push @cg_found, "$cg_count \t $cg_pos\n"; } } print "@tt_found \t @cg_found\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: printing arrays
by Limbic~Region (Chancellor) on May 06, 2004 at 15:26 UTC | |
|
Re: printing arrays
by davido (Cardinal) on May 06, 2004 at 16:06 UTC | |
|
Re: printing arrays
by davido (Cardinal) on May 06, 2004 at 15:29 UTC | |
by Anonymous Monk on May 06, 2004 at 15:36 UTC | |
by davido (Cardinal) on May 06, 2004 at 15:49 UTC | |
|
Re: printing arrays
by idsfa (Vicar) on May 06, 2004 at 15:25 UTC |