[Biopython] SeqRecords and multiprocessing

Peter Cock p.j.a.cock at googlemail.com
Fri Apr 22 17:03:03 UTC 2011


On Fri, Apr 22, 2011 at 5:20 PM, McCoy, Connor O <cmccoy at fhcrc.org> wrote:
> Hello,
>
> I'm having trouble handing SeqRecords created from Roche .sff files
> off to subprocesses via multiprocessing pipes / queues.  It looks like the
> issue is unpickling the Bio.SeqRecord._RestrictedDict letter_annotations
> on the instance. Does anyone have any suggestions for a way around this?

Do you have access to the SFF file on all the children? If so, I'd try passing
the read name only, and using Bio.SeqIO.index(...) to pull out the read from
the file.

> Currently, I'm changing the internal _per_letter_annotations to a normal
> dict prior to placing the object in a pipe/queue, but that doesn't seem like
> the best way.  I also tried adding a __getnewargs__ method to the
> _RestrictedDict class setting the length, but didn't have success.

Is the problem that _RestrictedDict isn't pickle-able?

Peter




More information about the Biopython mailing list