[Bioperl-l] sanity check my understanding of bioperl's location terminology?

George Hartzell hartzell at alerce.com
Wed Oct 22 03:48:09 UTC 2008


Heikki Lehvaslaiho writes:
 > George,
 > 
 > You've got it all right expect the last bit.
 > 
 > Bio::LocatableSeq::column_from_residue_number() is a special case because it's 
 > input is in original sequence coordinates, of which the LocatableSeq in 
 > question is part of.
 > 
 > Look at the tests. I just added a few on column_from_residue_number() that 
 > show that if you take a revcom() on a LocatebleSeq the outcome of this method 
 > remains the same! The reason is that within a same alignment, a revcomed 
 > sequence is not a the same one any more. You can not put it back into the same 
 > alignment.
 > 
 > The following demonstrates it by taking two sequences that happen to have 
 > almost identical in the wrong strand (I hope I did not mess this up by doing 
 > it by hand):
 > 
 > seq1  ttaccta
 > seq2  atgctat

I think that it should be

 seq1  ttaccat

so that it matches the alignment in the example below.

 >       1234567890123
 > seq1  --atg---gtaa-  -1
 > seq2  --atg---ctat-   1
 > 
 > 
 > is $seq1->column_from_residue_number(5),5;
 > is $seq1->column_from_residue_number(4),9;
 > 
 > is $seq2->column_from_residue_number(5),10;
 > is $seq2->column_from_residue_number(4),9;
 > 
 > Maybe Ewan can be dragged from his bioperl retirement to point us to an old 
 > document somewhere that explains all the logic behind the way strand is used 
 > in bioperl?
 > 
 >    -Heikki
 > [...]

Thanks!

It's great to have it all broken out, written down, and commited to
the tree.

It even makes sense, in that way that only things involving strand
can.

g.




More information about the Bioperl-l mailing list