[Bioperl-guts-l] bioperl-live/Bio/FeatureIO bed.pm,1.9,1.10

Senduran Balasubramaniam sendu at dev.open-bio.org
Tue Jan 23 11:24:09 EST 2007


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

Modified Files:
	bed.pm 
Log Message:
ignore header lines during input

Index: bed.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/FeatureIO/bed.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** bed.pm	10 Jan 2007 11:58:34 -0000	1.9
--- bed.pm	23 Jan 2007 16:24:07 -0000	1.10
***************
*** 69,72 ****
--- 69,73 ----
  use Bio::Annotation::SimpleValue;
  use Bio::OntologyIO;
+ use Scalar::Util qw(looks_like_number);
  
  =head2 _initialize
***************
*** 204,207 ****
--- 205,213 ----
    my ($seq_id, $start, $end, $name, $score, $strand) = split(/\s+/, $line);
    
+   unless (looks_like_number($start) && looks_like_number($end)) {
+     # skip what is probably a header line
+     return $self->next_feature;
+   }
+   
    my $feature = Bio::SeqFeature::Annotated->new(-start  => $start, # start is 0 based
                                                  -end    => --$end, # end is not part of the feature



More information about the Bioperl-guts-l mailing list