[Biopython-dev] [Wg-phyloinformatics] GSoC Weekly Update: PhyloXML for Biopython

Eric Talevich eric.talevich at gmail.com
Mon Jun 22 09:08:05 EDT 2009


On Mon, Jun 22, 2009 at 7:29 AM, Peter <biopython at maubp.freeserve.co.uk>wrote:

> On Thu, Jun 18, 2009 at 12:17 AM, Eric Talevich <eric.talevich at gmail.com>
> wrote:> *SeqRecord transformation*
> >
>
> I was just having a very brief scan over the commits that my RSS
> feed had - and noticed this bit:
>
> +        # Unpack record.features
> +        if record.features:
> +            kwargs['domain_architecture'] = DomainArchitecture(
> +                    domains=[ProteinDomain({
> +                                'from': feat.location.start + 1,
> +                                'to': feat.location.end + 1,
> +                                'confidence':
> feat.qualifiers.get('confidence')
> +                                }, value=feat.id)
> +                            for feat in record.features],
> +                    length=len(record.seq)
> +                    )
>
> I can understand a +/- one to the start location (moving between
> Python zero based counting and normal one based counts), but
> why would the end location also change?
>
> Peter
>

Er, it wouldn't. Oops.

On that note, how do you feel about specifying biology-style indexes in
PhyloXML.ProteinDomain, and switching to zero-based indexes when converting
to SeqFeature? Would it be better to use zero-based indexes in ProteinDomain
and substract 1 from the start position during parsing?

Thanks,
Eric


More information about the Biopython-dev mailing list