[BiO BB] random sequences

Joe Landman landman at scalableinformatics.com
Wed Mar 16 20:15:18 EST 2005


I guess the question is random sequences, or sequences which preserve 
observed base probabilities, or pair probabilities, or ... There was a 
discussion about this here while ago.



James Stroud wrote:
> Python can do this with about 5 lines if you don't have a polynomial 
> distribution and about 8 if you do. Download and install python and run this 
> program (you will need to consult the manual to figure out how to run python 
> programs--pretty easy though). Work through the "hello world" example to get 
> started, then run the following program.
> 
> 
> from random import choice
> 
> seq_len = 100
> choices = ("A","T","G","C")
> 
> the_seq = ""
> for abase in xrange(seq_len):
>   the_seq += choice(choices)
> 
> print the_seq
> 
> 
> 
> If you have polynomial distributions, its a little more complicated
> 
> James
> 
> 
> On Monday 14 March 2005 10:46 am, Seema Trivedi wrote:
> 
>>Dr. Boris Steipe,
>>I will be highly obliged if you could kindly let me know if there are any
>>softwares which I can use for generation of random sequences of
>>nucleotides. I need to do this with large sequences. Thank you
>>Sorry for the trouble,
>>seema
> 
> 

-- 
Joseph Landman, Ph.D
Founder and CEO
Scalable Informatics LLC,
email: landman at scalableinformatics.com
web  : http://www.scalableinformatics.com
phone: +1 734 786 8423
fax  : +1 734 786 8452
cell : +1 734 612 4615




More information about the BBB mailing list