[Bioperl-l] adding seqfeatures in Bio::Seq
Jason Stajich
jason@cgt.mc.duke.edu
Thu, 26 Sep 2002 20:44:42 -0400 (EDT)
Hilmar - really you should get a medal - I've seen lots of these things
and just pushed it off to something we should do later. Later has come
thank god.
On Thu, 26 Sep 2002, Hilmar Lapp wrote:
> When you do this, the implementation attempts to attach its
> primary_seq object to the added feature -- so fine so good -- unless
> the feature has already a seq attached which is not equal to the
> primary_seq to be attached (if it is equal it proceeds even though
> it's pointless). If it is unequal, it issues a warning and does
> nothing.
>
> I don't like this and I vote for abandoning this restriction (I've
> hit a snag because of this). Why do we need to be so strict here?
>
> My arguments are:
> 1) This implementation allows a state that is otherwise deemed
> inconsistent: sequence and the added feature's sequence disagree.
> 2) It assumes that the sequence attached to the feature is a
> PrimarySeq object. Why assume this?
> 3) It is pickier than attach_seq() of the feature itself, which
> happily goes ahead no matter what was attached before.
> 4) There is no method to de-tach a sequence from a feature. I.e.,
> once you attached a seq, you need to re-create the feature in order
> to re-virginify the slot for the attached seq, or find some other
> ugly work-around code.
>
I totally agree.
> My point is you shouldn't need ugly work-around code to get around this.
>
> I could also fix 4) such that $feat->attach_seq(undef) would de-tach
> a previously attached seq. However, to me the most sensible solution
> is also the simplest one: remove the restriction in
> Seq::add_SeqFeature().
>
> Comments? Thoughts? Objections?
I think this is sensible -- I guess that 1.2 is going to be a bit cleaner
than 1.0 as you have done a really good job pushing these things out to
the edges.
>
> -hilmar
> --
> -------------------------------------------------------------
> Hilmar Lapp email: lapp at gnf.org
> GNF, San Diego, Ca. 92121 phone: +1-858-812-1757
> -------------------------------------------------------------
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>
--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu