[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
Sun Feb 17 14:07:20 UTC 2008
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
More information about the Bioperl-l
mailing list