[BiO BB] Random Sequence Generator

Joe Landman landman at scalableinformatics.com
Tue Oct 5 16:20:08 EDT 2004


For starters... use a good (P)RNG (rand is not appropriate for many real 
research cases).  Have a look at Mersenne Twister 
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html and the Perl 
module  http://search.cpan.org/~ams/Math-Random-MT-1.03/MT.pm .

That said, you have to be careful about what random means in terms of 
the specifics of the distribution.  If you are looking at CG rich 
regions, you expect a good PRNG to give you effectively .25...  
probability of any of the letters, so you will not get (unless you bias 
the PRNG distribtion)  a CG rich set of "random" sequence data.

Just some thoughts...

Joe

Dan Bolser wrote:

>On Tue, 5 Oct 2004, Ryan Golhar wrote:
>
>  
>
>>Can anyone recommend a good random sequence generator program available
>>for Linux?
>>    
>>
>
>perl -e '@x=qw(A T C G);for(1..10000){print $x[rand(@x)]}'
>
>Other than that it kind of depends on what your requirements are (and
>aparently the above random generator isn't too good).
>
>perl -e '@x=qw(all work and no play);while(1){print $x[rand(@x)]}'
>
>
>  
>
>>Ryan
>>_______________________________________________
>>BiO_Bulletin_Board maillist  -  BiO_Bulletin_Board at bioinformatics.org
>>https://bioinformatics.org/mailman/listinfo/bio_bulletin_board
>>
>>    
>>
>
>_______________________________________________
>BiO_Bulletin_Board maillist  -  BiO_Bulletin_Board at bioinformatics.org
>https://bioinformatics.org/mailman/listinfo/bio_bulletin_board
>  
>

-- 
Joseph Landman, Ph.D
Scalable Informatics LLC,
email: landman at scalableinformatics.com
web  : http://www.scalableinformatics.com
phone: +1 734 612 4615




More information about the BBB mailing list