[Bioperl-guts-l] bioperl-live/Bio/AlignIO nexus.pm,1.29,1.30

Christopher John Fields cjfields at dev.open-bio.org
Tue Jan 16 14:37:38 EST 2007


Update of /home/repository/bioperl/bioperl-live/Bio/AlignIO
In directory dev.open-bio.org:/tmp/cvs-serv1899/Bio/AlignIO

Modified Files:
	nexus.pm 
Log Message:
fix filehandle issue for NEXUS parsing

Index: nexus.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/AlignIO/nexus.pm,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** nexus.pm	11 Nov 2006 11:20:14 -0000	1.29
--- nexus.pm	16 Jan 2007 19:37:36 -0000	1.30
***************
*** 145,149 ****
      return unless $entry;
      $self->throw("Not a valid interleaved NEXUS file! [#NEXUS] not starting the file\n$entry")
! 	unless $entry =~ /^#NEXUS/i;
  
      # skip anything before either the taxa or data block
--- 145,149 ----
      return unless $entry;
      $self->throw("Not a valid interleaved NEXUS file! [#NEXUS] not starting the file\n$entry")
! 	unless ($entry && $entry =~ /^#NEXUS/i);
  
      # skip anything before either the taxa or data block
***************
*** 158,162 ****
      # data and taxa blocks
      my $incomment;
!     while ($entry = $self->_readline) {
  	local ($_) =  $entry;
  	next if s/\[[^\]]+\]//g; # remove comments
--- 158,162 ----
      # data and taxa blocks
      my $incomment;
!     while (defined ($entry = $self->_readline)) {
  	local ($_) =  $entry;
  	next if s/\[[^\]]+\]//g; # remove comments
***************
*** 326,330 ****
      }
  
!     return $aln;
  }
  
--- 326,331 ----
      }
  
!     return $aln if $aln->no_sequences;
! 	return;
  }
  



More information about the Bioperl-guts-l mailing list