Skip to content

Commit

Permalink
further move Bio::JBrowse::Script namespace to Bio::JBrowse::Cmd to a…
Browse files Browse the repository at this point in the history
…ppease dzil
  • Loading branch information
rbuels committed Apr 13, 2012
1 parent 6a56c1e commit 9acfffc
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions bin/flatfile-to-json.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
use lib "$RealBin/../lib";
use JBlibs;

use Bio::JBrowse::Script::FlatFileToJson;
use Bio::JBrowse::Cmd::FlatFileToJson;

exit Bio::JBrowse::Script::FlatFileToJson->new(@ARGV)->run;
exit Bio::JBrowse::Cmd::FlatFileToJson->new(@ARGV)->run;

__END__
Expand Down
4 changes: 2 additions & 2 deletions bin/remove-track.pl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
use lib "$RealBin/../lib";
use JBlibs;

use Bio::JBrowse::Script::RemoveTrack;
use Bio::JBrowse::Cmd::RemoveTrack;

exit Bio::JBrowse::Script::RemoveTrack->new(@ARGV)->run;
exit Bio::JBrowse::Cmd::RemoveTrack->new(@ARGV)->run;

__END__
Expand Down
2 changes: 1 addition & 1 deletion lib/Bio/JBrowse/Script.pm → lib/Bio/JBrowse/Cmd.pm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package Bio::JBrowse::Script;
package Bio::JBrowse::Cmd;
use strict;
use warnings;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ Do C<perldoc bin/flatfile-to-json.pl> for most of the documentation.
=cut

package Bio::JBrowse::Script::FlatFileToJson;
package Bio::JBrowse::Cmd::FlatFileToJson;

use strict;
use warnings;

use base 'Bio::JBrowse::Script';
use base 'Bio::JBrowse::Cmd';

use ArrayRepr;
use GenomeDB;
Expand Down Expand Up @@ -198,11 +198,11 @@ sub make_gff_stream {
my $self = shift;

require Bio::GFF3::LowLevel::Parser;
require Bio::JBrowse::Script::FlatFileToJson::FeatureStream::GFF3_LowLevel;
require Bio::JBrowse::Cmd::FlatFileToJson::FeatureStream::GFF3_LowLevel;

my $p = Bio::GFF3::LowLevel::Parser->new( $self->opt('gff') );

return Bio::JBrowse::Script::FlatFileToJson::FeatureStream::GFF3_LowLevel->new(
return Bio::JBrowse::Cmd::FlatFileToJson::FeatureStream::GFF3_LowLevel->new(
parser => $p,
track_label => $self->opt('trackLabel')
);
Expand All @@ -212,7 +212,7 @@ sub make_bed_stream {
my ( $self, $config_hash ) = @_;

require Bio::FeatureIO;
require Bio::JBrowse::Script::FlatFileToJson::FeatureStream::BioPerl;
require Bio::JBrowse::Cmd::FlatFileToJson::FeatureStream::BioPerl;

my $io = Bio::FeatureIO->new(
-format => 'bed',
Expand All @@ -221,7 +221,7 @@ sub make_bed_stream {
($self->opt('thickType') ? ("-thick_type" => $self->opt('thickType')) : ()),
);

return Bio::JBrowse::Script::FlatFileToJson::FeatureStream::BioPerl->new(
return Bio::JBrowse::Cmd::FlatFileToJson::FeatureStream::BioPerl->new(
stream => sub { $io->next_feature },
track_label => $self->opt('trackLabel'),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ used for handling features inside FlatFileToJson.pm
=cut

package Bio::JBrowse::Script::FlatFileToJson::FeatureStream;
package Bio::JBrowse::Cmd::FlatFileToJson::FeatureStream;
use strict;
use warnings;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ for working with BioPerl seqfeature objects
=cut

package Bio::JBrowse::Script::FlatFileToJson::FeatureStream::BioPerl;
package Bio::JBrowse::Cmd::FlatFileToJson::FeatureStream::BioPerl;
use strict;
use warnings;
use base 'Bio::JBrowse::Script::FlatFileToJson::FeatureStream';
use base 'Bio::JBrowse::Cmd::FlatFileToJson::FeatureStream';

sub next_items {
my ( $self ) = @_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ class for working with L<Bio::GFF3::LowLevel::Parser> features
=cut

package Bio::JBrowse::Script::FlatFileToJson::FeatureStream::GFF3_LowLevel;
package Bio::JBrowse::Cmd::FlatFileToJson::FeatureStream::GFF3_LowLevel;
use strict;
use warnings;

use base 'Bio::JBrowse::Script::FlatFileToJson::FeatureStream';
use base 'Bio::JBrowse::Cmd::FlatFileToJson::FeatureStream';

sub next_items {
while ( my $i = $_[0]->{parser}->next_item ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Do C<perldoc bin/remove-track.pl> to see usage documentation.
=cut

package Bio::JBrowse::Script::RemoveTrack;
package Bio::JBrowse::Cmd::RemoveTrack;
use strict;
use warnings;

Expand All @@ -17,7 +17,7 @@ use File::Path ();
use File::Spec;

use JsonFileStorage;
use base 'Bio::JBrowse::Script';
use base 'Bio::JBrowse::Cmd';

sub option_defaults {
( dir => 'data/' )
Expand Down
4 changes: 2 additions & 2 deletions tests/perl_tests/flatfile-to-json.pl.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use JBlibs;
use Test::More;
use Test::Warn;

use Bio::JBrowse::Script::FlatFileToJson;
use Bio::JBrowse::Cmd::FlatFileToJson;

use File::Spec::Functions qw( catfile catdir );
use File::Temp ();
Expand All @@ -20,7 +20,7 @@ sub run_with(@) {
#ok( ! $?, 'flatfile-to-json.pl ran ok' );
my @args = @_;
warnings_are {
Bio::JBrowse::Script::FlatFileToJson->new( @args )->run;
Bio::JBrowse::Cmd::FlatFileToJson->new( @args )->run;
} [], 'ran without warnings';
}

Expand Down
4 changes: 2 additions & 2 deletions tests/perl_tests/remove-track.pl.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ use File::Copy::Recursive 'dircopy';

use FileSlurping 'slurp';

use Bio::JBrowse::Script::RemoveTrack;
use Bio::JBrowse::Cmd::RemoveTrack;

sub remove_track {
Bio::JBrowse::Script::RemoveTrack->new( '--quiet', @_ )->run
Bio::JBrowse::Cmd::RemoveTrack->new( '--quiet', @_ )->run
}

{
Expand Down

0 comments on commit 9acfffc

Please sign in to comment.