[Biopython] How to construct a SeqRecord with the info in the SeqFeatures type mRNA or CDS?

Peter biopython at maubp.freeserve.co.uk
Thu Oct 15 21:35:52 UTC 2009


On Thu, Oct 15, 2009 at 10:18 PM, Carlos Javier Borroto
<carlos.borroto at gmail.com> wrote:
> Hi,
>
> I want to construct a SeqRecord with the sequence make from the sum of
> the Locations of the SubFeatures I get from a SeqFeature type mRNA or
> CDS. Does biopython has something already to do this? It looks like
> something many people may want, but is proving to be king of difficult
> to implement manually, so I'm wondering if is already there?

There isn't anything built in now, partly because to do it properly
means coping with a lot of possible fuzzy locations and joins.
I can go into more detail, but it would help to know what kind
of organisms are you working with? For prokaryotes and viruses,
CDS locations are (usually) trivial so you just need the start, end
and strand.

> I read in the tutorial that you can splice a SeqRecord, but I can't
> find a reference to how to form a SeqRecord from several different
> splicing, something like:
>
> new_record = record[1:200] + record[400:600]

That isn't built in, but is something I've been working on that
might be in Biopython in future. Do you fancy trying some
experimental code?

http://github.com/peterjc/biopython/tree/seqrecords
http://lists.open-bio.org/pipermail/biopython-dev/2009-October/006851.html

Peter



More information about the Biopython mailing list