[Biopython] Test feature location type

Peter Cock p.j.a.cock at googlemail.com
Thu Oct 30 11:35:38 UTC 2014


On Thu, Oct 30, 2014 at 10:15 AM, Jim Mailman <jimmailman1 at gmail.com> wrote:
> How to test Seqfeature location to know it's a Exact location, or non exact
> type, and know what type it is? Thanks, Jim

Hi Jim,

I would look at the position's class type, e.g.

from Bio.SeqFeature import ExactPosition
#Here f is a SeqFeature object:
print(isinstance(f.loc.start, ExactPosition))

Note that a location has both a start and end position,
either of which can be exact/fuzzy.

Peter


More information about the Biopython mailing list