[Biopython] random peptide sequences
Peter Cock
p.j.a.cock at googlemail.com
Wed Apr 4 19:34:53 UTC 2012
On Wed, Apr 4, 2012 at 7:56 PM, <ferreirafm at usp.br> wrote:
> Dear BioPython List,
> I want to write a python script to generate random peptide sequences. I have
> a scratch in my mind, however, I'm not sure how to deal with data itself
> (like: use sequence or mutableSeq?).
I would use a Seq object - once generated your random sequence
won't change, so there is no need for the MutableSeq object.
> ... At the end, I'm going to run the
> function for each of the sequences and store results in a dict where value
> is the binary result.
It sounds like a large dataset of 1000s of random sequences will be
created - you probably don't want to do that all in memory. I would
generate the random records one by one and write them to a FASTA
file. Then loop over the FASTA file and apply your binary test.
An advantage of this split is you have broken the task in two - you
can get the random sequence generator working and checked
separately from writing and testing the classifier.
[I am assuming you want to get out of this a table of some kind
linking random sequences to binary classifier results]
Peter
More information about the Biopython
mailing list