From bugzilla-daemon at portal.open-bio.org Tue Jul 1 12:05:47 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Tue, 1 Jul 2008 12:05:47 -0400
Subject: [Bioperl-guts-l] [Bug 2534] New: uniprot_trembl parsing
Message-ID:
http://bugzilla.open-bio.org/show_bug.cgi?id=2534
Summary: uniprot_trembl parsing
Product: BioPerl
Version: unspecified
Platform: Macintosh
OS/Version: Mac OS
Status: NEW
Severity: normal
Priority: P2
Component: Bio::SeqIO
AssignedTo: bioperl-guts-l at bioperl.org
ReportedBy: y-bushmanova at northwestern.edu
Parsing the uniprot_trembl_invertebrates.dat file from
ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/taxonomic_divisions/
using:
#!/usr/bin/perl -w
use strict;
use Bio::SeqIO;
my $trembl = 'uniprot_trembl_invertebrates.dat';
my $stream = Bio::SeqIO->new( -file => $trembl, -format => 'swiss' );
while ( my $seq = $stream->next_seq() ) {
print 1;
}
got the error:
Use of uninitialized value in pattern match (m//) at
/Library/Perl/5.8.8/Bio/SeqIO/swiss.pm line 1054, line 2346848.
Use of uninitialized value in pattern match (m//) at
/Library/Perl/5.8.8/Bio/SeqIO/swiss.pm line 1054, line 2349567.
Caught a SIGINT at /Library/Perl/5.8.8/Bio/DB/Taxonomy/list.pm line 278
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From miraceti at dev.open-bio.org Tue Jul 1 18:12:21 2008
From: miraceti at dev.open-bio.org (miraceti at dev.open-bio.org)
Date: Tue, 1 Jul 2008 18:12:21 -0400
Subject: [Bioperl-guts-l] [14748] bioperl-live/trunk/Bio/Tree: phyloxml
to_string , < branch_length>
Message-ID: <200807012212.m61MCL6A014023@dev.open-bio.org>
Revision: 14748
Author: miraceti
Date: 2008-07-01 18:12:20 -0400 (Tue, 01 Jul 2008)
Log Message:
-----------
phyloxml to_string ,
Modified Paths:
--------------
bioperl-live/trunk/Bio/Tree/AnnotatableNode.pm
bioperl-live/trunk/Bio/TreeIO/phyloxml.pm
Modified: bioperl-live/trunk/Bio/Tree/AnnotatableNode.pm
===================================================================
--- bioperl-live/trunk/Bio/Tree/AnnotatableNode.pm 2008-06-30 23:02:50 UTC (rev 14747)
+++ bioperl-live/trunk/Bio/Tree/AnnotatableNode.pm 2008-07-01 22:12:20 UTC (rev 14748)
@@ -95,7 +95,6 @@
my $self = $class->SUPER::new(@args);
my $to_string_cb = $self->_rearrange([qw(TOSTRING)], @args);
if ($to_string_cb) {
- $self->debug ("setting callback: ", $to_string_cb);
$self->to_string_callback($to_string_cb);
}
$self->debug("new AnnotatableNode\n");
Modified: bioperl-live/trunk/Bio/TreeIO/phyloxml.pm
===================================================================
--- bioperl-live/trunk/Bio/TreeIO/phyloxml.pm 2008-06-30 23:02:50 UTC (rev 14747)
+++ bioperl-live/trunk/Bio/TreeIO/phyloxml.pm 2008-07-01 22:12:20 UTC (rev 14748)
@@ -771,8 +771,30 @@
my ($self) = @_; # this self is a Bio::Tree::AnnotatableNode
# not a Bio::TreeIO::phyloxml
my $str = '';
- $str .= '';
- $str .= $self->id;
+
+ my $ac = $self->annotation;
+ my @all_anns = $ac->get_Annotations();
+ my @all_keys = $ac->get_all_annotation_keys();
+
+ # start
+ $str .= 'get_Annotations('id_source'); # check id_source
+ if (@id_source) {
+ $str .= " id_source=\"$id_source[0]->hash_tree->{'value'}\"";
+ }
+ $str .= '>';
+
+ # check id and print
+ if ($self->id) {
+ $str .= ''.$self->id.'';
+ }
+
+ # check branch_length and print
+ if ($self->branch_length) {
+ $str .= ''.$self->branch_length.'';
+ }
+
+ # end
$str .= '';
return $str;
}
From miraceti at dev.open-bio.org Wed Jul 2 02:06:41 2008
From: miraceti at dev.open-bio.org (miraceti at dev.open-bio.org)
Date: Wed, 2 Jul 2008 02:06:41 -0400
Subject: [Bioperl-guts-l] [14749] bioperl-live/trunk: nested annotation
collection instead of structuredValue
Message-ID: <200807020606.m6266fkj017731@dev.open-bio.org>
Revision: 14749
Author: miraceti
Date: 2008-07-02 02:06:40 -0400 (Wed, 02 Jul 2008)
Log Message:
-----------
nested annotation collection instead of structuredValue
Modified Paths:
--------------
bioperl-live/trunk/Bio/TreeIO/phyloxml.pm
bioperl-live/trunk/t/phyloxml.t
Modified: bioperl-live/trunk/Bio/TreeIO/phyloxml.pm
===================================================================
--- bioperl-live/trunk/Bio/TreeIO/phyloxml.pm 2008-07-01 22:12:20 UTC (rev 14748)
+++ bioperl-live/trunk/Bio/TreeIO/phyloxml.pm 2008-07-02 06:06:40 UTC (rev 14749)
@@ -570,11 +570,17 @@
else {
$tnode = $self->{'_currentitems'}->[-1];
}
- if (exists $self->current_attr->{'ref'}) {
- my $ac = $tnode->annotation();
- my $sv = new Bio::Annotation::SimpleValue(-value => $self->{'_currenttext'});
- $ac->add_Annotation($self->current_attr->{'ref'}, $sv);
+ # nested annotation collection
+ my $propertycollection = Bio::Annotation::Collection->new();
+ $self->current_attr->{'value'} = $self->{'_currenttext'};
+ foreach my $tag (keys %{$self->current_attr}) {
+ my $sv = new Bio::Annotation::SimpleValue(
+ -value => $self->current_attr->{$tag}
+ );
+ $propertycollection->add_Annotation($tag, $sv);
}
+ my $ac = $tnode->annotation();
+ $ac->add_Annotation('property', $propertycollection);
}
elsif ($prev eq 'events') {
}
Modified: bioperl-live/trunk/t/phyloxml.t
===================================================================
--- bioperl-live/trunk/t/phyloxml.t 2008-07-01 22:12:20 UTC (rev 14748)
+++ bioperl-live/trunk/t/phyloxml.t 2008-07-02 06:06:40 UTC (rev 14749)
@@ -153,11 +153,12 @@
isa_ok($A, 'Bio::Tree::AnnotatableNode');
my ($ac) = $A->annotation();
isa_ok($ac, 'Bio::AnnotationCollectionI');
-my (@annotations) = $ac->get_Annotations('NOAA:depth');
-isa_ok( $annotations[0], 'Bio::AnnotationI');
-is($annotations[0]->as_text, 'Value: 1200 ');
+my (@annotations) = $ac->get_Annotations('property');
+isa_ok( $annotations[0], 'Bio::Annotation::Collection');
+my (@value) = $annotations[0]->get_Annotations('value');
+is($value[0]->as_text, 'Value: 1200 ');
if ($verbose > 0) {
- diag( "Annotation NOAA:depth stringified ",$annotations[0]->as_text);
+ diag( "Annotation NOAA:depth stringified ",$value[0]->as_text);
}
$leaves_string = $tree->simplify_to_leaves_string();
if ($verbose > 0) {
@@ -174,11 +175,12 @@
isa_ok($A, 'Bio::Tree::AnnotatableNode');
($ac) = $A->annotation();
isa_ok($ac, 'Bio::AnnotationCollectionI');
-(@annotations) = $ac->get_Annotations('NOAA:depth');
-isa_ok( $annotations[0], 'Bio::AnnotationI');
-is($annotations[0]->as_text, 'Value: 1200 ');
+(@annotations) = $ac->get_Annotations('property');
+isa_ok( $annotations[0], 'Bio::Annotation::Collection');
+my (@value) = $annotations[0]->get_Annotations('value');
+is($value[0]->as_text, 'Value: 1200 ');
if ($verbose > 0) {
- diag( "Annotation NOAA:depth stringified ",$annotations[0]->as_text);
+ diag( "Annotation NOAA:depth stringified ",$value[0]->as_text);
}
$leaves_string = $tree->simplify_to_leaves_string();
if ($verbose > 0) {
From miraceti at dev.open-bio.org Wed Jul 2 17:05:43 2008
From: miraceti at dev.open-bio.org (miraceti at dev.open-bio.org)
Date: Wed, 2 Jul 2008 17:05:43 -0400
Subject: [Bioperl-guts-l] [14750] bioperl-live/trunk: element_default
instead of element_name _branch _confidence
Message-ID: <200807022105.m62L5hsI021622@dev.open-bio.org>
Revision: 14750
Author: miraceti
Date: 2008-07-02 17:05:42 -0400 (Wed, 02 Jul 2008)
Log Message:
-----------
element_default instead of element_name _branch _confidence
Modified Paths:
--------------
bioperl-live/trunk/Bio/TreeIO/phyloxml.pm
bioperl-live/trunk/t/phyloxml.t
Modified: bioperl-live/trunk/Bio/TreeIO/phyloxml.pm
===================================================================
--- bioperl-live/trunk/Bio/TreeIO/phyloxml.pm 2008-07-02 06:06:40 UTC (rev 14749)
+++ bioperl-live/trunk/Bio/TreeIO/phyloxml.pm 2008-07-02 21:05:42 UTC (rev 14750)
@@ -103,17 +103,11 @@
my %start_elements = (
'phylogeny' => \&element_phylogeny,
'clade' => \&element_clade,
- 'confidence' => \&element_confidence,
- 'property' => \&element_property,
);
$self->{'_start_elements'} = \%start_elements;
my %end_elements = (
'phylogeny' => \&end_element_phylogeny,
'clade' => \&end_element_clade,
- 'name' => \&end_element_name,
- 'branch_length' => \&end_element_branch_length,
- 'confidence' => \&end_element_confidence,
- 'property' => \&end_element_property,
);
$self->{'_end_elements'} = \%end_elements;
}
@@ -187,12 +181,15 @@
{
$self->debug("starting element: ",$reader->name, "\n");
$self->{'_lastitem'}->{$reader->name}++;
- push @{$self->{'_lastitem'}->{'current'}}, { $reader->name=>{}};
+ push @{$self->{'_lastitem'}->{'current'}}, { $reader->name=>{}}; # current holds current element and empty hash for its attributes
if (exists $self->{'_start_elements'}->{$reader->name}) {
my $method = $self->{'_start_elements'}->{$reader->name};
$self->$method();
}
+ else {
+ $self->element_default();
+ }
}
elsif ($reader->nodeType == XML_READER_TYPE_TEXT)
{
@@ -207,6 +204,9 @@
my $method = $self->{'_end_elements'}->{$reader->name};
$self->$method();
}
+ else {
+ $self->end_element_default();
+ }
$self->{'_lastitem'}->{ $reader->name }--;
pop @{$self->{'_lastitem'}->{'current'}};
}
@@ -353,6 +353,7 @@
my $childcnt = $self->{'_levelcnt'}->[$level+1] || 0;
$self->debug ("adding node: nodes in stack is $curcount, treelevel: $level, childcnt: $childcnt\n");
+ # pop from temporary list
my $tnode = pop @{$self->{'_currentitems'}};
$self->debug( "new node will be ".$tnode->to_string."\n");
if ( $childcnt > 0) {
@@ -376,82 +377,62 @@
}
-=head2 end_element_name
+=head2 element_default
- Title : end_element_name
- Usage : $->end_element_name
+ Title : element_default
+ Usage : $->element_default
Function:
Returns : none
Args : none
=cut
-sub end_element_name
+sub element_default
{
my ($self) = @_;
my $reader = $self->{'_reader'};
+ my $current = $self->current_element();
my $prev = $self->prev_element();
- $self->debug("ending name with prev $prev\n");
- if ($prev eq 'phylogeny') {
- $self->prev_attr->{'name'} = $self->{'_currenttext'};
- }
- elsif ($prev eq 'clade') {
- my $tnode = $self->{'_currentitems'}->[-1];
- $tnode->id($self->{'_currenttext'});
- }
- elsif ($prev eq 'taxonomy') {
- }
- else {
-
- }
+ $self->debug("starting $current within $prev\n");
+
+ # read attributes of element
+ $self->processAttribute($self->current_attr);
+ $self->debug( "attr: ", %{$self->current_attr}, "\n");
}
-=head2 end_element_branch_length
- Title : end_element_branch_length
- Usage : $->end_element_branch_length
+=head2 end_element_default
+
+ Title : end_element_default
+ Usage : $->end_element_default
Function:
Returns : none
Args : none
=cut
-sub end_element_branch_length
+sub end_element_default
{
my ($self) = @_;
my $reader = $self->{'_reader'};
+ my $current = $self->current_element();
my $prev = $self->prev_element();
- if ($prev eq 'clade') {
- my $tnode = $self->{'_currentitems'}->[-1];
- $tnode->branch_length($self->{'_currenttext'});
- }
- else {
+ my $idref = $self->current_attr->{'id_ref'};
+ delete $self->current_attr->{'id_ref'};
+ my $idsrc;
+ if ($idref) { $idsrc = $self->{'_id_link'}->{$idref}; }
+ # exception when id_src is defined but id_ref is not, or vice versa.
+ if ($idref xor $idsrc) {
+ $self->throw("id_ref and id_src incompatible: $idref, $idsrc");
}
-}
-=head2 element_confidence
-
- Title : element_confidence
- Usage : $->element_confidence
- Function:
- Returns : none
- Args : none
-
-=cut
-
-sub element_confidence
-{
- my ($self) = @_;
- my $reader = $self->{'_reader'};
- my $prev = $self->prev_element();
- $self->debug("starting confidence within $prev\n");
- if ($prev eq 'phylogeny') {
+ if (!$idsrc && $prev eq 'phylogeny') {
+ # annotate Tree via tree attribute
+ $self->prev_attr->{$current} = $self->{'_currenttext'};
}
- elsif ($prev eq 'clade') {
- # read attributes of
- $self->processAttribute($self->current_attr);
- $self->debug( "attr: ", %{$self->current_attr}, "\n");
+ elsif ( ($idsrc && $idsrc->isa($self->nodetype)) || (!$idsrc && $prev eq 'clade') ) {
+ $self->annotateNode( $current, $idsrc);
}
elsif ($prev eq 'events') {
}
@@ -462,144 +443,69 @@
elsif ($prev eq 'clade_relation') {
}
else {
+
}
}
-=head2 end_element_confidence
+=head2 annotateNode
- Title : end_element_confidence
- Usage : $->end_element_confidence
+ Title : annotateNode
+ Usage : $->annotateNode( $element, $idsrc)
Function:
Returns : none
Args : none
=cut
-sub end_element_confidence
+sub annotateNode
{
- my ($self) = @_;
- my $reader = $self->{'_reader'};
- my $prev = $self->prev_element();
- if ($prev eq 'phylogeny') {
+ my ($self, $element, $idsrc) = @_;
+
+ # find node to annotate
+ my $tnode;
+ if ($idsrc) {
+ $tnode = $idsrc;
}
- elsif ($prev eq 'clade') {
- my $tnode = $self->{'_currentitems'}->[-1];
- if ((exists $self->current_attr->{'type'}) && ($self->current_attr->{'type'} eq 'bootstrap')) {
- $tnode->bootstrap($self->{'_currenttext'});
- }
- }
- elsif ($prev eq 'events') {
- }
- elsif ($prev eq 'annotation') {
- }
- elsif ($prev eq 'sequence_relation') {
- }
- elsif ($prev eq 'clade_relation') {
- }
else {
-
+ $tnode = $self->{'_currentitems'}->[-1];
}
-}
-
-=head2 element_property
-
- Title : element_property
- Usage : $->element_property
- Function:
- Returns : none
- Args : none
-
-=cut
-
-sub element_property
-{
- my ($self) = @_;
- my $reader = $self->{'_reader'};
- my $prev = $self->prev_element();
- $self->debug("starting property within $prev\n");
- if ($prev eq 'phylogeny') {
- # read attributes of
- $self->processAttribute($self->current_attr);
- $self->debug( "attr: ", %{$self->current_attr}, "\n");
+ # build new annotation
+ my $newann;
+ # if no other attribute then add Annotation::SimpleValue
+ $newann = new Bio::Annotation::SimpleValue( -value => $self->{'_currenttext'} );
+ # if more than one attribute then add Annotation::Collection
+ $newann = Bio::Annotation::Collection->new();
+ $self->current_attr->{'value'} = $self->{'_currenttext'};
+ foreach my $tag (keys %{$self->current_attr}) {
+ my $sv = new Bio::Annotation::SimpleValue(
+ -value => $self->current_attr->{$tag}
+ );
+ $newann->add_Annotation($tag, $sv);
}
- elsif ($prev eq 'clade') {
- # read attributes of
- $self->processAttribute($self->current_attr);
- $self->debug( "attr: ", %{$self->current_attr}, "\n");
- }
- elsif ($prev eq 'annotation') {
- }
- else {
- }
-}
+ # add to current node annotation
+ my $ac = $tnode->annotation();
+ $ac->add_Annotation($element, $newann);
-=head2 end_element_property
- Title : end_element_property
- Usage : $->end_element_property
- Function:
- Returns : none
- Args : none
-
-=cut
-
-sub end_element_property
-{
- my ($self) = @_;
- my $reader = $self->{'_reader'};
- my $prev = $self->prev_element();
- my $idref = $self->current_attr->{'id_ref'};
- my $idsrc;
- if ($idref) { $idsrc = $self->{'_id_link'}->{$idref}; }
-
- # exception when id_src is defined but id_ref is not, or vice versa.
- if ($idref xor $idsrc) {
- $self->throw("id_ref and id_src incompatible: $idref, $idsrc");
+ # additional setups for compatibility with NodeI
+ if ($element eq 'name') {
+ $tnode->id($self->{'_currenttext'});
}
-
- if ( ($idsrc && $idsrc->isa($self->treetype)) || (!$idsrc && $prev eq 'phylogeny') ) {
+ elsif ($element eq 'branch_length') {
+ $tnode->branch_length($self->{'_currenttext'});
}
- elsif ( ($idsrc && $idsrc->isa($self->nodetype)) || (!$idsrc && $prev eq 'clade') ) {
- my $tnode;
- if ($idsrc) {
- $tnode = $idsrc;
+ elsif ($element eq 'confidence') {
+ if ((exists $self->current_attr->{'type'}) && ($self->current_attr->{'type'} eq 'bootstrap')) {
+ $tnode->bootstrap($self->{'_currenttext'});
}
- else {
- $tnode = $self->{'_currentitems'}->[-1];
- }
- # nested annotation collection
- my $propertycollection = Bio::Annotation::Collection->new();
- $self->current_attr->{'value'} = $self->{'_currenttext'};
- foreach my $tag (keys %{$self->current_attr}) {
- my $sv = new Bio::Annotation::SimpleValue(
- -value => $self->current_attr->{$tag}
- );
- $propertycollection->add_Annotation($tag, $sv);
- }
- my $ac = $tnode->annotation();
- $ac->add_Annotation('property', $propertycollection);
}
- elsif ($prev eq 'events') {
- }
- elsif ($prev eq 'annotation') {
- }
- elsif ($prev eq 'sequence_relation') {
- }
- elsif ($prev eq 'clade_relation') {
- }
- else {
- }
}
-=head2 element_id
- Title : element_id
- Usage : $->element_id
-
=head2 element_id
Title : element_id
@@ -660,6 +566,27 @@
return $self->{'_lastitem'}->{'current'}->[-2]->{$keys[0]};
}
+=head2 current_element
+
+ Title : current_element
+ Usage :
+ Function:
+ Example :
+ Returns :
+ Args :
+
+=cut
+
+sub current_element {
+ my ($self) = @_;
+
+ return 0 if ! defined $self->{'_lastitem'} ||
+ ! defined $self->{'_lastitem'}->{'current'}->[-1];
+ my @keys = keys %{$self->{'_lastitem'}->{'current'}->[-1]};
+ (@keys == 1) || die "there should be only one key for each hash";
+ return $keys[0];
+}
+
=head2 prev_element
Title : prev_element
Modified: bioperl-live/trunk/t/phyloxml.t
===================================================================
--- bioperl-live/trunk/t/phyloxml.t 2008-07-02 06:06:40 UTC (rev 14749)
@@ Diff output truncated at 10000 characters. @@
From miraceti at dev.open-bio.org Fri Jul 4 15:45:48 2008
From: miraceti at dev.open-bio.org (miraceti at dev.open-bio.org)
Date: Fri, 4 Jul 2008 15:45:48 -0400
Subject: [Bioperl-guts-l] [14751] bioperl-live/trunk: phyloxml write_tree
Message-ID: <200807041945.m64JjmN3032631@dev.open-bio.org>
Revision: 14751
Author: miraceti
Date: 2008-07-04 15:45:46 -0400 (Fri, 04 Jul 2008)
Log Message:
-----------
phyloxml write_tree
Modified Paths:
--------------
bioperl-live/trunk/Bio/TreeIO/phyloxml.pm
bioperl-live/trunk/t/phyloxml.t
Modified: bioperl-live/trunk/Bio/TreeIO/phyloxml.pm
===================================================================
--- bioperl-live/trunk/Bio/TreeIO/phyloxml.pm 2008-07-02 21:05:42 UTC (rev 14750)
+++ bioperl-live/trunk/Bio/TreeIO/phyloxml.pm 2008-07-04 19:45:46 UTC (rev 14751)
@@ -156,13 +156,51 @@
=cut
sub write_tree{
+ my ($self, @trees) = @_;
+ foreach my $tree (@trees) {
+ my $root = $tree->get_root_node;
+ $self->_print("");
+ $self->_print($self->_write_tree_Helper($root));
+ $self->_print("");
+ $self->_print("\n");
+ }
+ $self->flush if $self->_flush_on_write && defined $self->_fh;
+ return;
}
-sub _write_tree_Helper {
+
+sub _write_tree_Helper
+{
+ my ($self, $node, $str) = @_; # this self is a Bio::Tree::phyloxml
+ if (ref($node) ne 'Bio::Tree::AnnotatableNode') {
+ $self->throw( "node but be a Bio::Tree::AnnotatableNode" );
+ }
+ my $ac = $node->annotation;
+
+ # start
+ $str .= 'get_Annotations('_attr'); # check id_source
+ if (@attr) {
+ my @id_source = $attr[0]->get_Annotations('id_source');
+ if (@id_source) {
+ $str .= " id_source=\"".$id_source[0]->value."\"";
+ }
+ }
+ $str .= ">";
+
+ # print all descendent nodes
+ foreach my $child ( $node->each_Descendent() ) {
+ $str = $self->_write_tree_Helper($child, $str);
+ }
+
+ # print all annotations
+ $str = print_annotation( $node, $str, $ac );
+
+ $str .= "";
+ return $str;
}
-
=head2 processNode
Title : processNode
@@ -190,13 +228,27 @@
else {
$self->element_default();
}
+ if ($reader->isEmptyElement) {
+ # do procedures for XML_READER_TYPE_END_ELEMENT since element is complete
+ $self->debug("ending element: ",$reader->name, "\n");
+
+ if (exists $self->{'_end_elements'}->{$reader->name}) {
+ my $method = $self->{'_end_elements'}->{$reader->name};
+ $self->$method();
+ }
+ else {
+ $self->end_element_default();
+ }
+ $self->{'_lastitem'}->{ $reader->name }--;
+ pop @{$self->{'_lastitem'}->{'current'}};
+ }
}
- elsif ($reader->nodeType == XML_READER_TYPE_TEXT)
+ if ($reader->nodeType == XML_READER_TYPE_TEXT)
{
$self->debug($reader->value, "\n");
$self->{'_currenttext'} = $reader->value;
}
- elsif ($reader->nodeType == XML_READER_TYPE_END_ELEMENT)
+ if ($reader->nodeType == XML_READER_TYPE_END_ELEMENT)
{
$self->debug("ending element: ",$reader->name, "\n");
@@ -295,6 +347,7 @@
$root = shift @{$self->{'_currentnodes'}};
}
+ $self->debug($self->current_attr, %{$self->current_attr});
my $tree = $self->treetype->new(
-verbose => $self->verbose,
-root => $root,
@@ -429,6 +482,8 @@
if (!$idsrc && $prev eq 'phylogeny') {
# annotate Tree via tree attribute
+ $self->debug("annotating Tree ",$self->prev_attr);
+ $self->debug("with $current, ", $self->{'_currenttext'});
$self->prev_attr->{$current} = $self->{'_currenttext'};
}
elsif ( ($idsrc && $idsrc->isa($self->nodetype)) || (!$idsrc && $prev eq 'clade') ) {
@@ -473,18 +528,24 @@
# build new annotation
my $newann;
- # if no other attribute then add Annotation::SimpleValue
- $newann = new Bio::Annotation::SimpleValue( -value => $self->{'_currenttext'} );
- # if more than one attribute then add Annotation::Collection
- $newann = Bio::Annotation::Collection->new();
- $self->current_attr->{'value'} = $self->{'_currenttext'};
- foreach my $tag (keys %{$self->current_attr}) {
- my $sv = new Bio::Annotation::SimpleValue(
- -value => $self->current_attr->{$tag}
- );
- $newann->add_Annotation($tag, $sv);
+ # if no attribute then add Annotation::SimpleValue
+ if ( ! scalar keys %{$self->current_attr} ) {
+ $newann = new Bio::Annotation::SimpleValue( -value => $self->{'_currenttext'} );
}
-
+ # if attribute exists then add Annotation::Collection
+ else {
+ $newann = Bio::Annotation::Collection->new();
+ my $newattr = Bio::Annotation::Collection->new();
+ foreach my $tag (keys %{$self->current_attr}) {
+ my $sv = new Bio::Annotation::SimpleValue(
+ -value => $self->current_attr->{$tag}
+ );
+ $newattr->add_Annotation($tag, $sv);
+ }
+ $newann->add_Annotation('_attr', $newattr);
+ my $newvalue = new Bio::Annotation::SimpleValue( -value => $self->{'_currenttext'} );
+ $newann->add_Annotation('_text', $newvalue);
+ }
# add to current node annotation
my $ac = $tnode->annotation();
$ac->add_Annotation($element, $newann);
@@ -499,7 +560,7 @@
}
elsif ($element eq 'confidence') {
if ((exists $self->current_attr->{'type'}) && ($self->current_attr->{'type'} eq 'bootstrap')) {
- $tnode->bootstrap($self->{'_currenttext'});
+ $tnode->bootstrap($self->{'_currenttext'}); # this needs to change (adds 'B' annotation)
}
}
@@ -700,37 +761,84 @@
=cut
-sub node_to_string {
+
+sub node_to_string
+{
my ($self) = @_; # this self is a Bio::Tree::AnnotatableNode
# not a Bio::TreeIO::phyloxml
my $str = '';
-
my $ac = $self->annotation;
- my @all_anns = $ac->get_Annotations();
- my @all_keys = $ac->get_all_annotation_keys();
# start
$str .= 'get_Annotations('id_source'); # check id_source
- if (@id_source) {
- $str .= " id_source=\"$id_source[0]->hash_tree->{'value'}\"";
+ my @attr = $ac->get_Annotations('_attr'); # check id_source
+ if (@attr) {
+ my @id_source = $attr[0]->get_Annotations('id_source');
+ if (@id_source) {
+ $str .= " id_source=\"".$id_source[0]->value."\"";
+ }
}
$str .= '>';
- # check id and print
- if ($self->id) {
- $str .= ''.$self->id.'';
- }
-
- # check branch_length and print
- if ($self->branch_length) {
- $str .= ''.$self->branch_length.'';
- }
+ # print all annotations
+ $str = print_annotation( $self, $str, $ac );
- # end
$str .= '';
return $str;
}
+sub print_annotation
+{
+ my ($self, $str, $ac) = @_;
+
+ my @all_anns = $ac->get_Annotations();
+ foreach my $ann (@all_anns) {
+ my $key = $ann->tagname;
+ if ($key eq '_attr') { next; } # attributes are already printed in the previous level
+ if (ref($ann) eq 'Bio::Annotation::SimpleValue')
+ {
+ if ($key eq '_text') {
+ $str .= $ann->value;
+ }
+ else {
+ $str .= "<$key>";
+ $str .= $ann->value;
+ $str .= "$key>";
+ }
+ }
+ elsif (ref($ann) eq 'Bio::Annotation::Collection')
+ {
+ my @attrs = $ann->get_Annotations('_attr');
+ if (@attrs) { # if there is a attribute collection
+ $str .= "<$key";
+ $str = print_attr($self, $str, $attrs[0]);
+ $str .= ">";
+ }
+ else {
+ $str .= "<$key>";
+ }
+ $str = print_annotation($self, $str, $ann);
+ $str .= "$key>";
+ }
+ }
+ return $str;
+}
+
+sub print_attr
+{
+ my ($self, $str, $ac) = @_;
+ my @all_attrs = $ac->get_Annotations();
+ foreach my $attr (@all_attrs) {
+ if (ref($attr) ne 'Bio::Annotation::SimpleValue') {
+ $self->throw("attribute should be a SimpleValue");
+ }
+ $str .= ' ';
+ $str .= $attr->tagname;
+ $str .= '=';
+ $str .= $attr->value;
+ }
+ return $str;
+}
+
1;
Modified: bioperl-live/trunk/t/phyloxml.t
===================================================================
--- bioperl-live/trunk/t/phyloxml.t 2008-07-02 21:05:42 UTC (rev 14750)
+++ bioperl-live/trunk/t/phyloxml.t 2008-07-04 19:45:46 UTC (rev 14751)
@@ -7,7 +7,7 @@
use lib 't/lib';
use BioperlTest;
- test_begin(-tests => 52,
+ test_begin(-tests => 53,
-requires_modules => [qw(XML::LibXML XML::LibXML::Reader)],
);
if (1000*$] < 5008) {
@@ -38,8 +38,10 @@
$tree = $treeio->next_tree;
isa_ok($tree, 'Bio::Tree::TreeI');
is($tree->id, 'example from Prof. Joe Felsenstein\'s book "Inferring Phylogenies"');
+is($tree->get_tag_values('description'), 'phyloXML allows to use either a "branch_length" attribute or element to indicate branch lengths.');
if ($verbose > 0) {
diag("tree id: ",$tree->id);
+ diag("tree description: ", $tree->get_tag_values('description'));
}
is($tree->get_tag_values('rooted'), 'true');
my @nodes = $tree->get_nodes;
@@ -64,6 +66,9 @@
}
$tree = $treeio->next_tree;
isa_ok($tree, 'Bio::Tree::TreeI');
+if ($verbose > 0) {
+ diag("tree id: ",$tree->id);
+}
@nodes = $tree->get_nodes;
is(@nodes, 5);
($A) = $tree->find_node('A');
@@ -86,6 +91,9 @@
}
$tree = $treeio->next_tree;
isa_ok($tree, 'Bio::Tree::TreeI');
+if ($verbose > 0) {
+ diag("tree id: ",$tree->id);
+}
my ($AB) = $tree->find_node('AB');
ok($AB);
is($AB->bootstrap, '89');
@@ -101,6 +109,9 @@
#
$tree = $treeio->next_tree;
isa_ok($tree, 'Bio::Tree::TreeI');
+if ($verbose > 0) {
+ diag("tree id: ",$tree->id);
+}
$leaves_string = $tree->simplify_to_leaves_string();
if ($verbose > 0) {
diag($leaves_string);
@@ -113,6 +124,9 @@
#
$tree = $treeio->next_tree;
isa_ok($tree, 'Bio::Tree::TreeI');
+if ($verbose > 0) {
+ diag("tree id: ",$tree->id);
+}
$leaves_string = $tree->simplify_to_leaves_string();
if ($verbose > 0) {
diag($leaves_string);
@@ -124,6 +138,9 @@
#
$tree = $treeio->next_tree;
isa_ok($tree, 'Bio::Tree::TreeI');
+if ($verbose > 0) {
+ diag("tree id: ",$tree->id);
+}
$leaves_string = $tree->simplify_to_leaves_string();
if ($verbose > 0) {
diag($leaves_string);
@@ -135,6 +152,9 @@
# @id_source & @id_ref
$tree = $treeio->next_tree;
isa_ok($tree, 'Bio::Tree::TreeI');
+if ($verbose > 0) {
+ diag("tree id: ",$tree->id);
+}
$leaves_string = $tree->simplify_to_leaves_string();
if ($verbose > 0) {
diag($leaves_string);
@@ -149,13 +169,16 @@
}
$tree = $treeio->next_tree;
isa_ok($tree, 'Bio::Tree::TreeI');
+if ($verbose > 0) {
+ diag("tree id: ",$tree->id);
+}
($A) = $tree->find_node('A');
isa_ok($A, 'Bio::Tree::AnnotatableNode');
my ($ac) = $A->annotation();
@@ Diff output truncated at 10000 characters. @@
From bosborne at dev.open-bio.org Fri Jul 4 16:07:19 2008
From: bosborne at dev.open-bio.org (Brian Osborne)
Date: Fri, 4 Jul 2008 16:07:19 -0400
Subject: [Bioperl-guts-l] [14752] bioperl-live/trunk/Bio/DB/SeqFeature.pm:
Minor edits
Message-ID: <200807042007.m64K7JFD032680@dev.open-bio.org>
Revision: 14752
Author: bosborne
Date: 2008-07-04 16:07:19 -0400 (Fri, 04 Jul 2008)
Log Message:
-----------
Minor edits
Modified Paths:
--------------
bioperl-live/trunk/Bio/DB/SeqFeature.pm
Modified: bioperl-live/trunk/Bio/DB/SeqFeature.pm
===================================================================
--- bioperl-live/trunk/Bio/DB/SeqFeature.pm 2008-07-04 19:45:46 UTC (rev 14751)
+++ bioperl-live/trunk/Bio/DB/SeqFeature.pm 2008-07-04 20:07:19 UTC (rev 14752)
@@ -9,6 +9,7 @@
=head1 SYNOPSIS
use Bio::DB::SeqFeature::Store;
+
# Open the sequence database
my $db = Bio::DB::SeqFeature::Store->new( -adaptor => 'DBI::mysql',
-dsn => 'dbi:mysql:test');
@@ -45,13 +46,14 @@
=cut
-# just like Bio::DB::SeqFeature::NormalizedFeature except that the parent/child relationships are
-# stored in a table in the Bio::DB::SeqFeature::Store
+# just like Bio::DB::SeqFeature::NormalizedFeature except that the parent/child
+# relationships are stored in a table in the Bio::DB::SeqFeature::Store
use strict;
use Carp 'croak';
use Bio::DB::SeqFeature::Store;
-use base qw(Bio::DB::SeqFeature::NormalizedFeature Bio::DB::SeqFeature::NormalizedTableFeatureI);
+use base qw(Bio::DB::SeqFeature::NormalizedFeature
+ Bio::DB::SeqFeature::NormalizedTableFeatureI);
=head2 new
@@ -69,7 +71,7 @@
The arguments are the same to Bio::SeqFeature::Generic-Enew() and
Bio::Graphics::Feature-Enew(). The most important difference is the
B<-store> option, which if present creates the object in a
-Bio::DB::SeqFeature::Store database, and he B<-index> option, which
+Bio::DB::SeqFeature::Store database, and the B<-index> option, which
controls whether the feature will be indexed for retrieval (default is
true). Ordinarily, you would only want to turn indexing on when
creating top level features, and off only when storing
@@ -140,7 +142,7 @@
Add one or more subfeatures to the feature. For best results,
subfeatures should be of the same class as the parent feature
-(i.e. don't try mixing Bio::DB::SeqFeature::NormalizedFeature with
+(i.e. do not try mixing Bio::DB::SeqFeature::NormalizedFeature with
other feature types).
An alias for this method is add_segment().
@@ -189,7 +191,7 @@
This method will get or set the Bio::DB::SeqFeature::Store object that
is associated with the feature. After changing the store, you should
-probably unset the feature's primary_id() and call update() to ensure
+probably unset the primary_id() of the feature and call update() to ensure
that the object is written into the database as a new feature.
=cut
@@ -259,7 +261,7 @@
Title : primary_id
Usage : $id = $feature->primary_id([$new_id])
- Function: get/set the feature's database ID
+ Function: get/set the database ID of the feature
Returns : the current primary ID
Args : none
Status : public
@@ -296,7 +298,7 @@
=item $boolean = $feature-Etype_match(@list_of_types)
-Internal method that will return true if the feature's primary_tag and
+Internal method that will return true if the primary_tag of the feature and
source_tag match any of the list of types (in primary_tag:source_tag
format) provided.
@@ -412,5 +414,3 @@
it under the same terms as Perl itself.
=cut
-
-
From bugzilla-daemon at portal.open-bio.org Sun Jul 6 01:24:20 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Sun, 6 Jul 2008 01:24:20 -0400
Subject: [Bioperl-guts-l] [Bug 2537] New: num_conserved reports incorrect
value during FASTA34 parsing
Message-ID:
http://bugzilla.open-bio.org/show_bug.cgi?id=2537
Summary: num_conserved reports incorrect value during FASTA34
parsing
Product: BioPerl
Version: 1.5 branch
Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: Bio::Search/Bio::SearchIO
AssignedTo: bioperl-guts-l at bioperl.org
ReportedBy: VAgarwal at mail.utexas.edu
The methods "num_identical" and "num_conserved" report 31 on the attached
sample input, when the correct value should be 30 since there are 2 mismatches.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From bugzilla-daemon at portal.open-bio.org Sun Jul 6 01:25:12 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Sun, 6 Jul 2008 01:25:12 -0400
Subject: [Bioperl-guts-l] [Bug 2537] num_conserved reports incorrect value
during FASTA34 parsing
In-Reply-To:
Message-ID: <200807060525.m665PCw0022891@portal.open-bio.org>
http://bugzilla.open-bio.org/show_bug.cgi?id=2537
------- Comment #1 from VAgarwal at mail.utexas.edu 2008-07-06 01:25 EST -------
Created an attachment (id=969)
--> (http://bugzilla.open-bio.org/attachment.cgi?id=969&action=view)
sample FASTA34 input for SearchIO
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From bugzilla-daemon at portal.open-bio.org Mon Jul 7 20:58:14 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Mon, 7 Jul 2008 20:58:14 -0400
Subject: [Bioperl-guts-l] [Bug 2539] New: SeqIO::pir parser fails for codes
other than P1
Message-ID:
http://bugzilla.open-bio.org/show_bug.cgi?id=2539
Summary: SeqIO::pir parser fails for codes other than P1
Product: BioPerl
Version: main-trunk
Platform: All
OS/Version: All
Status: NEW
Keywords: Bioperl
Severity: normal
Priority: P2
Component: Bio::SeqIO
AssignedTo: bioperl-guts-l at bioperl.org
ReportedBy: rsuri at cs.utexas.edu
At line 107 of Bio/SeqIO/pir.pm, the parser throws an exception if the sequence
lacks a leading ">P1". According to the PIR format description
(http://www.cmbi.kun.nl/bioinf/tools/crab_pir.html) linked to from the bioperl
wiki (http://www.bioperl.org/wiki/PIR_sequence_format), valid PIR/NBRF
sequences may begin with any one of several different two-letter codes. I've
encountered this bug in both versions I've downloaded -- 1.4.0 and 1.5.2.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From cjfields at dev.open-bio.org Mon Jul 7 23:39:37 2008
From: cjfields at dev.open-bio.org (Christopher John Fields)
Date: Mon, 7 Jul 2008 23:39:37 -0400
Subject: [Bioperl-guts-l] [14753] bioperl-live/trunk/Bio/SeqIO/pir.pm: bug
2539
Message-ID: <200807080339.m683dbST008128@dev.open-bio.org>
Revision: 14753
Author: cjfields
Date: 2008-07-07 23:39:36 -0400 (Mon, 07 Jul 2008)
Log Message:
-----------
bug 2539
Modified Paths:
--------------
bioperl-live/trunk/Bio/SeqIO/pir.pm
Modified: bioperl-live/trunk/Bio/SeqIO/pir.pm
===================================================================
--- bioperl-live/trunk/Bio/SeqIO/pir.pm 2008-07-04 20:07:19 UTC (rev 14752)
+++ bioperl-live/trunk/Bio/SeqIO/pir.pm 2008-07-08 03:39:36 UTC (rev 14753)
@@ -72,6 +72,8 @@
use base qw(Bio::SeqIO);
+our %VALID_TYPE = map {$_ => 1} qw(P1 F1 DL DC RL RC XX);
+
sub _initialize {
my($self, at args) = @_;
$self->SUPER::_initialize(@args);
@@ -102,10 +104,16 @@
my ($top, $desc,$seq) = ( $line =~ /^(.+?)\n(.+?)\n([^>]*)/s ) or
$self->throw("Cannot parse entry PIR entry [$line]");
+ my ( $type,$id );
+ if ( $top =~ /^>?(\S{2});(\S+)\s*$/ ) {
+ ( $type,$id ) = ($1, $2);
+ if (!exists $VALID_TYPE{$type} ) {
+ $self->throw("PIR stream read attempted without proper two-letter sequence code [ $type ]");
+ }
+ } else {
+ $self->throw("Line does not match PIR format [ $line ]");
+ }
- my ( $type,$id ) = ( $top =~ /^>?([PF])1;(\S+)\s*$/ ) or
- $self->throw("PIR stream read attempted without leading '>P1;' [ $line ]");
-
# P - indicates complete protein
# F - indicates protein fragment
# not sure how to stuff these into a Bio object
From bugzilla-daemon at portal.open-bio.org Mon Jul 7 23:40:44 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Mon, 7 Jul 2008 23:40:44 -0400
Subject: [Bioperl-guts-l] [Bug 2539] SeqIO::pir parser fails for codes other
than P1
In-Reply-To:
Message-ID: <200807080340.m683eihx008514@portal.open-bio.org>
http://bugzilla.open-bio.org/show_bug.cgi?id=2539
cjfields at uiuc.edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Comment #1 from cjfields at uiuc.edu 2008-07-07 23:40 EST -------
Committed a fix to svn; this should work for only the valid sequence types
specified in the link. Thanks for pointing that out.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From bugzilla-daemon at portal.open-bio.org Mon Jul 7 23:51:05 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Mon, 7 Jul 2008 23:51:05 -0400
Subject: [Bioperl-guts-l] [Bug 2504] Bug in Bio::SearchIO module
In-Reply-To:
Message-ID: <200807080351.m683p52o008841@portal.open-bio.org>
http://bugzilla.open-bio.org/show_bug.cgi?id=2504
------- Comment #4 from cjfields at uiuc.edu 2008-07-07 23:51 EST -------
Will need a response. If not I'll have to mark this as invalid.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From cjfields at dev.open-bio.org Tue Jul 8 00:05:32 2008
From: cjfields at dev.open-bio.org (Christopher John Fields)
Date: Tue, 8 Jul 2008 00:05:32 -0400
Subject: [Bioperl-guts-l] [14754] bioperl-live/trunk/Bio/Tree/TreeI.pm:
Can't inherit from oneself
Message-ID: <200807080405.m6845W2g008183@dev.open-bio.org>
Revision: 14754
Author: cjfields
Date: 2008-07-08 00:05:32 -0400 (Tue, 08 Jul 2008)
Log Message:
-----------
Can't inherit from oneself
Modified Paths:
--------------
bioperl-live/trunk/Bio/Tree/TreeI.pm
Modified: bioperl-live/trunk/Bio/Tree/TreeI.pm
===================================================================
--- bioperl-live/trunk/Bio/Tree/TreeI.pm 2008-07-08 03:39:36 UTC (rev 14753)
+++ bioperl-live/trunk/Bio/Tree/TreeI.pm 2008-07-08 04:05:32 UTC (rev 14754)
@@ -73,7 +73,7 @@
package Bio::Tree::TreeI;
use strict;
-use base qw(Bio::Tree::TreeI);
+use base qw(Bio::Root::RootI);
=head2 get_nodes
From bugzilla-daemon at portal.open-bio.org Tue Jul 8 11:07:20 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Tue, 8 Jul 2008 11:07:20 -0400
Subject: [Bioperl-guts-l] [Bug 2504] Bug in Bio::SearchIO module
In-Reply-To:
Message-ID: <200807081507.m68F7KuX006296@portal.open-bio.org>
http://bugzilla.open-bio.org/show_bug.cgi?id=2504
------- Comment #5 from kashi.mail at gmail.com 2008-07-08 11:07 EST -------
Hi, sorry for the delay.
The Bio::SearchIO version we are using is v 1.39.4.1
Thats the latest available on CPAN.
Please advice
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From lstein at dev.open-bio.org Tue Jul 8 12:54:30 2008
From: lstein at dev.open-bio.org (Lincoln Stein)
Date: Tue, 8 Jul 2008 12:54:30 -0400
Subject: [Bioperl-guts-l] [14755]
bioperl-live/trunk/Bio/Graphics/FeatureFile.pm: accept $seq_id or $seqid in
link substitution rules
Message-ID: <200807081654.m68GsUkX016107@dev.open-bio.org>
Revision: 14755
Author: lstein
Date: 2008-07-08 12:54:29 -0400 (Tue, 08 Jul 2008)
Log Message:
-----------
accept $seq_id or $seqid in link substitution rules
Modified Paths:
--------------
bioperl-live/trunk/Bio/Graphics/FeatureFile.pm
Modified: bioperl-live/trunk/Bio/Graphics/FeatureFile.pm
===================================================================
--- bioperl-live/trunk/Bio/Graphics/FeatureFile.pm 2008-07-08 04:05:32 UTC (rev 14754)
+++ bioperl-live/trunk/Bio/Graphics/FeatureFile.pm 2008-07-08 16:54:29 UTC (rev 14755)
@@ -241,7 +241,7 @@
=over 4
-=item ($rendered,$panel) = $features-Erender([$panel, $position_to_insert, $options, $max_bump, $max_label, $selector])
+=item ($rendered,$panel,$tracks) = $features-Erender([$panel, $position_to_insert, $options, $max_bump, $max_label, $selector])
Render features in the data set onto the indicated
Bio::Graphics::Panel. If no panel is specified, creates one.
@@ -267,8 +267,8 @@
In a scalar context returns the number of tracks rendered. In a list
context, returns a three-element list containing the number of
-features rendered, the created panel, and a list of all the track
-objects created.
+features rendered, the created panel, and an array ref of all the
+track objects created.
=back
@@ -475,8 +475,6 @@
my $old_state = $self->{state};
my $new_state = $self->_state_transition($line);
-# warn "$old_state=>$new_state: $line";
-
if ($new_state ne $old_state) {
delete $self->{current_config};
delete $self->{current_tag};
@@ -1289,13 +1287,15 @@
=cut
sub feature2label {
- my $self = shift;
+ my $self = shift;
my $feature = shift;
- my $type = $feature->primary_tag or return;
+ my $type = $feature->can('type') ? $feature->type
+ : $feature->primary_tag;
+ $type or return;
(my $basetype = $type) =~ s/:.+$//;
- my @labels = $self->type2label($type);
- @labels = $self->type2label($basetype) unless @labels;
- @labels = ($type) unless @labels;;
+ my @labels = $self->type2label($type);
+ @labels = $self->type2label($basetype) unless @labels;
+ @labels = ($type) unless @labels;
wantarray ? @labels : $labels[0];
}
@@ -1326,7 +1326,6 @@
require CGI unless defined &CGI::escape;
my $n;
$linkrule ||= ''; # prevent uninit warning
-# my $seq_id = $feature->can('location') ? $feature->location->seq_id : $feature->seq_id;
my $seq_id = $feature->can('seq_id') ? $feature->seq_id() : $feature->location->seq_id();
$seq_id ||= $feature->seq_id; #fallback
$linkrule =~ s/\$(\w+)/
@@ -1337,6 +1336,7 @@
: $1 eq 'type' ? eval {$feature->method} || $feature->primary_tag || ''
: $1 eq 'method' ? eval {$feature->method} || $feature->primary_tag || ''
: $1 eq 'source' ? eval {$feature->source} || $feature->source_tag || ''
+ : $1 =~ 'seq_?id' ? eval{$feature->seq_id} || eval{$feature->location->seq_id} || ''
: $1 eq 'start' ? $feature->start || ''
: $1 eq 'end' ? $feature->end || ''
: $1 eq 'stop' ? $feature->end || ''
@@ -1344,7 +1344,7 @@
: $1 eq 'segend' ? $panel->end || ''
: $1 eq 'description' ? eval {join '',$feature->notes} || ''
: $1 eq 'id' ? $feature->feature_id || ''
- : $1
+ : '$'.$1
)
/exg;
return $linkrule;
@@ -1354,11 +1354,15 @@
my $self = shift;
my ($feature,$panel) = @_;
- for my $label ($self->feature2label($feature)) {
- my $linkrule = $self->setting($label,'link');
- $linkrule = $self->setting(general=>'link') unless defined $linkrule;
- return $self->link_pattern($linkrule,$feature,$panel);
+ my ($linkrule) = $feature->each_tag_value('link');
+
+ unless ($linkrule) {
+ for my $label ($self->feature2label($feature)) {
+ $linkrule ||= $self->setting($label,'link');
+ $linkrule ||= $self->setting(general=>'link');
+ }
}
+ return $self->link_pattern($linkrule,$feature,$panel);
}
sub make_title {
@@ -1400,7 +1404,7 @@
my $self = shift;
my $type = shift;
$self->{_type2label} ||= $self->invert_types;
- my @labels = keys %{$self->{_type2label}{$type}};
+ my @labels = keys %{$self->{_type2label}{lc $type}};
wantarray ? @labels : $labels[0]
}
From bugzilla-daemon at portal.open-bio.org Tue Jul 8 19:42:24 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Tue, 8 Jul 2008 19:42:24 -0400
Subject: [Bioperl-guts-l] [Bug 2534] uniprot_trembl parsing
In-Reply-To:
Message-ID: <200807082342.m68NgOfV030631@portal.open-bio.org>
http://bugzilla.open-bio.org/show_bug.cgi?id=2534
------- Comment #1 from cjfields at uiuc.edu 2008-07-08 19:42 EST -------
I can't reproduce the errors below. Are you using the latest version of
BioPerl or, even more preferably, the latest code from Subversion? This may be
fixed already.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From bugzilla-daemon at portal.open-bio.org Tue Jul 8 22:43:23 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Tue, 8 Jul 2008 22:43:23 -0400
Subject: [Bioperl-guts-l] [Bug 2504] Bug in Bio::SearchIO module
In-Reply-To:
Message-ID: <200807090243.m692hNVp003978@portal.open-bio.org>
http://bugzilla.open-bio.org/show_bug.cgi?id=2504
cjfields at uiuc.edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Comment #6 from cjfields at uiuc.edu 2008-07-08 22:43 EST -------
That is from the 1.5.2 release. I suggest updating to the latest code from
Subversion; several bug fixes were made to Bio:SearchIO::blast (the actual
parser).
You can either follow the instructions for getting the code directly from
Subversion on the Bioperl wiki or use the nightly build archives
(bioperl-live):
http://www.bioperl.org/DIST/nightly_builds/
I'm closing this out for now; if the problem persists feel free to reopen this.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From bugzilla-daemon at portal.open-bio.org Wed Jul 9 11:17:17 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Wed, 9 Jul 2008 11:17:17 -0400
Subject: [Bioperl-guts-l] [Bug 2534] uniprot_trembl parsing
In-Reply-To:
Message-ID: <200807091517.m69FHHS4004132@portal.open-bio.org>
http://bugzilla.open-bio.org/show_bug.cgi?id=2534
------- Comment #2 from y-bushmanova at northwestern.edu 2008-07-09 11:17 EST -------
(In reply to comment #1)
> I can't reproduce the errors below. Are you using the latest version of
> BioPerl or, even more preferably, the latest code from Subversion? This may be
> fixed already.
>
I'm using bioperl-live. Sequences from uniprot_trembl_intervebrates.dat that
cause problems:
ID A2T406_9METZ Unreviewed; 532 AA.
AC A2T406;
DT 06-MAR-2007, integrated into UniProtKB/TrEMBL.
DT 06-MAR-2007, sequence version 1.
DT 10-JUN-2008, entry version 12.
DE Cytochrome c oxidase subunit I (EC 1.9.3.1).
GN Name=cox1;
OS Placozoan sp. BZ10101.
OG Mitochondrion.
OC Eukaryota; Metazoa; Placozoa; unclassified Placozoa.
OX NCBI_TaxID=401703;
RN [1]
RP NUCLEOTIDE SEQUENCE.
RC STRAIN=BZ10101;
RA Signorovitch A.Y., Buss L.W., Dellaporta S.L.;
RL Submitted (AUG-2006) to the EMBL/GenBank/DDBJ databases.
CC -!- FUNCTION: Cytochrome c oxidase is the component of the respiratory
CC chain that catalyzes the reduction of oxygen to water. Subunits 1-
CC 3 form the functional core of the enzyme complex. CO I is the
CC catalytic subunit of the enzyme. Electrons originating in
CC cytochrome c are transferred via the copper A center of subunit 2
CC and heme A of subunit 1 to the bimetallic center formed by heme A3
CC and copper B (By similarity).
CC -!- CATALYTIC ACTIVITY: 4 ferrocytochrome c + O(2) + 4 H(+) = 4
CC ferricytochrome c + 2 H(2)O.
CC -!- PATHWAY: Energy metabolism; oxidative phosphorylation.
CC -!- SUBCELLULAR LOCATION: Mitochondrion inner membrane; Multi-pass
CC membrane protein (By similarity).
CC -!- SIMILARITY: Belongs to the heme-copper respiratory oxidase family.
CC -----------------------------------------------------------------------
DR EMBL; DQ648200; ABG38102.1; -; Genomic_DNA.
DR SMR; A0SMW5; 1-207.
DR GO; GO:0016021; C:integral to membrane; IEA:InterPro.
DR GO; GO:0005746; C:mitochondrial respiratory chain; IEA:UniProtKB-KW.
DR GO; GO:0005507; F:copper ion binding; IEA:UniProtKB-KW.
DR GO; GO:0004129; F:cytochrome-c oxidase activity; IEA:EC.
DR GO; GO:0009055; F:electron carrier activity; IEA:InterPro.
DR GO; GO:0020037; F:heme binding; IEA:InterPro.
DR GO; GO:0005506; F:iron ion binding; IEA:InterPro.
DR GO; GO:0009060; P:aerobic respiration; IEA:InterPro.
DR GO; GO:0006810; P:transport; IEA:UniProtKB-KW.
DR InterPro; IPR000883; COX1.
DR InterPro; IPR001360; Glyco_hydro_1.
DR Gene3D; G3DSA:1.20.210.10; COX1; 1.
DR PANTHER; PTHR10422; COX1; 1.
DR Pfam; PF00115; COX1; 1.
DR PRINTS; PR01165; CYCOXIDASEI.
DR PROSITE; PS50855; COX1; 1.
DR PROSITE; PS00572; GLYCOSYL_HYDROL_F1_1; UNKNOWN_1.
PE 3: Inferred from homology;
KW Copper; Electron transport; Heme; Inner membrane; Membrane;
KW Mitochondrion; Oxidoreductase; Respiratory chain; Transmembrane;
KW Transport.
FT NON_TER 1 1
FT NON_TER 212 212
SQ SEQUENCE 212 AA; 22533 MW; A7084800DD0E80BF CRC64;
GWSGMVGTSL SMLIRAELGR PGTFIGDDQI YNVVVTAHAF VMIFFMVMPI LIGGFGNWLV
PLMLGAPDMA FPRMNNMSFW FLPPSLTLLL SSSIVENGAG TGWTVYPPLS AAIAHSGASV
DLAIFSLHLA GVSSILGSVN FITTVINMRA NGITLDRMPL IVWSVVITTV LLLLSLPVLA
GAITMLLTDR NLNTSFFDPA SGGAPIMPTT FV
//
ID Q17S80_9EUCA Unreviewed; 99 AA.
AC Q17S80;
DT 25-JUL-2006, integrated into UniProtKB/TrEMBL.
DT 25-JUL-2006, sequence version 1.
DT 08-APR-2008, entry version 13.
DE Histone H3 (Fragment).
OS Gubernatoriana gubernatoris.
OC Eukaryota; Metazoa; Arthropoda; Crustacea; Malacostraca;
OC Eumalacostraca; Eucarida; Decapoda; Pleocyemata; Brachyura;
OC Eubrachyura; Potamoidea; Gecarcinucidae; Gubernatoria.
OX NCBI_TaxID=324905;
RN [1]
RP NUCLEOTIDE SEQUENCE.
RX PubMed=16621611; DOI=10.1016/j.ympev.2006.02.022;
RA Daniels S.R., Cumberlidge N., Perez-Losada M., Marijnissen S.A.,
RA Crandall K.A.;
RT "Evolution of Afrotropical freshwater crab lineages obscured by
RT morphological convergence.";
RL Mol. Phylogenet. Evol. 40:227-235(2006).
CC -!- SUBUNIT: The nucleosome is a histone octamer containing two
CC molecules each of H2A, H2B, H3 and H4 assembled in one H3-H4
CC heterotetramer and two H2A-H2B heterodimers. The octamer wraps
CC approximately 147 bp of DNA (By similarity).
CC -!- SIMILARITY: Belongs to the histone H3 family.
CC -----------------------------------------------------------------------
CC Copyrighted by the UniProt Consortium, see http://www.uniprot.org/terms
CC Distributed under the Creative Commons Attribution-NoDerivs License
CC -----------------------------------------------------------------------
DR EMBL; AY919132; AAY18715.1; -; Genomic_DNA.
DR SMR; Q17S79; 4-102.
DR GO; GO:0000786; C:nucleosome; IEA:InterPro.
DR GO; GO:0005634; C:nucleus; IEA:InterPro.
DR GO; GO:0003677; F:DNA binding; IEA:InterPro.
DR GO; GO:0006334; P:nucleosome assembly; IEA:InterPro.
DR InterPro; IPR009072; Histone-fold.
DR InterPro; IPR007125; Histone_core_D.
DR InterPro; IPR000164; Histone_H3.
DR Gene3D; G3DSA:1.10.20.10; Histone-fold; 1.
DR PANTHER; PTHR11426; Histone_H3; 1.
DR Pfam; PF00125; Histone; 1.
DR PRINTS; PR00622; HISTONEH3.
DR SMART; SM00428; H3; 1.
DR PROSITE; PS00322; HISTONE_H3_1; UNKNOWN_1.
DR PROSITE; PS00959; HISTONE_H3_2; 1.
PE 3: Inferred from homology;
KW Chromosomal protein; DNA-binding; Nucleosome core; Nucleus.
FT NON_TER 102 102
SQ SEQUENCE 102 AA; 11530 MW; B447EE06FFC09593 CRC64;
MAXYKQTARK STGGKAPRKQ LATKAARKSA PATGGVKKPH RYRPGTVALR EIRRYQKSTE
LLIRKLPFQR LVREIAQDFK TDLRFQSSAV MALQEASEAY LV
//
ID Q7JRC9_DROME Unreviewed; 635 AA.
AC Q7JRC9;
DT 03-OCT-2006, integrated into UniProtKB/TrEMBL.
DT 03-OCT-2006, sequence version 1.
DT 29-APR-2008, entry version 16.
DE RE73310p (CG30496-PA).
GN Name=CG30493;CG30496;l(2)08492; ORFNames=CG30496, Dmel_CG30496;
OS Drosophila melanogaster (Fruit fly).
OC Eukaryota; Metazoa; Arthropoda; Hexapoda; Insecta; Pterygota;
OC Neoptera; Endopterygota; Diptera; Brachycera; Muscomorpha;
OC Ephydroidea; Drosophilidae; Drosophila; Sophophora.
OX NCBI_TaxID=7227;
RN [1]
RP NUCLEOTIDE SEQUENCE.
RC STRAIN=Berkeley;
RA Stapleton M., Brokstein P., Hong L., Agbayani A., Carlson J.,
RA Champe M., Chavez C., Dorsett V., Dresnek D., Farfan D., Frise E.,
RA George R., Gonzalez M., Guarin H., Kronmiller B., Li P., Liao G.,
RA Miranda A., Mungall C.J., Nunoo J., Pacleb J., Paragas V., Park S.,
RA Patel S., Phouanenavong S., Wan K., Yu C., Lewis S.E., Rubin G.M.,
RA Celniker S.;
RL Submitted (NOV-2002) to the EMBL/GenBank/DDBJ databases.
RN [2]
RP NUCLEOTIDE SEQUENCE [LARGE SCALE GENOMIC DNA].
RX MEDLINE=20196006; PubMed=10731132; DOI=10.1126/science.287.5461.2185;
RA Adams M.D., Celniker S.E., Holt R.A., Evans C.A., Gocayne J.D.,
RA Amanatides P.G., Scherer S.E., Li P.W., Hoskins R.A., Galle R.F.,
RA George R.A., Lewis S.E., Richards S., Ashburner M., Henderson S.N.,
RA Sutton G.G., Wortman J.R., Yandell M.D., Zhang Q., Chen L.X.,
RA Brandon R.C., Rogers Y.-H.C., Blazej R.G., Champe M., Pfeiffer B.D.,
RA Wan K.H., Doyle C., Baxter E.G., Helt G., Nelson C.R., Miklos G.L.G.,
RA Abril J.F., Agbayani A., An H.-J., Andrews-Pfannkoch C., Baldwin D.,
RA Ballew R.M., Basu A., Baxendale J., Bayraktaroglu L., Beasley E.M.,
RA Beeson K.Y., Benos P.V., Berman B.P., Bhandari D., Bolshakov S.,
RA Borkova D., Botchan M.R., Bouck J., Brokstein P., Brottier P.,
RA Burtis K.C., Busam D.A., Butler H., Cadieu E., Center A., Chandra I.,
RA Cherry J.M., Cawley S., Dahlke C., Davenport L.B., Davies P.,
RA de Pablos B., Delcher A., Deng Z., Mays A.D., Dew I., Dietz S.M.,
RA Dodson K., Doup L.E., Downes M., Dugan-Rocha S., Dunkov B.C., Dunn P.,
RA Durbin K.J., Evangelista C.C., Ferraz C., Ferriera S., Fleischmann W.,
RA Fosler C., Gabrielian A.E., Garg N.S., Gelbart W.M., Glasser K.,
RA Glodek A., Gong F., Gorrell J.H., Gu Z., Guan P., Harris M.,
RA Harris N.L., Harvey D.A., Heiman T.J., Hernandez J.R., Houck J.,
RA Hostin D., Houston K.A., Howland T.J., Wei M.-H., Ibegwam C.,
RA Jalali M., Kalush F., Karpen G.H., Ke Z., Kennison J.A., Ketchum K.A.,
RA Kimmel B.E., Kodira C.D., Kraft C.L., Kravitz S., Kulp D., Lai Z.,
RA Lasko P., Lei Y., Levitsky A.A., Li J.H., Li Z., Liang Y., Lin X.,
RA Liu X., Mattei B., McIntosh T.C., McLeod M.P., McPherson D.,
RA Merkulov G., Milshina N.V., Mobarry C., Morris J., Moshrefi A.,
RA Mount S.M., Moy M., Murphy B., Murphy L., Muzny D.M., Nelson D.L.,
RA Nelson D.R., Nelson K.A., Nixon K., Nusskern D.R., Pacleb J.M.,
RA Palazzolo M., Pittman G.S., Pan S., Pollard J., Puri V., Reese M.G.,
RA Reinert K., Remington K., Saunders R.D.C., Scheeler F., Shen H.,
RA Shue B.C., Siden-Kiamos I., Simpson M., Skupski M.P., Smith T.J.,
RA Spier E., Spradling A.C., Stapleton M., Strong R., Sun E.,
RA Svirskas R., Tector C., Turner R., Venter E., Wang A.H., Wang X.,
RA Wang Z.-Y., Wassarman D.A., Weinstock G.M., Weissenbach J.,
RA Williams S.M., Woodage T., Worley K.C., Wu D., Yang S., Yao Q.A.,
RA Ye J., Yeh R.-F., Zaveri J.S., Zhan M., Zhang G., Zhao Q., Zheng L.,
RA Zheng X.H., Zhong F.N., Zhong W., Zhou X., Zhu S.C., Zhu X.,
RA Smith H.O., Gibbs R.A., Myers E.W., Rubin G.M., Venter J.C.;
RT "The genome sequence of Drosophila melanogaster.";
RL Science 287:2185-2195(2000).
RN [3]
RP NUCLEOTIDE SEQUENCE [LARGE SCALE GENOMIC DNA].
RX MEDLINE=22426069; PubMed=12537572;
RA Misra S., Crosby M.A., Mungall C.J., Matthews B.B., Campbell K.S.,
RA Hradecky P., Huang Y., Kaminker J.S., Millburn G.H., Prochnik S.E.,
RA Smith C.D., Tupy J.L., Whitfield E.J., Bayraktaroglu L., Berman B.P.,
RA Bettencourt B.R., Celniker S.E., de Grey A.D.N.J., Drysdale R.A.,
RA Harris N.L., Richter J., Russo S., Schroeder A.J., Shu S.Q.,
RA Stapleton M., Yamada C., Ashburner M., Gelbart W.M., Rubin G.M.,
RA Lewis S.E.;
RT "Annotation of the Drosophila melanogaster euchromatic genome: a
RT systematic review.";
RL Genome Biol. 3:RESEARCH0083.1-RESEARCH0083.22(2002).
CC -----------------------------------------------------------------------
CC Copyrighted by the UniProt Consortium, see http://www.uniprot.org/terms
CC Distributed under the Creative Commons Attribution-NoDerivs License
CC -----------------------------------------------------------------------
DR EMBL; AE013599; AAM71105.1; -; Genomic_DNA.
DR EMBL; BT001741; AAN71496.1; -; mRNA.
DR RefSeq; NP_724595.1; -.
DR UniGene; Dm.33734; -.
DR GeneID; 246652; -.
DR KEGG; dme:Dmel_CG30496; -.
DR NMPDR; fig|7227.3.peg.3714; -.
DR FlyBase; FBgn0050496; CG30496.
PE 2: Evidence at transcript level;
KW Complete proteome.
SQ SEQUENCE 635 AA; 72477 MW; 8F16018D54B69F17 CRC64;
MQEQEMEVEV GDPAKASNLL RLIKQLLLEK AYDGVRMLFQ SAQESEKNTR LL
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From cjfields at dev.open-bio.org Wed Jul 9 12:05:32 2008
From: cjfields at dev.open-bio.org (Christopher John Fields)
Date: Wed, 9 Jul 2008 12:05:32 -0400
Subject: [Bioperl-guts-l] [14756] bioperl-live/trunk/Bio/SeqIO: bug 2534
Message-ID: <200807091605.m69G5WCc019472@dev.open-bio.org>
Revision: 14756
Author: cjfields
Date: 2008-07-09 12:05:31 -0400 (Wed, 09 Jul 2008)
Log Message:
-----------
bug 2534
Modified Paths:
--------------
bioperl-live/trunk/Bio/SeqIO/swiss.pm
bioperl-live/trunk/Bio/SeqIO/swissdriver.pm
Modified: bioperl-live/trunk/Bio/SeqIO/swiss.pm
===================================================================
--- bioperl-live/trunk/Bio/SeqIO/swiss.pm 2008-07-08 16:54:29 UTC (rev 14755)
+++ bioperl-live/trunk/Bio/SeqIO/swiss.pm 2008-07-09 16:05:31 UTC (rev 14756)
@@ -403,6 +403,7 @@
my @genenames;
for my $section (split(m{\s*;\s*},$n)) {
my ($tag, $rest) = split("=",$section);
+ $rest ||= '';
for my $val (split(m{\s*,\s*},$rest)) {
push @genenames, [$tag => $val];
}
@@ -1200,10 +1201,9 @@
} else {
$species = $sci_name;
}
-
# is this organism of rank species or is it lower?
# (doesn't catch everything, but at least the guess isn't dangerous)
- if ($species =~ /subsp\.|var\./) {
+ if ($species && $species =~ /subsp\.|var\./) {
($species, $sub_species) = $species =~ /(.+)\s+((?:subsp\.|var\.).+)/;
}
}
Modified: bioperl-live/trunk/Bio/SeqIO/swissdriver.pm
===================================================================
--- bioperl-live/trunk/Bio/SeqIO/swissdriver.pm 2008-07-08 16:54:29 UTC (rev 14755)
+++ bioperl-live/trunk/Bio/SeqIO/swissdriver.pm 2008-07-09 16:05:31 UTC (rev 14756)
@@ -1,3 +1,4 @@
+# make as generic as possible (along with gbhandler, emblhandler)
# Let the code begin...
From bugzilla-daemon at portal.open-bio.org Wed Jul 9 12:07:40 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Wed, 9 Jul 2008 12:07:40 -0400
Subject: [Bioperl-guts-l] [Bug 2534] uniprot_trembl parsing
In-Reply-To:
Message-ID: <200807091607.m69G7e1L006918@portal.open-bio.org>
http://bugzilla.open-bio.org/show_bug.cgi?id=2534
------- Comment #3 from cjfields at uiuc.edu 2008-07-09 12:07 EST -------
Okay, it sort of reproduces now, but the errors are on a different line:
Use of uninitialized value $species in pattern match (m//) at
/Users/cjfields/bioperl/bioperl-live/Bio/SeqIO/swiss.pm line 1206, line
12.
Use of uninitialized value $species in pattern match (m//) at
/Users/cjfields/bioperl/bioperl-live/Bio/SeqIO/swiss.pm line 1206, line
73.
Use of uninitialized value $rest in split at
/Users/cjfields/bioperl/bioperl-live/Bio/SeqIO/swiss.pm line 406, line
203.
Use of uninitialized value $rest in split at
/Users/cjfields/bioperl/bioperl-live/Bio/SeqIO/swiss.pm line 406, line
203.
I have committed a fix for these but the errors (warnings, actually) are
harmless and spring from parsing names like 'Placozoan sp. BZ10101', where the
species is not given (hence the warning).
As for the SIGINT in Bio::DB::Taxonomy::list, again I don't see that; I tested
using perl 5.8.8 and perl 5.10 on Mac OS X 10.5.4. The line numbering is also
off (the line given is in a section of POD). Was this possibly from
interrupting the script?
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From miraceti at dev.open-bio.org Sun Jul 13 00:56:48 2008
From: miraceti at dev.open-bio.org (miraceti at dev.open-bio.org)
Date: Sun, 13 Jul 2008 00:56:48 -0400
Subject: [Bioperl-guts-l] [14757] bioperl-live/trunk: phyloxml: taxonomy,
distribution, annotation, events, date, etc
Message-ID: <200807130456.m6D4umIY027858@dev.open-bio.org>
Revision: 14757
Author: miraceti
Date: 2008-07-13 00:56:47 -0400 (Sun, 13 Jul 2008)
Log Message:
-----------
phyloxml: taxonomy, distribution, annotation, events, date, etc
Modified Paths:
--------------
bioperl-live/trunk/Bio/TreeIO/phyloxml.pm
bioperl-live/trunk/t/phyloxml.t
Modified: bioperl-live/trunk/Bio/TreeIO/phyloxml.pm
===================================================================
--- bioperl-live/trunk/Bio/TreeIO/phyloxml.pm 2008-07-09 16:05:31 UTC (rev 14756)
+++ bioperl-live/trunk/Bio/TreeIO/phyloxml.pm 2008-07-13 04:56:47 UTC (rev 14757)
@@ -226,7 +226,7 @@
$self->$method();
}
else {
- $self->element_default();
+ $self->element_annotation();
}
if ($reader->isEmptyElement) {
# do procedures for XML_READER_TYPE_END_ELEMENT since element is complete
@@ -237,7 +237,7 @@
$self->$method();
}
else {
- $self->end_element_default();
+ $self->end_element_annotation();
}
$self->{'_lastitem'}->{ $reader->name }--;
pop @{$self->{'_lastitem'}->{'current'}};
@@ -257,10 +257,11 @@
$self->$method();
}
else {
- $self->end_element_default();
+ $self->end_element_annotation();
}
$self->{'_lastitem'}->{ $reader->name }--;
pop @{$self->{'_lastitem'}->{'current'}};
+ $self->{'_currenttext'} = '';
}
}
@@ -312,6 +313,7 @@
my ($self) = @_;
$self->{'_currentitems'} = []; # holds nodes while parsing current level
$self->{'_currentnodes'} = []; # holds nodes while constructing tree
+ $self->{'_currentannotation'} = []; # holds annotationcollection
$self->{'_currenttext'} = '';
$self->{'_levelcnt'} = [];
$self->{'_id_link'} = {};
@@ -430,41 +432,84 @@
}
-=head2 element_default
+=head2 element_annotation
- Title : element_default
- Usage : $->element_default
+ Title : element_annotation
+ Usage : $->element_annotation
Function:
Returns : none
Args : none
=cut
-sub element_default
+sub element_annotation
{
my ($self) = @_;
my $reader = $self->{'_reader'};
my $current = $self->current_element();
my $prev = $self->prev_element();
- $self->debug("starting $current within $prev\n");
# read attributes of element
$self->processAttribute($self->current_attr);
$self->debug( "attr: ", %{$self->current_attr}, "\n");
+
+ # check idref
+ my $idref = $self->current_attr->{'id_ref'};
+ my $idsrc;
+ if ($idref) { $idsrc = $self->{'_id_link'}->{$idref}; }
+
+ # exception when id_src is defined but id_ref is not, or vice versa.
+ if ($idref xor $idsrc) {
+ $self->throw("id_ref and id_src incompatible: $idref, $idsrc");
+ }
+ $self->debug("starting $current within $prev\n");
+
+
+ # set _currentannotation
+ if ( ($idsrc && $idsrc->isa($self->nodetype)) || (!$idsrc && $prev eq 'clade') ) {
+ # find node to annotate
+ my $tnode;
+ if ($idsrc) {
+ $tnode = $idsrc;
+ }
+ else {
+ $tnode = $self->{'_currentitems'}->[-1];
+ }
+ my $ac = $tnode->annotation();
+ # add the new anncollection with the current element as key
+ my $newann = Bio::Annotation::Collection->new();
+ $ac->add_Annotation($current, $newann);
+ $self->debug("adding annotation -$current:$newann to $ac");
+ # push to current annotation
+ push (@{$self->{'_currentannotation'}}, $newann);
+ $self->debug("pushing ac ",$newann," to _currentannotation");
+ }
+ else {
+ my $ac = $self->{'_currentannotation'}->[-1];
+ $self->debug("currentann: $ac");
+ if ($ac) {
+ # add the new anncollection with the current element as key
+ my $newann = Bio::Annotation::Collection->new();
+ $ac->add_Annotation($current, $newann);
+ $self->debug("adding new ac $newann with key $current to ",$ac,"\n");
+ push (@{$self->{'_currentannotation'}}, $newann);
+ $self->debug("pushing ac ",$newann," to _currentannotation");
+ }
+ }
}
-=head2 end_element_default
+=head2 end_element_annotation
- Title : end_element_default
- Usage : $->end_element_default
+ Title : end_element_annotation
+ Usage : $->end_element_annotation
Function:
Returns : none
Args : none
=cut
-sub end_element_default
+sub end_element_annotation
{
my ($self) = @_;
my $reader = $self->{'_reader'};
@@ -487,18 +532,40 @@
$self->prev_attr->{$current} = $self->{'_currenttext'};
}
elsif ( ($idsrc && $idsrc->isa($self->nodetype)) || (!$idsrc && $prev eq 'clade') ) {
- $self->annotateNode( $current, $idsrc);
+ # pop from current annotation
+ my $ac = pop (@{$self->{'_currentannotation'}});
+ $self->debug("popping ac $ac from _currentannotation");
+ $self->annotateNode( $current, $ac);
+ # additional setups for compatibility with NodeI
+ my $tnode;
+ if ($idsrc) {
+ $tnode = $idsrc;
+ }
+ else {
+ $tnode = $self->{'_currentitems'}->[-1];
+ }
+ if ($current eq 'name') {
+ $tnode->id($self->{'_currenttext'});
+ }
+ elsif ($current eq 'branch_length') {
+ $tnode->branch_length($self->{'_currenttext'});
+ }
+ elsif ($current eq 'confidence') {
+ if ((exists $self->current_attr->{'type'}) && ($self->current_attr->{'type'} eq 'bootstrap')) {
+ $tnode->bootstrap($self->{'_currenttext'}); # this needs to change (adds 'B' annotation)
+ }
+ }
}
- elsif ($prev eq 'events') {
- }
- elsif ($prev eq 'annotation') {
- }
elsif ($prev eq 'sequence_relation') {
}
elsif ($prev eq 'clade_relation') {
}
else {
-
+ my $ac = pop (@{$self->{'_currentannotation'}});
+ $self->debug("popping ac $ac from _currentannotation");
+ if ($ac) {
+ $self->annotateNode( $current, $ac);
+ }
}
}
@@ -506,7 +573,7 @@
=head2 annotateNode
Title : annotateNode
- Usage : $->annotateNode( $element, $idsrc)
+ Usage : $->annotateNode( $element, $ac)
Function:
Returns : none
Args : none
@@ -515,26 +582,9 @@
sub annotateNode
{
- my ($self, $element, $idsrc) = @_;
-
- # find node to annotate
- my $tnode;
- if ($idsrc) {
- $tnode = $idsrc;
- }
- else {
- $tnode = $self->{'_currentitems'}->[-1];
- }
-
- # build new annotation
- my $newann;
- # if no attribute then add Annotation::SimpleValue
- if ( ! scalar keys %{$self->current_attr} ) {
- $newann = new Bio::Annotation::SimpleValue( -value => $self->{'_currenttext'} );
- }
+ my ($self, $element, $newac) = @_;
# if attribute exists then add Annotation::Collection
- else {
- $newann = Bio::Annotation::Collection->new();
+ if ( scalar keys %{$self->current_attr} ) {
my $newattr = Bio::Annotation::Collection->new();
foreach my $tag (keys %{$self->current_attr}) {
my $sv = new Bio::Annotation::SimpleValue(
@@ -542,28 +592,15 @@
);
$newattr->add_Annotation($tag, $sv);
}
- $newann->add_Annotation('_attr', $newattr);
+ $newac->add_Annotation('_attr', $newattr);
+ $self->debug("adding ac ", $newattr, " to $newac");
+ }
+ # if text exists add text as SimpleValue
+ if ( $self->{'_currenttext'} ) {
my $newvalue = new Bio::Annotation::SimpleValue( -value => $self->{'_currenttext'} );
- $newann->add_Annotation('_text', $newvalue);
+ $newac->add_Annotation('_text', $newvalue);
+ $self->debug("adding text ", $self->{'_currenttext'}, " to $newac");
}
- # add to current node annotation
- my $ac = $tnode->annotation();
- $ac->add_Annotation($element, $newann);
-
-
- # additional setups for compatibility with NodeI
- if ($element eq 'name') {
- $tnode->id($self->{'_currenttext'});
- }
- elsif ($element eq 'branch_length') {
- $tnode->branch_length($self->{'_currenttext'});
- }
- elsif ($element eq 'confidence') {
- if ((exists $self->current_attr->{'type'}) && ($self->current_attr->{'type'} eq 'bootstrap')) {
- $tnode->bootstrap($self->{'_currenttext'}); # this needs to change (adds 'B' annotation)
- }
- }
-
}
Modified: bioperl-live/trunk/t/phyloxml.t
===================================================================
--- bioperl-live/trunk/t/phyloxml.t 2008-07-09 16:05:31 UTC (rev 14756)
+++ bioperl-live/trunk/t/phyloxml.t 2008-07-13 04:56:47 UTC (rev 14757)
@@ -178,6 +178,9 @@
isa_ok($ac, 'Bio::AnnotationCollectionI');
my (@annotations) = $ac->get_Annotations('property');
isa_ok( $annotations[0], 'Bio::Annotation::Collection');
+diag("property:",$annotations[0]);
+my (@keys) = $annotations[0]->get_all_annotation_keys();
+diag("keys:", at keys);
my (@value) = $annotations[0]->get_Annotations('_text');
is($value[0]->as_text, 'Value: 1200 ');
if ($verbose > 0) {
From lstein at dev.open-bio.org Wed Jul 16 22:18:45 2008
From: lstein at dev.open-bio.org (Lincoln Stein)
Date: Wed, 16 Jul 2008 22:18:45 -0400
Subject: [Bioperl-guts-l] [14758]
bioperl-live/trunk/Bio/DB/SeqFeature/Store: workaround a bug that emerges
when the memory adapter automatically assigns a primary id of 0
Message-ID: <200807170218.m6H2Ij0P016921@dev.open-bio.org>
Revision: 14758
Author: lstein
Date: 2008-07-16 22:18:44 -0400 (Wed, 16 Jul 2008)
Log Message:
-----------
workaround a bug that emerges when the memory adapter automatically assigns a primary id of 0
Modified Paths:
--------------
bioperl-live/trunk/Bio/DB/SeqFeature/Store/GFF3Loader.pm
bioperl-live/trunk/Bio/DB/SeqFeature/Store/memory.pm
Modified: bioperl-live/trunk/Bio/DB/SeqFeature/Store/GFF3Loader.pm
===================================================================
--- bioperl-live/trunk/Bio/DB/SeqFeature/Store/GFF3Loader.pm 2008-07-13 04:56:47 UTC (rev 14757)
+++ bioperl-live/trunk/Bio/DB/SeqFeature/Store/GFF3Loader.pm 2008-07-17 02:18:44 UTC (rev 14758)
@@ -513,7 +513,7 @@
}
# Current feature is the same as a feature that was loaded earlier
- elsif (my $id = $self->{load_data}{Helper}->local2global($feature_id)) {
+ elsif (defined(my $id = $self->{load_data}{Helper}->local2global($feature_id))) {
$old_feat = $self->fetch($feature_id)
or $self->warn(<primary_id;
- $primary_id = @{$data} unless defined $primary_id;
+ $primary_id = 1 + @{$data} unless $primary_id; # primary id of 0 causes a downstream bug
$self->data->[$primary_id] = $obj;
$obj->primary_id($primary_id);
$self->{_index}{ids}{$primary_id} = undef if $indexed;
From cjfields at dev.open-bio.org Fri Jul 18 16:05:32 2008
From: cjfields at dev.open-bio.org (Christopher John Fields)
Date: Fri, 18 Jul 2008 16:05:32 -0400
Subject: [Bioperl-guts-l] [14759] bioperl-live/trunk/t/RemoteBlast.t:
bulletproof test; remote tabular BLAST is failing for some reason...
Message-ID: <200807182005.m6IK5Wb1023568@dev.open-bio.org>
Revision: 14759
Author: cjfields
Date: 2008-07-18 16:05:31 -0400 (Fri, 18 Jul 2008)
Log Message:
-----------
bulletproof test; remote tabular BLAST is failing for some reason...
Modified Paths:
--------------
bioperl-live/trunk/t/RemoteBlast.t
Modified: bioperl-live/trunk/t/RemoteBlast.t
===================================================================
--- bioperl-live/trunk/t/RemoteBlast.t 2008-07-17 02:18:44 UTC (rev 14758)
+++ bioperl-live/trunk/t/RemoteBlast.t 2008-07-18 20:05:31 UTC (rev 14759)
@@ -67,11 +67,11 @@
ok(1, 'Tabular BLAST');
my $remote_blast2 = Bio::Tools::Run::RemoteBlast->new
- ('-verbose' => $v,
+ ('-verbose' => 1,
'-prog' => $prog,
'-data' => $db,
'-readmethod' => 'blasttable',
- '-expect' => $e_val,
+ '-expect' => $e_val,
);
$remote_blast2->submit_parameter('ENTREZ_QUERY', 'Escherichia coli[ORGN]');
@@ -95,15 +95,16 @@
} else {
ok(1);
$remote_blast2->remove_rid($rid);
- my $result = $rc->next_result;
my $count = 0;
- while( my $hit = $result->next_hit ) {
- $count++;
- next unless ( $v > 0);
- print "sbjct name is ", $hit->name, "\n";
- while( my $hsp = $hit->next_hsp ) {
- print "score is ", $hsp->score, "\n";
- }
+ while (my $result = $rc->next_result) {
+ while( my $hit = $result->next_hit ) {
+ $count++;
+ next unless ( $v > 0);
+ print "sbjct name is ", $hit->name, "\n";
+ while( my $hsp = $hit->next_hsp ) {
+ print "score is ", $hsp->score, "\n";
+ }
+ }
}
is($count, 3);
}
From lstein at dev.open-bio.org Fri Jul 18 19:09:03 2008
From: lstein at dev.open-bio.org (Lincoln Stein)
Date: Fri, 18 Jul 2008 19:09:03 -0400
Subject: [Bioperl-guts-l] [14760] bioperl-live/trunk/Bio: fixed bug in the
memory adapter which prevented features with a primary ID of "0" from being
loaded
Message-ID: <200807182309.m6IN93tb023795@dev.open-bio.org>
Revision: 14760
Author: lstein
Date: 2008-07-18 19:09:02 -0400 (Fri, 18 Jul 2008)
Log Message:
-----------
fixed bug in the memory adapter which prevented features with a primary ID of "0" from being loaded
Modified Paths:
--------------
bioperl-live/trunk/Bio/DB/SeqFeature/Store/GFF3Loader.pm
bioperl-live/trunk/Bio/DB/SeqFeature/Store/memory.pm
bioperl-live/trunk/Bio/Graphics/FeatureFile.pm
Modified: bioperl-live/trunk/Bio/DB/SeqFeature/Store/GFF3Loader.pm
===================================================================
--- bioperl-live/trunk/Bio/DB/SeqFeature/Store/GFF3Loader.pm 2008-07-18 20:05:31 UTC (rev 14759)
+++ bioperl-live/trunk/Bio/DB/SeqFeature/Store/GFF3Loader.pm 2008-07-18 23:09:02 UTC (rev 14760)
@@ -449,8 +449,8 @@
my $has_loadid = defined $reserved->{ID}[0];
- my $feature_id = $reserved->{ID}[0] || $ld->{TemporaryID}++;
- my @parent_ids = @{$reserved->{Parent}} if $reserved->{Parent};
+ my $feature_id = defined $reserved->{ID}[0] ? $reserved->{ID}[0] : $ld->{TemporaryID}++;
+ my @parent_ids = @{$reserved->{Parent}} if defined $reserved->{Parent};
my $index_it = $ld->{IndexSubfeatures};
if (exists $reserved->{Index} || exists $reserved->{index}) {
@@ -472,7 +472,8 @@
# $unreserved->{ID}= $reserved->{ID} if exists $reserved->{ID};
# TEMPORARY HACKS TO SIMPLIFY DEBUGGING
- $feature_id ||= ''; $name ||= ''; # prevent uninit variable warnings
+ $feature_id = '' unless defined $feature_id;
+ $name = '' unless defined $name; # prevent uninit variable warnings
push @{$unreserved->{Alias}},$feature_id if $has_loadid && $feature_id ne $name;
$unreserved->{parent_id} = \@parent_ids if @parent_ids;
Modified: bioperl-live/trunk/Bio/DB/SeqFeature/Store/memory.pm
===================================================================
--- bioperl-live/trunk/Bio/DB/SeqFeature/Store/memory.pm 2008-07-18 20:05:31 UTC (rev 14759)
+++ bioperl-live/trunk/Bio/DB/SeqFeature/Store/memory.pm 2008-07-18 23:09:02 UTC (rev 14760)
@@ -168,7 +168,7 @@
if (my $fh = $self->{fasta_fh}) {
$fh->close;
$self->{fasta_db} = Bio::DB::Fasta->new($self->{fasta_file});
- } elsif (exists $self->{file_or_dir}) {
+ } elsif (exists $self->{file_or_dir} && -d $self->{file_or_dir}) {
$self->{fasta_db} = Bio::DB::Fasta->new($self->{file_or_dir});
}
}
Modified: bioperl-live/trunk/Bio/Graphics/FeatureFile.pm
===================================================================
--- bioperl-live/trunk/Bio/Graphics/FeatureFile.pm 2008-07-18 20:05:31 UTC (rev 14759)
+++ bioperl-live/trunk/Bio/Graphics/FeatureFile.pm 2008-07-18 23:09:02 UTC (rev 14760)
@@ -278,10 +278,15 @@
sub render {
my $self = shift;
- my $panel = shift;
- my ($position_to_insert,$options,
- $max_bump,$max_label,
- $selector,$range) = @_;
+ my $panel = shift; # 8 arguments
+ my ($position_to_insert,
+ $options,
+ $max_bump,
+ $max_label,
+ $selector,
+ $range,
+ $override_options
+ ) = @_;
my %seenit;
$panel ||= $self->new_panel;
@@ -309,21 +314,21 @@
my @base_config = $self->style('general');
- my @override = ();
+ my @pack_options = ();
if ($options && ref $options eq 'HASH') {
- @override = %$options;
+ @pack_options = %$options;
} else {
$options ||= 0;
if ($options == 1) { # compact
- push @override,(-bump => 0,-label=>0);
+ push @pack_options,(-bump => 0,-label=>0);
} elsif ($options == 2) { #expanded
- push @override,(-bump=>1);
+ push @pack_options,(-bump=>1);
} elsif ($options == 3) { #expand and label
- push @override,(-bump=>1,-label=>1);
+ push @pack_options,(-bump=>1,-label=>1);
} elsif ($options == 4) { #hyperexpand
- push @override,(-bump => 2);
+ push @pack_options,(-bump => 2);
} elsif ($options == 5) { #hyperexpand and label
- push @override,(-bump => 2,-label=>1);
+ push @pack_options,(-bump => 2,-label=>1);
}
}
@@ -351,6 +356,8 @@
push @auto_bump,(-bump => @$features < $max_bump) if defined $max_bump;
push @auto_bump,(-label => @$features < $max_label) if defined $max_label;
+ my @more_arguments = $override_options ? @$override_options : ();
+
my @config = ( -glyph => 'segments', # really generic
-bgcolor => $COLORS[$color++ % @COLORS],
-label => 1,
@@ -359,7 +366,8 @@
@auto_bump,
@base_config, # global
$self->style($label), # feature-specific
- @override,
+ @pack_options,
+ @more_arguments,
);
if (defined($position_to_insert)) {
@@ -733,6 +741,26 @@
}
}
+=head2 fallback_setting()
+
+ $value = $browser->setting(gene => 'fgcolor');
+
+Tries to find the setting for designated label (e.g. "gene") first. If
+this fails, looks in [TRACK DEFAULTS]. If this fails, looks in [GENERAL].
+
+=cut
+
+sub fallback_setting {
+ my $self = shift;
+ my ($label,$option) = @_;
+ for my $key ($label,'TRACK DEFAULTS','GENERAL') {
+ my $value = $self->setting($key,$option);
+ return $value if defined $value;
+ }
+ return;
+}
+
+
# return configuration information
# arguments are ($type) => returns tags for type
# ($type=>$tag) => returns values of tag on type
From bugzilla-daemon at portal.open-bio.org Sat Jul 19 12:28:14 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Sat, 19 Jul 2008 12:28:14 -0400
Subject: [Bioperl-guts-l] [Bug 2546] New: RemoteBlast blasttable parsing is
broken.
Message-ID:
http://bugzilla.open-bio.org/show_bug.cgi?id=2546
Summary: RemoteBlast blasttable parsing is broken.
Product: BioPerl
Version: main-trunk
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P4
Component: Bio::Search/Bio::SearchIO
AssignedTo: bioperl-guts-l at bioperl.org
ReportedBy: cjfields at uiuc.edu
Showed u in RemoteBlast.t errors. Fixed RemoteBlast.t to indicate the problem
and not fail part of the way through the tests, but the bug in
Bio::Tools::Run::RemoteBlast is still present.
I consider this a low-priority for the 1.6 release as this functionality is
likely not used often.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From bugzilla-daemon at portal.open-bio.org Sat Jul 19 12:28:27 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Sat, 19 Jul 2008 12:28:27 -0400
Subject: [Bioperl-guts-l] [Bug 2546] RemoteBlast blasttable parsing is
broken.
In-Reply-To:
Message-ID: <200807191628.m6JGSRtK013745@portal.open-bio.org>
http://bugzilla.open-bio.org/show_bug.cgi?id=2546
cjfields at uiuc.edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From miraceti at dev.open-bio.org Mon Jul 21 01:55:17 2008
From: miraceti at dev.open-bio.org (miraceti at dev.open-bio.org)
Date: Mon, 21 Jul 2008 01:55:17 -0400
Subject: [Bioperl-guts-l] [14761] bioperl-live/trunk: phyloxml: create
Bio::Seq for
Message-ID: <200807210555.m6L5tHTC003270@dev.open-bio.org>
Revision: 14761
Author: miraceti
Date: 2008-07-21 01:55:16 -0400 (Mon, 21 Jul 2008)
Log Message:
-----------
phyloxml: create Bio::Seq for
Modified Paths:
--------------
bioperl-live/trunk/Bio/Tree/AnnotatableNode.pm
bioperl-live/trunk/Bio/TreeIO/phyloxml.pm
bioperl-live/trunk/t/phyloxml.t
Modified: bioperl-live/trunk/Bio/Tree/AnnotatableNode.pm
===================================================================
--- bioperl-live/trunk/Bio/Tree/AnnotatableNode.pm 2008-07-18 23:09:02 UTC (rev 14760)
+++ bioperl-live/trunk/Bio/Tree/AnnotatableNode.pm 2008-07-21 05:55:16 UTC (rev 14761)
@@ -73,6 +73,7 @@
use strict;
use Bio::Annotation::Collection;
+use Bio::Seq;
use base qw(Bio::Tree::Node Bio::AnnotatableI);
=head2 new
@@ -97,7 +98,6 @@
if ($to_string_cb) {
$self->to_string_callback($to_string_cb);
}
- $self->debug("new AnnotatableNode\n");
return $self;
}
@@ -123,8 +123,8 @@
=head2 annotation
Title : annotation
- Usage : $ann = $seq->annotation or
- $seq->annotation($ann)
+ Usage : $ann = $node->annotation or
+ $node->annotation($ann)
Function: Gets or sets the annotation
Returns : Bio::AnnotationCollectionI object
Args : None or Bio::AnnotationCollectionI object
@@ -303,4 +303,36 @@
return $cb->($self);
}
+=head1 Methods for accessing Bio::Seq
+
+=cut
+
+=head2 sequence
+
+ Title : sequence
+ Usage : $ann = $node->sequence or
+ $node->sequence($seq)
+ Function: Gets or sets the sequence
+ Returns : Bio::SeqI object
+ Args : None or Bio::SeqI object
+See L and L
+for more information
+
+=cut
+
+sub sequence
+{
+ my ($self,$value) = @_;
+ if( defined $value ) {
+ $self->throw("object of class ".ref($value)." does not implement ".
+ "Bio::SeqI. Too bad.") unless $value->isa("Bio::SeqI");
+ $self->{'_sequence'} = $value;
+ }
+ #elsif( ! defined $self->{'_sequence'})
+ #{
+ # $self->{'_sequence'} = Bio::Seq->new();
+ #}
+ return $self->{'_sequence'};
+}
+
1;
Modified: bioperl-live/trunk/Bio/TreeIO/phyloxml.pm
===================================================================
--- bioperl-live/trunk/Bio/TreeIO/phyloxml.pm 2008-07-18 23:09:02 UTC (rev 14760)
+++ bioperl-live/trunk/Bio/TreeIO/phyloxml.pm 2008-07-21 05:55:16 UTC (rev 14761)
@@ -78,7 +78,6 @@
$args{-treetype} ||= 'Bio::Tree::Tree';
$args{-nodetype} ||= 'Bio::Tree::AnnotatableNode';
$self->SUPER::_initialize(%args);
- $self->debug("Creating obj phyloxml\n");
# phyloxml TreeIO does not use SAX,
# therefore no need to attach EventHandler
@@ -90,7 +89,6 @@
);
}
- $self->debug("libxml version: ", XML::LibXML::LIBXML_VERSION(), "\n");
$self->treetype($args{-treetype});
$self->nodetype($args{-nodetype});
$self->{'_lastitem'} = {}; # holds open items and the attribute hash
@@ -173,9 +171,10 @@
{
my ($self, $node, $str) = @_; # this self is a Bio::Tree::phyloxml
if (ref($node) ne 'Bio::Tree::AnnotatableNode') {
- $self->throw( "node but be a Bio::Tree::AnnotatableNode" );
+ $self->throw( "node must be a Bio::Tree::AnnotatableNode" );
}
my $ac = $node->annotation;
+ my $seq = $node->sequence;
# start
$str .= '{'_reader'};
if ($reader->nodeType == XML_READER_TYPE_ELEMENT)
{
- $self->debug("starting element: ",$reader->name, "\n");
$self->{'_lastitem'}->{$reader->name}++;
push @{$self->{'_lastitem'}->{'current'}}, { $reader->name=>{}}; # current holds current element and empty hash for its attributes
@@ -230,7 +232,6 @@
}
if ($reader->isEmptyElement) {
# do procedures for XML_READER_TYPE_END_ELEMENT since element is complete
- $self->debug("ending element: ",$reader->name, "\n");
if (exists $self->{'_end_elements'}->{$reader->name}) {
my $method = $self->{'_end_elements'}->{$reader->name};
@@ -245,13 +246,10 @@
}
if ($reader->nodeType == XML_READER_TYPE_TEXT)
{
- $self->debug($reader->value, "\n");
$self->{'_currenttext'} = $reader->value;
}
if ($reader->nodeType == XML_READER_TYPE_END_ELEMENT)
{
- $self->debug("ending element: ",$reader->name, "\n");
-
if (exists $self->{'_end_elements'}->{$reader->name}) {
my $method = $self->{'_end_elements'}->{$reader->name};
$self->$method();
@@ -318,7 +316,6 @@
$self->{'_levelcnt'} = [];
$self->{'_id_link'} = {};
- $self->debug("Starting phylogeny\n");
$self->processAttribute($self->current_attr);
return;
}
@@ -326,7 +323,6 @@
sub end_element_phylogeny
{
my ($self) = @_;
- $self->debug("Ending phylogeny: nodes in stack is", scalar @{$self->{'_currentnodes'}}, "\n");
my $root;
# if there is more than one node in _currentnodes
@@ -349,7 +345,6 @@
$root = shift @{$self->{'_currentnodes'}};
}
- $self->debug($self->current_attr, %{$self->current_attr});
my $tree = $self->treetype->new(
-verbose => $self->verbose,
-root => $root,
@@ -379,7 +374,6 @@
my $reader = $self->{'_reader'};
my %data = (); # doesn't use current attribute in order to save memory
$self->processAttribute(\%data);
- $self->debug("attr: ", %data);
# create a node (Annotatable Node)
my $tnode = $self->nodetype->new( -verbose => $self->verbose,
-id => '',
@@ -406,13 +400,10 @@
my $curcount = scalar @{$self->{'_currentnodes'}};
my $level = $reader->depth() - 2;
my $childcnt = $self->{'_levelcnt'}->[$level+1] || 0;
- $self->debug ("adding node: nodes in stack is $curcount, treelevel: $level, childcnt: $childcnt\n");
# pop from temporary list
my $tnode = pop @{$self->{'_currentitems'}};
- $self->debug( "new node will be ".$tnode->to_string."\n");
if ( $childcnt > 0) {
- $self->debug(join(',', map { $_->to_string } @{$self->{'_currentnodes'}}). "\n");
if( $childcnt > $curcount)
{
$self->throw("something wrong with event construction treelevel ".
@@ -421,7 +412,6 @@
}
my @childnodes = splice( @{$self->{'_currentnodes'}}, - $childcnt);
for ( @childnodes ) {
- $self->debug("adding desc: " . $_->to_string . "\n");
$tnode->add_Descendent($_);
}
$self->{'_levelcnt'}->[$level+1] = 0;
@@ -451,49 +441,46 @@
# read attributes of element
$self->processAttribute($self->current_attr);
- $self->debug( "attr: ", %{$self->current_attr}, "\n");
# check idref
- my $idref = $self->current_attr->{'id_ref'};
- my $idsrc;
- if ($idref) { $idsrc = $self->{'_id_link'}->{$idref}; }
+ my @idrefs = ();
+ map { if ($_ =~ /^id_ref/) {push @idrefs, $self->current_attr->{$_};} } keys %{$self->current_attr};
+
+ my @srcbyidrefs = ();
+ foreach my $idref (@idrefs) { push @srcbyidrefs, $self->{'_id_link'}->{$idref}; }
- # exception when id_src is defined but id_ref is not, or vice versa.
- if ($idref xor $idsrc) {
- $self->throw("id_ref and id_src incompatible: $idref, $idsrc");
+ # exception when id_ref is defined but id_src is not, or vice versa.
+ if (@idrefs xor @srcbyidrefs) {
+ $self->throw("id_ref and id_src incompatible: @idrefs, @srcbyidrefs");
}
- $self->debug("starting $current within $prev\n");
-
+ # we are annotating a Node
# set _currentannotation
- if ( ($idsrc && $idsrc->isa($self->nodetype)) || (!$idsrc && $prev eq 'clade') ) {
- # find node to annotate
- my $tnode;
- if ($idsrc) {
- $tnode = $idsrc;
- }
- else {
- $tnode = $self->{'_currentitems'}->[-1];
- }
- my $ac = $tnode->annotation();
- # add the new anncollection with the current element as key
- my $newann = Bio::Annotation::Collection->new();
- $ac->add_Annotation($current, $newann);
- $self->debug("adding annotation -$current:$newann to $ac");
- # push to current annotation
- push (@{$self->{'_currentannotation'}}, $newann);
- $self->debug("pushing ac ",$newann," to _currentannotation");
+ if ( (@srcbyidrefs && $srcbyidrefs[0]->isa($self->nodetype)) || ((@srcbyidrefs == 0) && $prev eq 'clade') ) {
+ # find node to annotate
+ my $tnode;
+ if (@srcbyidrefs) {
+ $tnode = $srcbyidrefs[0];
+ }
+ else {
+ $tnode = $self->{'_currentitems'}->[-1];
+ }
+ my $ac = $tnode->annotation();
+ # add the new anncollection with the current element as key
+ my $newann = Bio::Annotation::Collection->new();
+ $ac->add_Annotation($current, $newann);
+ # push to current annotation
+ push (@{$self->{'_currentannotation'}}, $newann);
}
+
+ # we are already within an annotation
else {
my $ac = $self->{'_currentannotation'}->[-1];
- $self->debug("currentann: $ac");
if ($ac) {
- # add the new anncollection with the current element as key
- my $newann = Bio::Annotation::Collection->new();
- $ac->add_Annotation($current, $newann);
- $self->debug("adding new ac $newann with key $current to ",$ac,"\n");
- push (@{$self->{'_currentannotation'}}, $newann);
- $self->debug("pushing ac ",$newann," to _currentannotation");
+ # add the new anncollection with the current element as key
+ my $newann = Bio::Annotation::Collection->new();
+ $ac->add_Annotation($current, $newann);
+ push (@{$self->{'_currentannotation'}}, $newann);
}
}
}
@@ -515,54 +502,92 @@
my $reader = $self->{'_reader'};
my $current = $self->current_element();
my $prev = $self->prev_element();
- my $idref = $self->current_attr->{'id_ref'};
- delete $self->current_attr->{'id_ref'};
- my $idsrc;
- if ($idref) { $idsrc = $self->{'_id_link'}->{$idref}; }
+
+ # check idsrc
+ my $idsrc = $self->current_attr->{'id_source'};
+ # check idref
+ my @idrefs = ();
+ map { if ($_ =~ /^id_ref/) {
+ push @idrefs, $self->current_attr->{$_};
+ delete $self->current_attr->{$_};
+ } } keys %{$self->current_attr};
+
+ my @srcbyidrefs = ();
+ foreach my $idref (@idrefs) { push @srcbyidrefs, $self->{'_id_link'}->{$idref}; }
+
# exception when id_src is defined but id_ref is not, or vice versa.
- if ($idref xor $idsrc) {
- $self->throw("id_ref and id_src incompatible: $idref, $idsrc");
+ if (@idrefs xor @srcbyidrefs) {
@@ Diff output truncated at 10000 characters. @@
From bugzilla-daemon at portal.open-bio.org Mon Jul 21 10:09:00 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Mon, 21 Jul 2008 10:09:00 -0400
Subject: [Bioperl-guts-l] [Bug 2549] New: species not parsed correctly in
Bio::SeqIO::kegg module
Message-ID:
http://bugzilla.open-bio.org/show_bug.cgi?id=2549
Summary: species not parsed correctly in Bio::SeqIO::kegg module
Product: BioPerl
Version: main-trunk
Platform: Sun
URL: http://code.open-
bio.org/svnweb/index.cgi/bioperl/log/bioperl-
live/trunk/Bio/SeqIO/kegg.pm
OS/Version: Solaris
Status: NEW
Severity: normal
Priority: P2
Component: Bio::SeqIO
AssignedTo: bioperl-guts-l at bioperl.org
ReportedBy: hongxian.he at gmail.com
The constructor for the species attribute of an KEGG gene entry does not work.
# $Id: kegg.pm 14708 2008-06-10 00:08:17Z heikki $
Line 294-295:
$params{'-species'} = Bio::Species->new(
-common_name => $entry_species);
Example of output using the exisiting constructor, which gives empty output:
%perl -e 'use Bio::Species; $species = Bio::Species->new(-common_name=>'test');
print $species->common_name, "\n"'
Suggested fix:
% perl -e 'use Bio::Species; $species = Bio::Species->new();
$species->common_name('test'); print $species->common_name, "\n"'
test
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From lstein at dev.open-bio.org Wed Jul 23 20:36:45 2008
From: lstein at dev.open-bio.org (Lincoln Stein)
Date: Wed, 23 Jul 2008 20:36:45 -0400
Subject: [Bioperl-guts-l] [14762] bioperl-live/trunk/Bio: glyphs will now
display the first alias as the label if the display_name() is not defined
Message-ID: <200807240036.m6O0aj6T010875@dev.open-bio.org>
Revision: 14762
Author: lstein
Date: 2008-07-23 20:36:44 -0400 (Wed, 23 Jul 2008)
Log Message:
-----------
glyphs will now display the first alias as the label if the display_name() is not defined
Modified Paths:
--------------
bioperl-live/trunk/Bio/DB/SeqFeature/Store/GFF3Loader.pm
bioperl-live/trunk/Bio/Graphics/FeatureBase.pm
bioperl-live/trunk/Bio/Graphics/Glyph/generic.pm
Modified: bioperl-live/trunk/Bio/DB/SeqFeature/Store/GFF3Loader.pm
===================================================================
--- bioperl-live/trunk/Bio/DB/SeqFeature/Store/GFF3Loader.pm 2008-07-21 05:55:16 UTC (rev 14761)
+++ bioperl-live/trunk/Bio/DB/SeqFeature/Store/GFF3Loader.pm 2008-07-24 00:36:44 UTC (rev 14762)
@@ -474,7 +474,7 @@
# TEMPORARY HACKS TO SIMPLIFY DEBUGGING
$feature_id = '' unless defined $feature_id;
$name = '' unless defined $name; # prevent uninit variable warnings
- push @{$unreserved->{Alias}},$feature_id if $has_loadid && $feature_id ne $name;
+ # push @{$unreserved->{Alias}},$feature_id if $has_loadid && $feature_id ne $name;
$unreserved->{parent_id} = \@parent_ids if @parent_ids;
# POSSIBLY A PERMANENT HACK -- TARGETS BECOME ALIASES
Modified: bioperl-live/trunk/Bio/Graphics/FeatureBase.pm
===================================================================
--- bioperl-live/trunk/Bio/Graphics/FeatureBase.pm 2008-07-21 05:55:16 UTC (rev 14761)
+++ bioperl-live/trunk/Bio/Graphics/FeatureBase.pm 2008-07-24 00:36:44 UTC (rev 14762)
@@ -594,7 +594,6 @@
# score, Name, ID, Parent, etc), which happens UNLESS
# $dontPropogateParentAttrs is passed.
-
my @rsf = $recurse ? $self->sub_SeqFeature : ();
my $recurseSubfeatureWithSameType =
# will be TRUE if we're going to recurse and at least 1 subfeature
@@ -602,7 +601,9 @@
sub {($_->type eq $self->type) && return 1 for @rsf ; 0 }->();
my $typeIsSameAsParent = $_parent && ($_parent->type eq $self->type);
my $hparentOrSelf = ($typeIsSameAsParent && ! $dontPropogateParentAttrs) ? $_parent : $self;
- my $group = ($typeIsSameAsParent && ! $dontPropogateParentAttrs) ? $_parentGroup : $self->format_attributes($_parent);
+ my $group = ($typeIsSameAsParent && ! $dontPropogateParentAttrs)
+ ? $_parentGroup
+ : $self->format_attributes($_parent);
my @gff3 = $recurseSubfeatureWithSameType && ! $preserveHomegenousParent ? () :
do {
Modified: bioperl-live/trunk/Bio/Graphics/Glyph/generic.pm
===================================================================
--- bioperl-live/trunk/Bio/Graphics/Glyph/generic.pm 2008-07-21 05:55:16 UTC (rev 14761)
+++ bioperl-live/trunk/Bio/Graphics/Glyph/generic.pm 2008-07-24 00:36:44 UTC (rev 14762)
@@ -130,7 +130,13 @@
# figure it out ourselves
my $f = $self->feature;
- return $f->display_name if $f->can('display_name');
+ if ($f->can('display_name') && (my $name = $f->display_name)) {
+ return $name;
+ }
+
+ if ($f->can('attributes') && (my @aliases = $f->attributes('Alias'))) {
+ return $aliases[0];
+ }
return $f->info if $f->can('info'); # deprecated API
return $f->seq_id if $f->can('seq_id');
return eval{$f->primary_tag};
From cjfields at dev.open-bio.org Mon Jul 28 13:30:59 2008
From: cjfields at dev.open-bio.org (Christopher John Fields)
Date: Mon, 28 Jul 2008 13:30:59 -0400
Subject: [Bioperl-guts-l] [14763] bioperl-live/trunk: add multiple record
support ( courtesy of Jorge Duarte, per mail list)
Message-ID: <200807281730.m6SHUxIu032724@dev.open-bio.org>
Revision: 14763
Author: cjfields
Date: 2008-07-28 13:30:58 -0400 (Mon, 28 Jul 2008)
Log Message:
-----------
add multiple record support (courtesy of Jorge Duarte, per mail list)
Modified Paths:
--------------
bioperl-live/trunk/Bio/SeqIO/phd.pm
bioperl-live/trunk/t/phd.t
Added Paths:
-----------
bioperl-live/trunk/t/data/multi.phd
Modified: bioperl-live/trunk/Bio/SeqIO/phd.pm
===================================================================
--- bioperl-live/trunk/Bio/SeqIO/phd.pm 2008-07-24 00:36:44 UTC (rev 14762)
+++ bioperl-live/trunk/Bio/SeqIO/phd.pm 2008-07-28 17:30:58 UTC (rev 14763)
@@ -149,6 +149,8 @@
$in_dna = 0;
}
if ($entry =~ /^END_SEQUENCE/) {
+ $entry = $self->_readline();
+ last;
}
if (!$in_dna) { next; }
$entry =~ /(\S+)\s+(\S+)(?:\s+(\S+))?/;
Added: bioperl-live/trunk/t/data/multi.phd
===================================================================
--- bioperl-live/trunk/t/data/multi.phd (rev 0)
+++ bioperl-live/trunk/t/data/multi.phd 2008-07-28 17:30:58 UTC (rev 14763)
@@ -0,0 +1,1540 @@
+BEGIN_SEQUENCE ML4924F
+
+BEGIN_COMMENT
+
+CHROMAT_FILE: ML4924F
+ABI_THUMBPRINT: 0
+PHRED_VERSION: 0.980904.e
+CALL_METHOD: phred
+QUALITY_LEVELS: 99
+TIME: Thu Jun 21 11:27:03 2001
+TRACE_ARRAY_MIN_INDEX: 0
+TRACE_ARRAY_MAX_INDEX: 8444
+CHEM: term
+DYE: big
+
+END_COMMENT
+
+BEGIN_DNA
+t 10 3
+t 16 14
+g 19 26
+t 19 36
+t 8 47
+c 6 55
+t 6 74
+t 6 77
+t 6 95
+t 9 98
+c 9 105
+t 15 119
+c 17 128
+g 17 143
+a 22 148
+g 22 162
+g 25 173
+g 25 185
+t 22 197
+a 22 202
+c 22 213
+t 25 227
+t 34 239
+g 34 250
+a 42 260
+g 35 270
+g 35 282
+a 38 294
+t 40 303
+t 40 314
+c 35 323
+t 34 335
+a 31 344
+c 31 351
+c 33 364
+a 34 373
+c 35 381
+c 33 394
+a 29 404
+c 35 412
+a 29 424
+a 29 434
+c 32 443
+a 34 454
+a 34 463
+c 35 473
+a 35 484
+a 42 494
+a 42 506
+g 42 516
+c 42 526
+c 35 539
+t 35 551
+t 37 562
+a 35 571
+t 35 581
+c 35 592
+a 35 600
+t 35 612
+c 31 623
+c 33 635
+a 24 644
+g 24 655
+a 24 667
+a 29 677
+c 26 686
+c 29 698
+g 29 712
+c 29 719
+a 29 731
+a 29 740
+a 29 751
+t 35 763
+t 35 775
+a 35 782
+t 35 794
+a 35 803
+a 35 813
+a 42 824
+a 42 835
+a 47 846
+a 47 857
+g 40 869
+a 35 880
+g 35 891
+c 35 900
+c 32 913
+a 32 921
+a 32 932
+c 32 942
+a 42 953
+c 42 963
+c 42 976
+a 37 986
+c 37 996
+a 30 1007
+a 30 1018
+a 35 1030
+a 35 1041
+c 35 1050
+a 35 1061
+a 35 1071
+a 37 1083
+a 32 1095
+t 32 1106
+g 35 1119
+a 35 1128
+a 37 1139
+a 37 1150
+a 42 1161
+g 42 1174
+a 37 1184
+a 37 1194
+a 40 1206
+c 37 1215
+a 37 1226
+a 35 1236
+a 35 1249
+c 35 1259
+t 37 1274
+c 35 1284
+t 35 1298
+t 37 1310
+c 37 1319
+a 37 1328
+a 37 1339
+c 35 1349
+c 32 1362
+a 29 1371
+g 31 1385
+t 31 1400
+g 29 1410
+a 35 1419
+t 35 1433
+g 35 1445
+t 35 1457
+t 35 1469
+c 35 1478
+t 35 1492
+g 35 1505
+a 35 1514
+g 32 1526
+a 32 1538
+c 35 1547
+t 32 1562
+t 35 1573
+g 35 1586
+t 32 1596
+t 32 1608
+g 32 1622
+a 32 1630
+g 32 1644
+g 35 1656
+a 35 1666
+t 35 1679
+a 35 1687
+a 35 1698
+c 35 1709
+a 37 1721
+c 37 1731
+c 35 1745
+t 35 1760
+t 32 1773
+c 32 1782
+g 32 1796
+t 32 1808
+a 32 1817
+c 30 1826
+t 35 1842
+t 35 1854
+a 35 1862
+a 35 1874
+c 35 1884
+t 35 1900
+t 32 1913
+g 35 1924
+g 42 1936
+a 42 1948
+a 42 1958
+c 42 1968
+c 35 1981
+a 35 1992
+c 38 2002
+t 38 2018
+t 38 2030
+c 38 2040
+a 42 2052
+t 40 2064
+g 40 2077
+g 38 2089
+c 35 2098
+a 35 2112
+t 35 2124
+c 42 2135
+a 50 2147
+t 56 2159
+c 56 2171
+c 50 2183
+t 56 2196
+t 56 2209
+g 42 2222
+g 42 2234
+t 42 2246
+a 38 2256
+a 38 2267
+c 38 2277
+t 38 2293
+c 38 2303
+t 38 2318
+a 40 2328
+t 38 2339
+g 38 2353
+c 38 2363
+t 40 2378
+g 40 2390
+a 40 2401
+a 44 2413
+t 42 2425
+c 42 2435
+c 42 2448
+c 38 2460
+a 36 2471
+a 36 2483
+c 32 2492
+g 32 2507
+c 32 2517
+g 35 2532
+a 35 2543
+g 38 2555
+t 41 2569
+c 41 2579
+t 41 2593
+t 41 2605
+g 41 2617
+c 42 2627
+a 41 2638
+c 41 2649
+c 41 2662
+t 41 2676
+a 41 2686
+c 41 2697
+g 41 2711
+g 41 2723
+c 41 2735
+g 35 2749
+a 40 2759
+c 35 2769
+g 32 2784
+t 32 2796
+g 36 2809
+c 38 2818
+a 35 2830
+a 35 2842
+c 37 2852
+a 38 2865
+c 35 2876
+g 35 2891
+g 35 2903
+t 35 2915
+a 37 2926
+t 37 2938
+c 41 2950
+c 41 2962
+c 41 2974
+g 41 2989
+g 41 3000
+g 41 3012
+c 41 3023
+g 35 3038
+t 35 3050
+t 35 3063
+c 32 3071
+a 35 3083
+a 31 3094
+g 33 3107
+a 32 3120
+a 35 3131
+c 35 3140
+a 37 3153
+a 29 3164
+c 33 3174
+a 16 3187
+t 16 3198
+a 9 3210
+g 20 3223
+a 13 3236
+a 23 3247
+g 23 3259
+t 33 3272
+c 35 3281
+c 37 3294
+a 35 3305
+t 40 3317
+t 40 3331
+c 45 3341
+c 40 3353
+a 40 3364
+t 50 3375
+a 30 3388
+g 30 3400
+a 33 3413
+t 40 3424
+a 33 3434
+c 37 3444
+c 29 3458
+c 29 3470
+g 21 3485
+t 25 3497
+a 21 3508
+g 23 3519
+a 23 3532
+a 50 3543
+g 50 3554
+g 37 3567
+a 35 3579
+t 35 3591
+c 35 3600
+g 32 3616
+t 32 3627
+a 32 3637
+c 37 3647
+t 37 3662
+t 37 3675
+g 40 3686
+a 37 3698
+t 37 3709
+t 37 3722
+c 37 3731
+c 35 3744
+a 35 3755
+a 44 3766
+g 44 3778
+a 44 3791
+t 44 3802
+c 44 3813
+a 56 3824
+a 44 3836
+t 56 3849
+g 37 3861
+t 35 3873
+g 35 3885
+c 35 3894
+t 35 3910
+c 35 3918
+c 26 3932
+t 32 3945
+g 26 3958
+g 26 3969
+a 26 3982
+t 32 3992
+a 32 4003
+c 35 4012
+c 35 4025
+g 35 4040
+a 35 4051
+a 35 4063
+t 42 4075
+c 42 4085
+c 35 4097
+a 42 4108
+a 42 4119
+a 42 4131
+a 42 4143
+c 35 4153
+a 33 4165
+g 29 4178
+c 33 4189
+c 29 4202
+a 30 4212
+g 28 4225
+t 35 4236
+g 33 4250
+t 35 4261
+c 35 4273
+a 35 4283
+c 35 4293
+t 37 4308
+g 37 4321
+a 45 4332
+a 44 4344
+g 44 4355
+t 44 4367
+t 44 4378
+c 44 4391
+c 44 4402
+t 44 4415
+c 39 4427
+c 39 4438
+t 42 4450
+c 42 4461
+a 42 4472
+a 42 4483
+c 42 4493
+a 35 4505
+g 28 4517
+c 27 4529
+t 24 4543
+c 20 4555
+g 20 4567
+t 22 4576
+a 29 4589
+c 29 4599
+t 40 4613
+c 40 4624
+c 42 4637
+t 42 4648
+t 35 4662
+g 35 4673
+a 35 4685
+c 37 4694
+t 35 4708
+t 35 4720
+t 33 4733
+c 33 4743
+a 33 4752
+a 35 4764
+g 35 4776
+c 34 4787
+c 34 4801
+a 33 4811
+c 33 4821
+t 33 4835
+c 29 4847
+t 28 4860
+c 28 4872
+a 27 4881
+a 21 4894
+c 21 4908
+a 15 4917
+a 15 4928
+g 21 4939
+c 21 4949
+t 25 4964
+g 29 4976
+c 29 4984
+a 29 4998
+t 29 5010
+t 33 5023
+g 33 5034
+c 25 5044
+c 27 5058
+t 23 5071
+t 23 5083
+g 11 5094
+c 10 5104
+c 10 5117
+t 24 5130
+c 24 5139
+c 29 5152
+t 29 5165
+c 27 5177
+t 29 5189
+c 29 5202
+a 29 5209
+c 29 5220
+g 32 5233
+g 36 5245
+t 36 5258
+g 35 5269
+a 45 5281
+c 40 5291
+g 38 5305
+t 38 5317
+a 28 5328
+g 28 5338
+c 26 5351
+a 32 5363
+c 32 5372
+g 35 5387
+c 35 5397
+a 35 5410
+a 42 5421
+t 37 5432
+c 34 5445
+t 34 5456
+t 42 5468
+t 29 5480
+t 29 5491
+c 29 5505
+a 35 5513
+t 35 5526
+t 26 5538
+a 24 5548
+c 17 5557
+g 14 5574
+t 12 5585
+c 12 5598
+t 25 5609
+a 27 5618
+a 35 5630
+t 37 5643
+a 38 5653
+c 40 5663
+c 34 5677
+g 34 5690
+a 34 5700
+a 35 5711
+a 32 5725
+g 33 5735
+a 32 5747
+c 29 5756
+c 29 5770
+t 21 5782
+c 21 5794
+a 27 5805
+c 33 5815
+a 26 5827
+g 16 5838
+t 16 5851
+g 10 5863
+c 10 5873
+a 10 5885
+c 20 5894
+c 12 5908
+t 6 5921
+g 6 5931
+g 8 5946
+c 9 5950
+c 9 5970
+t 11 5981
+t 13 5995
+g 18 6004
+g 15 6017
+a 15 6030
+c 17 6042
+a 11 6050
+a 8 6064
+c 11 6077
+a 9 6086
+c 13 6093
+a 9 6106
+g 19 6119
+g 21 6132
+t 24 6146
+g 24 6156
+t 18 6168
+t 15 6181
+t 15 6194
+g 21 6205
+a 25 6215
+c 29 6225
+c 29 6239
+a 25 6248
+c 25 6260
+t 14 6274
+g 14 6285
+a 9 6298
+g 9 6309
+c 9 6322
+t 24 6333
+g 14 6345
+t 11 6355
+t 8 6369
+a 8 6383
+c 8 6391
+a 15 6400
+a 20 6410
+a 27 6422
+a 40 6433
+c 40 6444
+c 40 6457
+t 26 6470
+t 24 6481
+g 12 6493
+g 12 6503
+a 15 6517
+g 13 6528
+g 10 6540
+c 17 6549
+a 18 6565
+c 15 6574
+g 12 6586
+g 15 6597
+g 16 6609
+t 19 6621
+g 23 6635
+a 20 6645
+g 24 6658
+a 21 6670
+c 21 6679
+g 21 6693
+a 21 6703
+t 24 6712
+c 16 6725
+a 20 6736
+c 18 6746
+c 20 6763
+a 16 6771
+c 16 6781
+t 14 6796
+c 12 6808
+t 10 6819
+c 10 6829
+a 12 6841
+c 17 6850
+c 17 6864
+a 29 6873
+a 29 6885
+c 29 6893
+g 19 6908
+g 16 6919
+a 9 6934
+g 9 6941
+a 9 6956
+t 16 6965
+g 13 6978
+t 11 6990
+c 9 6998
+g 11 7014
+a 9 7025
+g 10 7037
+a 9 7049
+a 19 7059
+c 14 7069
+g 14 7081
+a 10 7093
+g 10 7104
+c 10 7118
+t 14 7129
+t 14 7142
+c 25 7154
+t 26 7166
+g 28 7176
+a 32 7187
+a 32 7198
+c 32 7208
+c 33 7222
+t 33 7234
+t 28 7244
+g 21 7256
+a 18 7268
+t 12 7279
+a 11 7288
+t 13 7300
+t 9 7314
+c 9 7322
+c 12 7336
+t 10 7346
+c 11 7359
+a 10 7368
+t 11 7378
+t 12 7394
+g 11 7402
+g 11 7413
+g 10 7423
+c 10 7439
+t 10 7454
+c 10 7462
+c 8 7477
+a 8 7484
+c 10 7497
+a 9 7506
+g 9 7518
+c 9 7527
+t 6 7544
+c 6 7546
+t 8 7557
+t 8 7574
+t 11 7590
+c 9 7600
+t 9 7611
+c 10 7621
+t 10 7632
+g 14 7644
+a 14 7655
+c 10 7666
+g 8 7678
+c 8 7690
+c 17 7703
+a 10 7711
+t 10 7719
+t 9 7729
+c 12 7746
+t 9 7755
+g 11 7770
+a 7 7781
+g 7 7787
+g 10 7802
+a 12 7813
+t 9 7821
+c 6 7837
+t 6 7840
+a 6 7852
+g 6 7864
+g 8 7880
+g 8 7893
+a 11 7903
+t 12 7915
+g 10 7925
+c 9 7938
+a 9 7947
+c 8 7961
+a 8 7968
+c 12 7978
+c 14 7991
+c 20 8004
+a 16 8013
+c 17 8026
+a 10 8036
+a 10 8045
+g 12 8059
+g 17 8071
+a 17 8084
+c 24 8096
+a 18 8107
+t 14 8116
+g 14 8128
+a 11 8140
+c 14 8149
+c 12 8162
+a 15 8174
+a 15 8183
+a 10 8193
+a 9 8205
+t 11 8214
+c 9 8228
+g 9 8237
+a 10 8252
+c 8 8259
+a 6 8275
+t 6 8279
+c 8 8286
+t 8 8305
+g 7 8318
+g 7 8327
+g 9 8341
+c 9 8349
+c 7 8365
+c 6 8372
+a 10 8387
+c 6 8400
+t 6 8400
+c 6 8415
+g 6 8437
+END_DNA
+
+END_SEQUENCE
+
+BEGIN_SEQUENCE ML4924R
+
+BEGIN_COMMENT
+
+CHROMAT_FILE: ML4924R
+ABI_THUMBPRINT: 0
+PHRED_VERSION: 0.980904.e
+CALL_METHOD: phred
+QUALITY_LEVELS: 99
+TIME: Thu Jun 21 11:27:03 2001
+TRACE_ARRAY_MIN_INDEX: 0
+TRACE_ARRAY_MAX_INDEX: 8792
+CHEM: term
+DYE: big
+
+END_COMMENT
+
+BEGIN_DNA
+a 6 1
+c 6 20
+t 6 17
+t 8 26
+t 8 35
+g 12 48
+g 18 58
+t 16 66
+c 14 83
+g 11 98
+c 9 104
+c 6 122
+t 6 128
+g 9 140
+c 19 147
+a 20 159
+g 32 167
+g 34 178
+t 34 190
+a 39 200
+c 39 208
+c 39 221
+g 29 233
+g 40 243
+t 28 255
+c 21 267
+c 13 277
+g 4 288
+n 4 297
+g 4 298
+a 8 314
+t 8 328
+t 23 339
+c 29 349
+c 39 359
+c 40 369
+g 40 381
+g 40 390
+g 40 401
+t 46 413
+c 34 425
+g 33 436
+a 29 447
+c 29 453
+c 32 466
+c 33 476
+a 34 485
+c 34 492
+g 34 505
+c 34 514
+g 40 527
+t 40 537
+c 34 548
+c 34 559
+g 34 572
+c 34 579
+t 34 592
+t 34 602
+t 39 613
+g 40 625
+c 40 633
+t 40 645
+c 40 656
+a 40 664
+t 40 673
+c 40 685
+t 46 697
+c 51 707
+c 51 718
+c 56 728
+t 51 738
+c 51 749
+t 35 760
+g 35 772
+a 35 783
+c 35 790
+t 35 803
+t 35 813
+t 39 824
+g 40 836
+c 40 844
+a 40 855
+t 40 865
+c 56 876
+c 42 887
+c 51 898
+t 46 909
+t 46 921
+a 46 931
+a 46 940
+t 46 951
+c 46 962
+c 46 974
+t 46 985
+c 40 995
+a 40 1004
+g 40 1015
+a 40 1028
+a 40 1037
+t 40 1048
+g 35 1060
+g 35 1071
+c 35 1080
+g 35 1096
+t 35 1106
+c 35 1116
+a 40 1125
+g 40 1138
+a 40 1150
+g 51 1160
+a 51 1172
+a 51 1182
+g 51 1193
+a 40 1204
+a 35 1214
+g 35 1226
+c 39 1235
+t 39 1250
+c 39 1259
+t 39 1272
+c 40 1282
+g 51 1295
+a 51 1305
+a 51 1315
+c 51 1325
+c 51 1337
+c 51 1348
+a 51 1358
+a 51 1368
+t 51 1381
+g 51 1393
+a 51 1403
+g 51 1415
+g 51 1427
+g 39 1440
+a 39 1450
+t 39 1462
+a 39 1470
+t 39 1483
+c 35 1494
+a 40 1503
+a 40 1514
+g 40 1528
+g 40 1540
+t 40 1552
+t 39 1565
+c 39 1574
+a 39 1583
+g 39 1598
+a 38 1609
+a 40 1619
+g 39 1632
+c 39 1642
+t 39 1657
+c 39 1666
+g 39 1680
+t 40 1691
+t 45 1703
+c 51 1713
+t 51 1726
+c 51 1736
+a 51 1746
+a 51 1757
+c 51 1767
+a 45 1778
@@ Diff output truncated at 10000 characters. @@
From lstein at dev.open-bio.org Mon Jul 28 20:19:54 2008
From: lstein at dev.open-bio.org (Lincoln Stein)
Date: Mon, 28 Jul 2008 20:19:54 -0400
Subject: [Bioperl-guts-l] [14764] bioperl-live/trunk/Bio: fixed error in
which spaces are not properly escaped in GFF3 files
Message-ID: <200807290019.m6T0Jsru001095@dev.open-bio.org>
Revision: 14764
Author: lstein
Date: 2008-07-28 20:19:53 -0400 (Mon, 28 Jul 2008)
Log Message:
-----------
fixed error in which spaces are not properly escaped in GFF3 files
Modified Paths:
--------------
bioperl-live/trunk/Bio/DB/SeqFeature/Store/Loader.pm
bioperl-live/trunk/Bio/Graphics/FeatureBase.pm
bioperl-live/trunk/Bio/Graphics/FeatureFile.pm
Modified: bioperl-live/trunk/Bio/DB/SeqFeature/Store/Loader.pm
===================================================================
--- bioperl-live/trunk/Bio/DB/SeqFeature/Store/Loader.pm 2008-07-28 17:30:58 UTC (rev 14763)
+++ bioperl-live/trunk/Bio/DB/SeqFeature/Store/Loader.pm 2008-07-29 00:19:53 UTC (rev 14764)
@@ -626,6 +626,7 @@
sub unescape {
my $self = shift;
my $todecode = shift;
+ $todecode =~ tr/+/ /;
$todecode =~ s/%([0-9a-fA-F]{2})/chr hex($1)/ge;
return $todecode;
}
Modified: bioperl-live/trunk/Bio/Graphics/FeatureBase.pm
===================================================================
--- bioperl-live/trunk/Bio/Graphics/FeatureBase.pm 2008-07-28 17:30:58 UTC (rev 14763)
+++ bioperl-live/trunk/Bio/Graphics/FeatureBase.pm 2008-07-29 00:19:53 UTC (rev 14764)
@@ -646,10 +646,10 @@
sub has_tag { exists shift->{attributes}{shift()} }
sub escape {
- my $self = shift;
+ my $self = shift;
my $toencode = shift;
$toencode =~ s/([^a-zA-Z0-9_. :?^*\(\)\[\]@!+-])/uc sprintf("%%%02x",ord($1))/eg;
-# $toencode =~ tr/ /+/; # not needed in GFF3
+ $toencode =~ tr/ /+/; # not needed in GFF3
$toencode;
}
Modified: bioperl-live/trunk/Bio/Graphics/FeatureFile.pm
===================================================================
--- bioperl-live/trunk/Bio/Graphics/FeatureFile.pm 2008-07-28 17:30:58 UTC (rev 14763)
+++ bioperl-live/trunk/Bio/Graphics/FeatureFile.pm 2008-07-29 00:19:53 UTC (rev 14764)
@@ -345,7 +345,6 @@
-start => $range->start,
-end => $range->end
);
-
next unless @features; # suppress tracks for features that don't appear
# fix up funky group hack
From lstein at dev.open-bio.org Mon Jul 28 20:26:55 2008
From: lstein at dev.open-bio.org (Lincoln Stein)
Date: Mon, 28 Jul 2008 20:26:55 -0400
Subject: [Bioperl-guts-l] [14765]
bioperl-live/trunk/Bio/Graphics/FeatureBase.pm: pretty formatting of gff3
attributes
Message-ID: <200807290026.m6T0Qt7p001347@dev.open-bio.org>
Revision: 14765
Author: lstein
Date: 2008-07-28 20:26:55 -0400 (Mon, 28 Jul 2008)
Log Message:
-----------
pretty formatting of gff3 attributes
Modified Paths:
--------------
bioperl-live/trunk/Bio/Graphics/FeatureBase.pm
Modified: bioperl-live/trunk/Bio/Graphics/FeatureBase.pm
===================================================================
--- bioperl-live/trunk/Bio/Graphics/FeatureBase.pm 2008-07-29 00:19:53 UTC (rev 14764)
+++ bioperl-live/trunk/Bio/Graphics/FeatureBase.pm 2008-07-29 00:26:55 UTC (rev 14765)
@@ -649,7 +649,7 @@
my $self = shift;
my $toencode = shift;
$toencode =~ s/([^a-zA-Z0-9_. :?^*\(\)\[\]@!+-])/uc sprintf("%%%02x",ord($1))/eg;
- $toencode =~ tr/ /+/; # not needed in GFF3
+ $toencode =~ tr/ /+/; # prettier representation than %20?
$toencode;
}
From lstein at dev.open-bio.org Mon Jul 28 20:30:07 2008
From: lstein at dev.open-bio.org (Lincoln Stein)
Date: Mon, 28 Jul 2008 20:30:07 -0400
Subject: [Bioperl-guts-l] [14766] bioperl-live/trunk/Bio: modified fix so
that it doesn' t break compatibility with those who use '+' to describe the
strand of the target
Message-ID: <200807290030.m6T0U7MB001462@dev.open-bio.org>
Revision: 14766
Author: lstein
Date: 2008-07-28 20:30:07 -0400 (Mon, 28 Jul 2008)
Log Message:
-----------
modified fix so that it doesn't break compatibility with those who use '+' to describe the strand of the target
Modified Paths:
--------------
bioperl-live/trunk/Bio/DB/SeqFeature/Store/Loader.pm
bioperl-live/trunk/Bio/Graphics/FeatureBase.pm
Modified: bioperl-live/trunk/Bio/DB/SeqFeature/Store/Loader.pm
===================================================================
--- bioperl-live/trunk/Bio/DB/SeqFeature/Store/Loader.pm 2008-07-29 00:26:55 UTC (rev 14765)
+++ bioperl-live/trunk/Bio/DB/SeqFeature/Store/Loader.pm 2008-07-29 00:30:07 UTC (rev 14766)
@@ -626,7 +626,6 @@
sub unescape {
my $self = shift;
my $todecode = shift;
- $todecode =~ tr/+/ /;
$todecode =~ s/%([0-9a-fA-F]{2})/chr hex($1)/ge;
return $todecode;
}
Modified: bioperl-live/trunk/Bio/Graphics/FeatureBase.pm
===================================================================
--- bioperl-live/trunk/Bio/Graphics/FeatureBase.pm 2008-07-29 00:26:55 UTC (rev 14765)
+++ bioperl-live/trunk/Bio/Graphics/FeatureBase.pm 2008-07-29 00:30:07 UTC (rev 14766)
@@ -648,8 +648,7 @@
sub escape {
my $self = shift;
my $toencode = shift;
- $toencode =~ s/([^a-zA-Z0-9_. :?^*\(\)\[\]@!+-])/uc sprintf("%%%02x",ord($1))/eg;
- $toencode =~ tr/ /+/; # prettier representation than %20?
+ $toencode =~ s/([^a-zA-Z0-9_.:?^*\(\)\[\]@!+-])/uc sprintf("%%%02x",ord($1))/eg;
$toencode;
}
From bugzilla-daemon at portal.open-bio.org Mon Jul 28 20:44:54 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Mon, 28 Jul 2008 20:44:54 -0400
Subject: [Bioperl-guts-l] [Bug 2555] New: Bio::Biblio::IO parse error
(medlinexml.pm)
Message-ID:
http://bugzilla.open-bio.org/show_bug.cgi?id=2555
Summary: Bio::Biblio::IO parse error (medlinexml.pm)
Product: BioPerl
Version: 1.5 branch
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Core Components
AssignedTo: bioperl-guts-l at bioperl.org
ReportedBy: t-nakazato at muj.biglobe.ne.jp
I report that Bio::Biblio::IO doesn't parse "MajorTopicYN" attribute in MEDLINE
XML correctly.
(bioperl 1.5.2)
In MEDLNE XML, MajorTopicYN indicates that assigned MeSH qualifier is major
topic or not.
For example,
Breast Neoplasms
drug therapy
metabolism
Cell Cycle
drug effects
genetics
But, Bio::Biblio::IO (medlinexml.pm) always parses the value of MajorTopicYN as
"Y".
(The partial result dumped by Data::Dumper is shown)
{
'subHeadings' => [
{
'subHeading' => 'drug therapy',
'majorTopic' => 'Y'
},
{
'subHeading' => 'metabolism',
'majorTopic' => 'Y'
}
],
'descriptorName' => 'Breast Neoplasms'
},
{
'subHeadings' => [
{
'subHeading' => 'drug effects',
'majorTopic' => 'Y'
},
{
'subHeading' => 'genetics',
'majorTopic' => 'Y'
}
],
'descriptorName' => 'Cell Cycle'
},
My sample script is as follows.
-----
#!/usr/bin/perl
use Bio::Biblio;
use Bio::Biblio::IO;
use Data::Dumper;
my $biblio = Bio::Biblio->new(-access => 'eutils');
my $biblio_xml = $biblio->get_by_id("17660348");
my $biblio_obj = Bio::Biblio::IO->new(-data => $biblio_xml,
-format => 'medlinexml');
while ($each_obj = $biblio_obj->next_bibref()) {
print STDERR Dumper($each_obj);
### MeSH
$mesh_array_ref = $each_obj->mesh_headings();
foreach $each_mesh_obj (@$mesh_array_ref) {
print "[MeSH]\t".$each_mesh_obj->{"descriptorName"}."\n";
$m_subhead_array_ref = $each_mesh_obj->{"subHeadings"};
foreach $each_m_subhead_obj (@$m_subhead_array_ref) {
print "[Subheadings]\t".$each_m_subhead_obj->{"subHeading"}."\n";
print "[MajorYN]\t".$each_m_subhead_obj->{"majorTopic"}."\n";
}
}
}
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From bugzilla-daemon at portal.open-bio.org Mon Jul 28 23:02:32 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Mon, 28 Jul 2008 23:02:32 -0400
Subject: [Bioperl-guts-l] [Bug 2534] uniprot_trembl parsing
In-Reply-To:
Message-ID: <200807290302.m6T32Wgk027827@portal.open-bio.org>
http://bugzilla.open-bio.org/show_bug.cgi?id=2534
cjfields at bioperl.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Comment #4 from cjfields at bioperl.org 2008-07-28 23:02 EST -------
No response; closing the bug out as fixed. Feel free to reopen if there is
still a problem.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From cjfields at dev.open-bio.org Mon Jul 28 23:36:48 2008
From: cjfields at dev.open-bio.org (Christopher John Fields)
Date: Mon, 28 Jul 2008 23:36:48 -0400
Subject: [Bioperl-guts-l] [14767] bioperl-live/trunk: bug 2549;
fixed small bug in Bio:: Taxon which doesn't catch -common_name
Message-ID: <200807290336.m6T3amYs001745@dev.open-bio.org>
Revision: 14767
Author: cjfields
Date: 2008-07-28 23:36:48 -0400 (Mon, 28 Jul 2008)
Log Message:
-----------
bug 2549; fixed small bug in Bio::Taxon which doesn't catch -common_name
Modified Paths:
--------------
bioperl-live/trunk/Bio/Taxon.pm
bioperl-live/trunk/t/Species.t
bioperl-live/trunk/t/kegg.t
Modified: bioperl-live/trunk/Bio/Taxon.pm
===================================================================
--- bioperl-live/trunk/Bio/Taxon.pm 2008-07-29 00:30:07 UTC (rev 14766)
+++ bioperl-live/trunk/Bio/Taxon.pm 2008-07-29 03:36:48 UTC (rev 14767)
@@ -190,13 +190,14 @@
my @common_names;
if ($commonnames) {
- $self->throw("-common_names takes only an array reference") unless ref($commonnames) eq 'ARRAY';
+ $self->throw("-common_names takes only an array reference") unless $commonnames
+ && ref($commonnames) eq 'ARRAY';
@common_names = @{$commonnames};
- if ($commonname) {
- my %c_names = map { $_ => 1 } @common_names;
- unless (exists $c_names{$commonname}) {
- unshift(@common_names, $commonname);
- }
+ }
+ if ($commonname) {
+ my %c_names = map { $_ => 1 } @common_names;
+ unless (exists $c_names{$commonname}) {
+ unshift(@common_names, $commonname);
}
}
@common_names > 0 && $self->common_names(@common_names);
Modified: bioperl-live/trunk/t/Species.t
===================================================================
--- bioperl-live/trunk/t/Species.t 2008-07-29 00:30:07 UTC (rev 14766)
+++ bioperl-live/trunk/t/Species.t 2008-07-29 03:36:48 UTC (rev 14767)
@@ -7,7 +7,7 @@
use lib 't/lib';
use BioperlTest;
- test_begin(-tests => 20);
+ test_begin(-tests => 21);
use_ok('Bio::Species');
use_ok('Bio::DB::Taxonomy');
@@ -36,12 +36,14 @@
[ qw( sapiens Homo Hominidae
Catarrhini Primates Eutheria
Mammalia Vertebrata
- Chordata Metazoa Eukaryota) ] );
+ Chordata Metazoa Eukaryota) ],
+ -common_name => 'human');
is $species->binomial, 'Homo sapiens';
is $species->species, 'sapiens';
is $species->genus, 'Homo';
+# test -common_name parameter, bug 2549
+is $species->common_name, 'human';
-
# A Bio::Species isa Bio::Taxon, so test some things from there briefly
is $species->scientific_name, 'sapiens';
is $species->rank, 'species';
Modified: bioperl-live/trunk/t/kegg.t
===================================================================
--- bioperl-live/trunk/t/kegg.t 2008-07-29 00:30:07 UTC (rev 14766)
+++ bioperl-live/trunk/t/kegg.t 2008-07-29 03:36:48 UTC (rev 14767)
@@ -7,7 +7,7 @@
use lib 't/lib';
use BioperlTest;
- test_begin(-tests => 14);
+ test_begin(-tests => 15);
use_ok('Bio::SeqIO');
}
@@ -47,3 +47,5 @@
54759,56523..56617,57185..57291,58104..58220,58427..58490,59255..
59343,59706..59776,60133..60227,60312..60410,60811..60879,61308..
61386,62491..62611,63434..63440)');
+
+is($kegg->species->common_name , 'H.sapiens');
\ No newline at end of file
From bugzilla-daemon at portal.open-bio.org Mon Jul 28 23:37:04 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Mon, 28 Jul 2008 23:37:04 -0400
Subject: [Bioperl-guts-l] [Bug 2549] species not parsed correctly in
Bio::SeqIO::kegg module
In-Reply-To:
Message-ID: <200807290337.m6T3b4da029410@portal.open-bio.org>
http://bugzilla.open-bio.org/show_bug.cgi?id=2549
cjfields at bioperl.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Comment #1 from cjfields at bioperl.org 2008-07-28 23:37 EST -------
This is actually a bug in Bio::Species/Bio::Taxon, not Bio::SeqIO::kegg. I
have committed a fix for this along with tests in Species.t and kegg.t.
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From cjfields at dev.open-bio.org Mon Jul 28 23:48:41 2008
From: cjfields at dev.open-bio.org (Christopher John Fields)
Date: Mon, 28 Jul 2008 23:48:41 -0400
Subject: [Bioperl-guts-l] [14768]
bioperl-live/trunk/Bio/Biblio/IO/medlinexml.pm: bug 2555
Message-ID: <200807290348.m6T3mfNu001777@dev.open-bio.org>
Revision: 14768
Author: cjfields
Date: 2008-07-28 23:48:41 -0400 (Mon, 28 Jul 2008)
Log Message:
-----------
bug 2555
Modified Paths:
--------------
bioperl-live/trunk/Bio/Biblio/IO/medlinexml.pm
Modified: bioperl-live/trunk/Bio/Biblio/IO/medlinexml.pm
===================================================================
--- bioperl-live/trunk/Bio/Biblio/IO/medlinexml.pm 2008-07-29 03:36:48 UTC (rev 14767)
+++ bioperl-live/trunk/Bio/Biblio/IO/medlinexml.pm 2008-07-29 03:48:41 UTC (rev 14768)
@@ -460,7 +460,7 @@
if ($e eq 'QualifierName' or
$e eq 'SubHeading') {
my %p = ();
- $p{'majorTopic'} = "Y" if $attrs{'MajorTopicYN'};
+ $p{'majorTopic'} = $attrs{'MajorTopicYN'} if $attrs{'MajorTopicYN'};
push (@ObjectStack, \%p);
}
From bugzilla-daemon at portal.open-bio.org Mon Jul 28 23:50:38 2008
From: bugzilla-daemon at portal.open-bio.org (bugzilla-daemon at portal.open-bio.org)
Date: Mon, 28 Jul 2008 23:50:38 -0400
Subject: [Bioperl-guts-l] [Bug 2555] Bio::Biblio::IO parse error
(medlinexml.pm)
In-Reply-To:
Message-ID: <200807290350.m6T3ocJY029993@portal.open-bio.org>
http://bugzilla.open-bio.org/show_bug.cgi?id=2555
cjfields at bioperl.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Comment #1 from cjfields at bioperl.org 2008-07-28 23:50 EST -------
Added a fix to svn. This now sets to whatever value MajorTopicYN is. Thanks
for the bug report!
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
From miraceti at dev.open-bio.org Tue Jul 29 01:12:45 2008
From: miraceti at dev.open-bio.org (miraceti at dev.open-bio.org)
Date: Tue, 29 Jul 2008 01