[Biopython] correction and follow up to previous question
João Rodrigues
anaryin at gmail.com
Tue Jun 7 15:01:16 UTC 2011
Hey George,
>From the Python Docs:
random.shuffle(*x*[, *random*])
>
> Shuffle the sequence *x* in place. The optional argument *random* is a
> 0-argument function returning a random float in [0.0, 1.0); by default, this
> is the function random()<http://docs.python.org/library/random.html#random.random>
> .
>
> Note that for even rather small len(x), the total number of permutations
> of *x* is larger than the period of most random number generators; this
> implies that most permutations of a long sequence can never be generated.
>
This might be the answer to your last question. A more efficient combination
perhaps would be to use random.choice and then append to a list.. perhaps
this leads to better randomized sequences, but I'm talking out of thin air,
not based on experience..
Cheers
João [...] Rodrigues
http://nmr.chem.uu.nl/~joao
On Tue, Jun 7, 2011 at 3:55 PM, George Devaniranjan
<devaniranjan at gmail.com>wrote:
> Sorry guys--It seems to work when I define the seqence as a LIST
>
> however I have another doubt......
>
> the top is the original seqence the bottom the shuffled seqence--while some
> residues are shuffled, its not "very" shuffled
> is this "normal" ?
> First time I am doing this so I just wondered......
>
> Thanks once again.
> George
> _______________________________________________
> Biopython mailing list - Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
>
More information about the Biopython
mailing list