Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Bio-Phylo CPAN distribution.

Report information
The Basics
Id: 26987
Status: resolved
Priority: 0/
Queue: Bio-Phylo

People
Owner: Nobody in particular
Requestors: struckma [...] uni-greifswald.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Bio::Phylo::Treedrawer: _y_internals - Some Nodes do not have a y-coordinate
Date: Tue, 08 May 2007 13:36:05 +0200
To: bug-Bio-Phylo [...] rt.cpan.org
From: Stephan Struckmann <struckma [...] uni-greifswald.de>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, unfortunately I have to post a real bug: Under certain conditions (I think, it depends on the node degree), some nodes are placed with (x,y)=(x,0). This is because they don't get an y-coordinate in _y_internals. This function runs only until the root has an y coordinate, but the root can get one before all the other nodes have this coordinate, if their y-coordinate is not necessary to position the root: Only the first and the last daughter are needed to place a node, not all. I observed this error really with the tree below. I propose the following patch: sub _y_internals { my $self = shift; my $tree = $self->get_tree; my $ready = 0 ; # while ( !$tree->get_root->get_generic('y') ) { This is the first old line to be replaced while ( !$ready ) { # This is my proposal $ready = 1 ; foreach my $e ( @{ $tree->get_internals } ) { my $y1 = $e->get_first_daughter->get_generic('y'); my $y2 = $e->get_last_daughter->get_generic('y'); if ( $y1 && $y2 ) { my $y = ( $y1 + $y2 ) / 2; $e->set_generic( 'y' => $y ); # } This is the second old line to be replaced } else { $ready = 0 ; } # This is my proposal } } } Greetings from Germany, Stephan - ----------------------------------------------------------------------------- The tree (Euarchontoglires was misplaced, I think): ( 'Gallus gallus':4, ( 'Ornithorhynchus anatinus':4, ( ( 'Trichosurus vulpecula':4, Macropus:4 )Diprotodontia:4, ( 'Orycteropus afer':4, ( ( ( Otolemur:4, ( ( Eulemur:4, Lemur:4 )Lemuridae:4, Microcebus:4 )Lemuriformes:4 )Strepsirrhini:4, ( ( ( 'Homo sapiens':4, 'Pan troglodytes':4 )'Homo/Pan/Gorilla group':4, ( 'Colobus guereza':4, ( Papio:4, Cercopithecus:4, 'Macaca mulatta':4 )Cercopithecinae:4 )Cercopithecidae:4 )Catarrhini:4, ( 'Aotus azarai':4, Callicebus:4, Callithrix:4 )Platyrrhini:4 )Simiiformes:4 )Primates:4, ( Cavia:4, ( 'Mus musculus':4, 'Rattus norvegicus':4 )Murinae:4 )Rodentia:4 )Euarchontoglires:4, ( 'Erinaceus europaeus':4, ( Carolliinae:4, Rhinolophidae:4 )Microchiroptera:4, ( Sus:4, ( Bos:4, 'Ovis aries':4 )Bovidae:4 )Cetartiodactyla:4, 'Equus caballus':4, ( Canis:4, Felis:4 )Carnivora:4 )Laurasiatheria:4, 'Dasypus novemcinctus':4 )Eutheria:4 )Theria:4 )Mammalia:4 )Amniota:4; -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGQGCk8viug4UfhY8RAmg3AJ90QrTz6wLfVT//0XoWTXvMq6TsNQCgqoZ/ 6F86sJlodrTPP66t4OepkD8= =PRgE -----END PGP SIGNATURE-----
Download smime.p7s
application/x-pkcs7-signature 6.1k

Message body not shown because it is not plain text.

Dear Stephan, the treedrawer is being updated, the fix will include the problem you diagnosed when drawing trees with polytomies. Are you in urgent need of updated code? I will merge the fixes with the svn repository this week, so you could check out the bleeding edge version without having to wait for the new release (which will be in July). Email me at rvos@interchange.ubc.ca if you want access to the repository. Best wishes, Rutger Vos On Tue May 08 07:38:45 2007, struckma@uni-greifswald.de wrote: Show quoted text
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello, > > unfortunately I have to post a real bug: Under certain conditions (I > think, it depends on the node degree), some nodes are placed with > (x,y)=(x,0). This is because they don't get an y-coordinate in > _y_internals. This function runs only until the root has an y > coordinate, but the root can get one before all the other nodes have > this coordinate, if their y-coordinate is not necessary to position > the root: Only the first and the last daughter are needed to place a > node, not all. I observed this error really with the tree below. I > propose the following patch: > > sub _y_internals { > my $self = shift; > my $tree = $self->get_tree; > my $ready = 0 ; > # while ( !$tree->get_root->get_generic('y') ) { This is the > first old line to be replaced > while ( !$ready ) { # > This is my proposal > $ready = 1 ; > foreach my $e ( @{ $tree->get_internals } ) { > my $y1 = $e->get_first_daughter->get_generic('y'); > my $y2 = $e->get_last_daughter->get_generic('y'); > if ( $y1 && $y2 ) { > my $y = ( $y1 + $y2 ) / 2; > $e->set_generic( 'y' => $y ); > # } This is the second old line to be replaced > } else { $ready = 0 ; } # This is my proposal > } > } > } > > Greetings from Germany, > > Stephan > > - >
----------------------------------------------------------------------------- Show quoted text
> > The tree (Euarchontoglires was misplaced, I think): > > ( > 'Gallus gallus':4, > ( > 'Ornithorhynchus anatinus':4, > ( > ( > 'Trichosurus vulpecula':4, > Macropus:4 > )Diprotodontia:4, > ( > 'Orycteropus afer':4, > ( > ( > ( > Otolemur:4, > ( > ( > Eulemur:4, > Lemur:4 > )Lemuridae:4, > Microcebus:4 > )Lemuriformes:4 > )Strepsirrhini:4, > ( > ( > ( > 'Homo sapiens':4, > 'Pan troglodytes':4 > )'Homo/Pan/Gorilla group':4, > ( > 'Colobus guereza':4, > ( > Papio:4, > Cercopithecus:4, > 'Macaca mulatta':4 > )Cercopithecinae:4 > )Cercopithecidae:4 > )Catarrhini:4, > ( > 'Aotus azarai':4, > Callicebus:4, > Callithrix:4 > )Platyrrhini:4 > )Simiiformes:4 > )Primates:4, > ( > Cavia:4, > ( > 'Mus musculus':4, > 'Rattus norvegicus':4 > )Murinae:4 > )Rodentia:4 > )Euarchontoglires:4, > ( > 'Erinaceus europaeus':4, > ( > Carolliinae:4, > Rhinolophidae:4 > )Microchiroptera:4, > ( > Sus:4, > ( > Bos:4, > 'Ovis aries':4 > )Bovidae:4 > )Cetartiodactyla:4, > 'Equus caballus':4, > ( > Canis:4, > Felis:4 > )Carnivora:4 > )Laurasiatheria:4, > 'Dasypus novemcinctus':4 > )Eutheria:4 > )Theria:4 > )Mammalia:4 > > )Amniota:4; > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.5 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFGQGCk8viug4UfhY8RAmg3AJ90QrTz6wLfVT//0XoWTXvMq6TsNQCgqoZ/ > 6F86sJlodrTPP66t4OepkD8= > =PRgE > -----END PGP SIGNATURE----- >
Subject: Re: [rt.cpan.org #26987] Bio::Phylo::Treedrawer: _y_internals - Some Nodes do not have a y-coordinate
Date: Wed, 13 Jun 2007 08:34:42 +0200
To: bug-Bio-Phylo [...] rt.cpan.org
From: Stephan Struckmann <struckma [...] uni-greifswald.de>
Dear Rutger, thanks you for your effort. It depends on the planned release date, if I would need access to the svn repository. I plan to publish my pipeline tool in some weeks and would of course like to use the newest Phylo::Treedrawer therein. Another question is about some new features -- is there a discussion list or something like that, where I could post proposals? Eventually one of our group could contribute some code, if my Ph.D. adviser agrees. Greetings, Stephan Struckmann --On Montag, 11. Juni 2007 17:44 -0400 via RT <bug-Bio-Phylo@rt.cpan.org> wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=26987 > > > Dear Stephan, > > the treedrawer is being updated, the fix will include the problem you > diagnosed when drawing trees with polytomies. Are you in urgent need of > updated code? I will merge the fixes with the svn repository this week, > so you could check out the bleeding edge version without having to wait > for the new release (which will be in July). Email me at > rvos@interchange.ubc.ca if you want access to the repository. > > Best wishes, > > Rutger Vos > > On Tue May 08 07:38:45 2007, struckma@uni-greifswald.de wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Hello, >> >> unfortunately I have to post a real bug: Under certain conditions (I >> think, it depends on the node degree), some nodes are placed with >> (x,y)=(x,0). This is because they don't get an y-coordinate in >> _y_internals. This function runs only until the root has an y >> coordinate, but the root can get one before all the other nodes have >> this coordinate, if their y-coordinate is not necessary to position >> the root: Only the first and the last daughter are needed to place a >> node, not all. I observed this error really with the tree below. I >> propose the following patch: >> >> sub _y_internals { >> my $self = shift; >> my $tree = $self->get_tree; >> my $ready = 0 ; >> # while ( !$tree->get_root->get_generic('y') ) { This is the >> first old line to be replaced >> while ( !$ready ) { # >> This is my proposal >> $ready = 1 ; >> foreach my $e ( @{ $tree->get_internals } ) { >> my $y1 = $e->get_first_daughter->get_generic('y'); >> my $y2 = $e->get_last_daughter->get_generic('y'); >> if ( $y1 && $y2 ) { >> my $y = ( $y1 + $y2 ) / 2; >> $e->set_generic( 'y' => $y ); >> # } This is the second old line to be replaced >> } else { $ready = 0 ; } # This is my proposal >> } >> } >> } >> >> Greetings from Germany, >> >> Stephan >> >> - >>
> ------------------------------------------------------------------------- > ----
>> >> The tree (Euarchontoglires was misplaced, I think): >> >> ( >> 'Gallus gallus':4, >> ( >> 'Ornithorhynchus anatinus':4, >> ( >> ( >> 'Trichosurus vulpecula':4, >> Macropus:4 >> )Diprotodontia:4, >> ( >> 'Orycteropus afer':4, >> ( >> ( >> ( >> Otolemur:4, >> ( >> ( >> Eulemur:4, >> Lemur:4 >> )Lemuridae:4, >> Microcebus:4 >> )Lemuriformes:4 >> )Strepsirrhini:4, >> ( >> ( >> ( >> 'Homo sapiens':4, >> 'Pan troglodytes':4 >> )'Homo/Pan/Gorilla group':4, >> ( >> 'Colobus guereza':4, >> ( >> Papio:4, >> Cercopithecus:4, >> 'Macaca mulatta':4 >> )Cercopithecinae:4 >> )Cercopithecidae:4 >> )Catarrhini:4, >> ( >> 'Aotus azarai':4, >> Callicebus:4, >> Callithrix:4 >> )Platyrrhini:4 >> )Simiiformes:4 >> )Primates:4, >> ( >> Cavia:4, >> ( >> 'Mus musculus':4, >> 'Rattus norvegicus':4 >> )Murinae:4 >> )Rodentia:4 >> )Euarchontoglires:4, >> ( >> 'Erinaceus europaeus':4, >> ( >> Carolliinae:4, >> Rhinolophidae:4 >> )Microchiroptera:4, >> ( >> Sus:4, >> ( >> Bos:4, >> 'Ovis aries':4 >> )Bovidae:4 >> )Cetartiodactyla:4, >> 'Equus caballus':4, >> ( >> Canis:4, >> Felis:4 >> )Carnivora:4 >> )Laurasiatheria:4, >> 'Dasypus novemcinctus':4 >> )Eutheria:4 >> )Theria:4 >> )Mammalia:4 >> >> )Amniota:4; >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v1.4.5 (MingW32) >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org >> >> iD8DBQFGQGCk8viug4UfhY8RAmg3AJ90QrTz6wLfVT//0XoWTXvMq6TsNQCgqoZ/ >> 6F86sJlodrTPP66t4OepkD8= >> =PRgE >> -----END PGP SIGNATURE----- >>
> > > >
Institut für Mathematik und Informatik E.-M.-A.-Universität Greifswald
Download (untitled)
application/pkcs7-signature 5.3k

Message body not shown because it is not plain text.

From: RVOSA [...] cpan.org
Dear Stephan, the preferred means of discussion about Bio::Phylo would be through the forum (for posterity's sake, I suppose) - although I get emails as well, which I try to answer dilligently. Anyway, here's the forum: http://www.cpanforum.com/dist/Bio-Phylo I would naturally welcome code contributions! And proposals! Cheers, Rutger On Wed Jun 13 02:35:33 2007, struckma@uni-greifswald.de wrote: Show quoted text
> Dear Rutger, > > thanks you for your effort. It depends on the planned release date, if I > would need access to the svn repository. I plan to publish my pipeline
tool Show quoted text
> in some weeks and would of course like to use the newest
Phylo::Treedrawer Show quoted text
> therein. > > Another question is about some new features -- is there a discussion list > or something like that, where I could post proposals? Eventually one
of our Show quoted text
> group could contribute some code, if my Ph.D. adviser agrees. > > Greetings, > > Stephan Struckmann > > --On Montag, 11. Juni 2007 17:44 -0400 via RT
<bug-Bio-Phylo@rt.cpan.org> Show quoted text
> wrote: >
> > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=26987 > > > > > Dear Stephan, > > > > the treedrawer is being updated, the fix will include the problem you > > diagnosed when drawing trees with polytomies. Are you in urgent need of > > updated code? I will merge the fixes with the svn repository this week, > > so you could check out the bleeding edge version without having to wait > > for the new release (which will be in July). Email me at > > rvos@interchange.ubc.ca if you want access to the repository. > > > > Best wishes, > > > > Rutger Vos > > > > On Tue May 08 07:38:45 2007, struckma@uni-greifswald.de wrote:
> >> -----BEGIN PGP SIGNED MESSAGE----- > >> Hash: SHA1 > >> > >> Hello, > >> > >> unfortunately I have to post a real bug: Under certain conditions (I > >> think, it depends on the node degree), some nodes are placed with > >> (x,y)=(x,0). This is because they don't get an y-coordinate in > >> _y_internals. This function runs only until the root has an y > >> coordinate, but the root can get one before all the other nodes have > >> this coordinate, if their y-coordinate is not necessary to position > >> the root: Only the first and the last daughter are needed to place a > >> node, not all. I observed this error really with the tree below. I > >> propose the following patch: > >> > >> sub _y_internals { > >> my $self = shift; > >> my $tree = $self->get_tree; > >> my $ready = 0 ; > >> # while ( !$tree->get_root->get_generic('y') ) { This is the > >> first old line to be replaced > >> while ( !$ready ) { # > >> This is my proposal > >> $ready = 1 ; > >> foreach my $e ( @{ $tree->get_internals } ) { > >> my $y1 = $e->get_first_daughter->get_generic('y'); > >> my $y2 = $e->get_last_daughter->get_generic('y'); > >> if ( $y1 && $y2 ) { > >> my $y = ( $y1 + $y2 ) / 2; > >> $e->set_generic( 'y' => $y ); > >> # } This is the second old line to be replaced > >> } else { $ready = 0 ; } # This is my proposal > >> } > >> } > >> } > >> > >> Greetings from Germany, > >> > >> Stephan > >> > >> - > >>
> >
------------------------------------------------------------------------- Show quoted text
> > ----
> >> > >> The tree (Euarchontoglires was misplaced, I think): > >> > >> ( > >> 'Gallus gallus':4, > >> ( > >> 'Ornithorhynchus anatinus':4, > >> ( > >> ( > >> 'Trichosurus vulpecula':4, > >> Macropus:4 > >> )Diprotodontia:4, > >> ( > >> 'Orycteropus afer':4, > >> ( > >> ( > >> ( > >> Otolemur:4, > >> ( > >> ( > >> Eulemur:4, > >> Lemur:4 > >> )Lemuridae:4, > >> Microcebus:4 > >> )Lemuriformes:4 > >> )Strepsirrhini:4, > >> ( > >> ( > >> ( > >> 'Homo sapiens':4, > >> 'Pan troglodytes':4 > >> )'Homo/Pan/Gorilla group':4, > >> ( > >> 'Colobus guereza':4, > >> ( > >> Papio:4, > >> Cercopithecus:4, > >> 'Macaca mulatta':4 > >> )Cercopithecinae:4 > >> )Cercopithecidae:4 > >> )Catarrhini:4, > >> ( > >> 'Aotus azarai':4, > >> Callicebus:4, > >> Callithrix:4 > >> )Platyrrhini:4 > >> )Simiiformes:4 > >> )Primates:4, > >> ( > >> Cavia:4, > >> ( > >> 'Mus musculus':4, > >> 'Rattus norvegicus':4 > >> )Murinae:4 > >> )Rodentia:4 > >> )Euarchontoglires:4, > >> ( > >> 'Erinaceus europaeus':4, > >> ( > >> Carolliinae:4, > >> Rhinolophidae:4 > >> )Microchiroptera:4, > >> ( > >> Sus:4, > >> ( > >> Bos:4, > >> 'Ovis aries':4 > >> )Bovidae:4 > >> )Cetartiodactyla:4, > >> 'Equus caballus':4, > >> ( > >> Canis:4, > >> Felis:4 > >> )Carnivora:4 > >> )Laurasiatheria:4, > >> 'Dasypus novemcinctus':4 > >> )Eutheria:4 > >> )Theria:4 > >> )Mammalia:4 > >> > >> )Amniota:4; > >> > >> -----BEGIN PGP SIGNATURE----- > >> Version: GnuPG v1.4.5 (MingW32) > >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > >> > >> iD8DBQFGQGCk8viug4UfhY8RAmg3AJ90QrTz6wLfVT//0XoWTXvMq6TsNQCgqoZ/ > >> 6F86sJlodrTPP66t4OepkD8= > >> =PRgE > >> -----END PGP SIGNATURE----- > >>
> > > > > > > >
> > > > Institut für Mathematik und Informatik > E.-M.-A.-Universität Greifswald
I have uploaded a new version of Bio::Phylo (v.0.17_RC1) which should resolve your bug. Thanks.