[BiO BB] Random Sequence Generator
Iddo
idoerg at burnham.org
Tue Oct 5 16:32:08 EDT 2004
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
>
>
>
>
Well, as long as we are in the
not-so-great-one-line-random-sequence-generators business:
python -c 'import random; z=["A","C","G","T"]*10; random.shuffle(z);
print z'
For a sequence of length 10.
./I
--
Iddo Friedberg, Ph.D.
The Burnham Institute
10901 N. Torrey Pines Rd.
La Jolla, CA 92037 USA
Tel: +1 (858) 646 3100 x3516
Fax: +1 (858) 713 9930
http://ffas.ljcrf.edu/~iddo
More information about the BBB
mailing list