[Bioperl-guts-l] bioperl-live/Bio/TreeIO nhx.pm,1.13,1.14

Jason Stajich jason at pub.open-bio.org
Fri Nov 11 15:31:54 EST 2005


Update of /home/repository/bioperl/bioperl-live/Bio/TreeIO
In directory pub.open-bio.org:/tmp/cvs-serv10204

Modified Files:
	nhx.pm 
Log Message:
bug #1823; write internal node ids in nhx format


Index: nhx.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/TreeIO/nhx.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** nhx.pm	26 Sep 2005 19:15:38 -0000	1.13
--- nhx.pm	11 Nov 2005 20:31:51 -0000	1.14
***************
*** 50,58 ****
  Email amackey-at-virginia.edu
  
- Describe contact details here
- 
  =head1 CONTRIBUTORS
  
! Additional contributors names and emails here
  
  =head1 APPENDIX
--- 50,56 ----
  Email amackey-at-virginia.edu
  
  =head1 CONTRIBUTORS
  
! Email jason-at-bioperl-dot-org
  
  =head1 APPENDIX
***************
*** 287,298 ****
  	$data[0] = "(" . $data[0];
  	$data[-1] .= ")";
  	$data[-1] .= ":". $node->branch_length if $node->branch_length;	
  	# this is to not print out an empty NHX for the root node which is 
  	# a convience for how we get a handle to the whole tree
! 	if( $node->ancestor || $node->id || defined $node->branch_length ) {
  	    $data[-1] .= '[' . 
! 		join(":", "&&NHX", 
  		     map { "$_=" .join(',',$node->get_tag_values($_)) } 
  		     $node->get_all_tags() ) . ']';
  	}
      } else { 
--- 285,300 ----
  	$data[0] = "(" . $data[0];
  	$data[-1] .= ")";
+ 	my $id = $node->id;
+ 	$data[-1] .= $id  if( defined $id );
  	$data[-1] .= ":". $node->branch_length if $node->branch_length;	
  	# this is to not print out an empty NHX for the root node which is 
  	# a convience for how we get a handle to the whole tree
! 	
! 	if( $node->ancestor || defined $id && length($id) || defined $node->branch_length ) {	    
  	    $data[-1] .= '[' . 
! 		join(":", "&&NHX",
  		     map { "$_=" .join(',',$node->get_tag_values($_)) } 
  		     $node->get_all_tags() ) . ']';
+ 
  	}
      } else { 



More information about the Bioperl-guts-l mailing list