[Biopython-dev] Getting nucleotide sequence for GenBank features

Peter biopython at maubp.freeserve.co.uk
Thu Nov 5 12:44:24 UTC 2009


On Wed, Nov 4, 2009 at 10:16 PM, Kyle Ellrott <kellrott at gmail.com> wrote:
> I guess it's a question of making it a method of the SeqFeature vs a Method
> of the SeqRecord.  My try put the extract feature in the SeqRecord, because
> that's what SeqFeature belongs to.  But  it actually makes more sense to
> have the SeqFeature operate on a Seq.  If people want to create features (or
> copy them from other SeqRecords) and use them to extract subsequences from
> other Seq objects this format makes it more natural/flexable.

:)

You are right that the SeqFeature won't always be used with a SeqRecord
(or at least, the parent SeqRecord). There are possible examples like a
GenBank file with no sequence (just CONTIG information) where the
sequence has been loaded from a FASTA file. Or, perhaps more likely
(once Brad's code is merged), a list of SeqFeature objects loaded from
a GFF file, plus a sequence loaded from a FASTA file.

Does my current choice of "extract" for the name of the proposed
SeqFeature method seem clear? My other suggestions earlier were
get_sequence or extract_sequence.

http://github.com/peterjc/biopython/tree/seqfeature-extract

Peter




More information about the Biopython-dev mailing list