[Biopython] shuffle sequences

George Devaniranjan devaniranjan at gmail.com
Tue Jun 7 13:39:17 UTC 2011


Hello everyone,
I need to 'shuffle' a sequence so that I can calculate the statistical
alignment scores--I tried the random.shuffle opetion but it does not seem to
work

I defined the sequence as a string like the following

w="KVYGRCELAAAMKRHGLDKYQGYSLGNWVCAAKFE"
random.shuffle(w)


also like this...
my_protein=IUPAC.protein
from Bio.Seq import Seq
myseq=Seq('KVFGRCELAAAMKRHGL', my_protein)

random.shuffle(myseq)

Both don't seem to work--where am I going wrong?

Thanks a lot,
George



More information about the Biopython mailing list