On Thu, Jul 16, 2009 at 06:20:14PM -0700, Christopher Lee wrote:
-> On Jun 28, 2009, at 4:41 PM, C. Titus Brown wrote:
-> 
-> > I've finished the positive-frame translation code & tests, as of the
-> > latest commit; see sequence_test.py.  The math was tricky ;).  The  
-> > only
-> > complication I've run into is that the returned amino acid sequence
-> > object (which is an Annotation, really) always returns the frame of  
-> > its
-> > full-length parent amino acid translation.  For example, in this code:
-> >
-> >        x = s[1:4].translation(1) # frame 1 @ nt 1
-> >        y = s.translation(2)[:1] # == frame 2, aa 0
-> >        assert str(x) == str(y)
-> >        assert y.frame == 2
-> >
-> > 'x.frame' here is 2, rather than 1, because it's a translation in  
-> > frame
-> > 1 of a slice starting at position 1, hence equal to frame 2... I did
-> > think of a way to get the frame to properly reflect the frame relative
-> > to the DNA slice, but it's ugly and potentially leaky, and I haven't
-> > decided if it's a good idea.
-> 
-> Hi Titus,
-> to me this seems like a question of definition: what does "frame"  
-> mean?  Personally, I think we should keep it simple by defining frame  
-> strictly in terms of the top-level sequence (it's too confusing to  
-> start talking about "frame-relative-to-this", "frame-relative-to-that"  
-> etc.).  The frame property that you introduced some time ago defines  
-> it in that simple way, which seems fine by me.
-> 
-> People who want to calculate "relative frame" can do so trivially  
-> (it's just addition / subtraction of the absolute frames mod 3).

I agree with the decision although the math for negative frames seemed
more complicated...

cheers,
--t
-- 
C. Titus Brown, [email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pygr-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pygr-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to