[Bioperl-l] Wanting to inject date into a SeqIO object

Chris Fields cjfields at illinois.edu
Mon Feb 9 13:02:17 EST 2009


A bit off topic, but I've wondered about this for a while (never  
brought it up): for data like dates/timestamps, would it be convenient  
to have a Bio::AnnotationI that correctly deals with such information  
(maybe incorporates DateTime)?  We could then have add_date() and  
other relevant methods just grab the proper date information.

chris

On Feb 9, 2009, at 11:45 AM, Hilmar Lapp wrote:

> Hi Dave,
>
> $seq->add_date() is the right call, but not all output formats  
> support dates. I don't remember exactly about the gcg format, but I  
> do know that UniProt can have multiple dates, if that's what you want.
>
> To clarify, did you actually try your second version below and found  
> it not to work in the sense that the date did not show up in the  
> output file?
>
> 	-hilmar
>
> On Feb 9, 2009, at 11:54 AM, Dave Jacoby wrote:
>
>> I'm working with a database full of transposable elements. We input  
>> things in FASTA format, and save the date of the upload into the  
>> database separately. When we want to display in GCG format,  
>> specifically, Bio::SeqIO::gcg can't find a date in the object and  
>> uses the current date. Using a line out of the x2y.pl example from  
>> the wiki,
>> we would like to go from this:
>>
>>        while (my $inseq = $seq_in->next_seq) {
>>           $seq_out->write_seq($inseq);
>>        }
>>
>> to
>>        while (my $inseq = $seq_in->next_seq) {
>>           $inseq->add_date($DATE_FROM_DB) ;
>>           $seq_out->write_seq($inseq);
>>        }
>>
>> I have looked through the modules in Bio::SeqIO and I fail to  
>> understand how to do such a thing. Can anyone help me?
>>
>> -- 
>> Dave Jacoby                         Address: WSLR S049
>> Purdue Genomics Core                Mail:    jacoby at purdue.edu
>>                                   Jabber:  jacoby at jabber.org
>>                                   Phone:   hah!
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
> -- 
> ===========================================================
> : Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
> ===========================================================
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l



More information about the Bioperl-l mailing list