[Bioperl-guts-l] [14443] bioperl-live/trunk/Bio/FeatureIO/bed.pm: improved handling of different kinds of feature object
Senduran Balasubramaniam
sendu at dev.open-bio.org
Wed Jan 16 05:54:01 EST 2008
Revision: 14443
Author: sendu
Date: 2008-01-16 05:54:01 -0500 (Wed, 16 Jan 2008)
Log Message:
-----------
improved handling of different kinds of feature object
Modified Paths:
--------------
bioperl-live/trunk/Bio/FeatureIO/bed.pm
Modified: bioperl-live/trunk/Bio/FeatureIO/bed.pm
===================================================================
--- bioperl-live/trunk/Bio/FeatureIO/bed.pm 2008-01-16 10:51:53 UTC (rev 14442)
+++ bioperl-live/trunk/Bio/FeatureIO/bed.pm 2008-01-16 10:54:01 UTC (rev 14443)
@@ -184,6 +184,13 @@
} else {
$name = 'anonymous';
}
+
+ if (ref($name)) {
+ $name = $name->value;
+ }
+ if (ref($chrom)) {
+ $chrom = $chrom->value;
+ }
my $score = $feature->score || 0;
my $strand = $feature->strand == 0 ? '-' : '+'; #default to +
@@ -194,7 +201,7 @@
my $block_sizes = ''; #not implemented, used for sub features
my $block_starts = ''; #not implemented, used for sub features
- $self->_print(join("\t",($chrom->value,$chrom_start,$chrom_end,$name->value,$score,$strand,$thick_start,$thick_end,$reserved,$block_count,$block_sizes, $block_starts))."\n");
+ $self->_print(join("\t",($chrom,$chrom_start,$chrom_end,$name,$score,$strand,$thick_start,$thick_end,$reserved,$block_count,$block_sizes, $block_starts))."\n");
$self->write_feature($_) foreach $feature->get_SeqFeatures();
}
More information about the Bioperl-guts-l
mailing list