This might be a rather trivial question but I am interested in what goes on under the hood, when you translate a nucleotide sequence to an amino acid sequence using Biopython (v: 1.66, if it's important)
I dont really recall where I saw it but I was initially using what I can only refer to as static
calls (Java-talk) to the Seq
module e.g. Seq.translate(myseq)
and then apply str()
on that. I noticed that doing it this way, given several million sequences from MiSeq platform, the script was taking significant amounts of memory from the system. If I switch to myseq.translate()
the memory usage stay significantly lower for some reason.
Any ideas as to what might be the difference between these two methods?
Can you add a bit more code to make it clear what you are doing? My hunch is you are comparing the function (which can act on strings of Seq objects) to the Seq object method. e.g.
These will have different speeds, but what you describe with significant memory usage suggests something else was going on.