[Bioperl-l] [Bioperl-guts-l] [14510] bioperl-live/trunk/Bio/SeqIO/swiss.pm: GN line output now follows the new format.

Chris Fields cjfields at uiuc.edu
Mon Feb 18 13:56:32 EST 2008


I may try working on the next.  I had indicated that I would do this  
in the past, just never got around to it; time is the enemy of us all.

chris

On Feb 18, 2008, at 2:12 AM, Heikki Lehvaslaiho wrote:

> Thanks for pointing this out to me. Looks like I've solved the first  
> level:
>
> "Problem #1 is to have all the value tokens
> available from the created object, regardless of their tags."
>
> Anybody want to go on to the next level and code in the complete
> representation of the GN line?
>
> 	-Heikki
>
>
> On Sunday 17 February 2008 16:07:20 Chris Fields wrote:
>> Heikki,
>>
>> See bug 1825:
>>
>> http://bugzilla.open-bio.org/show_bug.cgi?id=1825
>>
>> Hilmar's final comments about restructuring
>> Bio::Annotation::StructuredValue using Data::Stag should work.
>>
>> chris
>>
>> On Feb 17, 2008, at 4:00 AM, Heikki Lehvaslaiho wrote:
>>> Revision: 14510
>>> Author:   heikki
>>> Date:     2008-02-17 05:00:50 -0500 (Sun, 17 Feb 2008)
>>>
>>> Log Message:
>>> -----------
>>> GN line output now follows the new format. BioPerl would need new
>>> objects to store all infomation so for now only the official name
>>> (Name=) and synonym categories are kept. ORFNames and
>>> OrderedLocusNames are treated as synonyms.
>>>
>>> Modified Paths:
>>> --------------
>>>   bioperl-live/trunk/Bio/SeqIO/swiss.pm
>>>
>>> Modified: bioperl-live/trunk/Bio/SeqIO/swiss.pm
>>> ===================================================================
>>> --- bioperl-live/trunk/Bio/SeqIO/swiss.pm	2008-02-17 09:48:07 UTC
>>> (rev 14509)
>>> +++ bioperl-live/trunk/Bio/SeqIO/swiss.pm	2008-02-17 10:00:50 UTC
>>> (rev 14510)
>>> @@ -494,16 +494,13 @@
>>>    #Definition lines
>>>    $self->_write_line_swissprot_regex("DE   ","DE   ",$seq-
>>>
>>>> desc(),"\\s\+\|\$",$LINE_LENGTH);
>>>
>>> -    #Gene name
>>> -    if ((my @genes = $seq->annotation-
>>>
>>>> get_Annotations('gene_name') ) ) {
>>>
>>> -        $self->_print("GN   ",
>>> -              join(' OR ',
>>> -                   map {
>>> -                   $_->isa("Bio::Annotation::StructuredValue") ?
>>> -                       $_->value(-joins => [" AND ", " OR "]) :
>>> -                       $_->value();
>>> -                   } @genes),
>>> -              ".\n");
>>> +    #Gene name; print out new format but only two categories: Name
>>> and Synonyms
>>> +    if ( my @genes = $seq->annotation-
>>>
>>>> get_Annotations('gene_name') ) {
>>>
>>> +        my @gene_names = map { $_->get_all_values} @genes;
>>> +        my $gn_string = 'Name='. shift(@gene_names). ';';
>>> +        $gn_string .= ' Synonyms='. join(', ', @gene_names). ";" if
>>> scalar @gene_names;
>>> +        $self->_write_line_swissprot_regex("GN   ","GN   ",
>>> $gn_string,"\\s\+\|\$",$LINE_LENGTH);
>>> +
>>>    }
>>>
>>>    # Organism lines
>>> @@ -1267,7 +1264,6 @@
>>>   }
>>>
>>>   my $subl = $length - (length $pre1) -1 ;
>>> -   my @lines;
>>>
>>>   my $first_line = 1;
>>>   while($line =~ m/(.{1,$subl})($regex)/g) {
>>>
>>>
>>> _______________________________________________
>>> Bioperl-guts-l mailing list
>>> Bioperl-guts-l at lists.open-bio.org
>>> http://lists.open-bio.org/mailman/listinfo/bioperl-guts-l
>>
>> Christopher Fields
>> Postdoctoral Researcher
>> Lab of Dr. Robert Switzer
>> Dept of Biochemistry
>> University of Illinois Urbana-Champaign
>>
>>
>>
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
>
>
> -- 
> ______ _/      _/_____________________________________________________
>      _/      _/
>     _/  _/  _/  Heikki Lehvaslaiho    heikki at_sanbi _ac _za
>    _/_/_/_/_/  Senior Scientist    skype: heikki_lehvaslaiho
>   _/  _/  _/  SANBI, South African National Bioinformatics Institute
>  _/  _/  _/  University of Western Cape, South Africa
>     _/      Phone: +27 21 959 2096   FAX: +27 21 959 2512
> ___ _/_/_/_/_/________________________________________________________
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign





More information about the Bioperl-l mailing list