[Biopython-dev] [BioPython] about the SeqRecord slicing
Peter
biopython at maubp.freeserve.co.uk
Fri Mar 27 10:24:13 EDT 2009
On Fri, Mar 27, 2009 at 2:17 PM, Sebastian Bassi
<sbassi at clubdelarazon.org> wrote:
> On Fri, Mar 27, 2009 at 10:57 AM, Peter <biopython at maubp.freeserve.co.uk> wrote:
>> How would you make it optional? As an extra non-standard argument
>> to __getitem__? e.g.something like my_record[10:50, annotation=False]?
>> That seems nasty.
>
> Yes it is nasty this way, I never meant to do it in __getitem__.
> Anyway I can't think a nice and intuitive way to do it.
Me neither right now.
>> If we did drop the annotations and dbxrefs when slicing, the user can
>> manually choose to explicitly copy them from the parent object if the
>> do want them.
>
> Yes, that is OK.
Jose agrees, so that makes a mini consensus (at least amongst everyone who
has tried the CVS code and posted to this thread). I've made that
change in CVS,
see Bio/SeqRecord.py revision 1.31.
http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Bio/SeqRecord.py?cvsroot=biopython
As I said before, I want to preserve the id and name - preserving
these would be key
for cross referencing the sub-record back to its parent.
Do either of you think we should also discard the description?
Peter
More information about the Biopython-dev
mailing list