Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix usage text #122

Merged
merged 2 commits into from
May 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name = Bio-Roary
version = 2.2.0
version = 2.2.1
author = Andrew J. Page <ap13@sanger.ac.uk>
license = GPL_3
copyright_holder = Wellcome Trust Sanger Institute
Expand Down
8 changes: 2 additions & 6 deletions lib/Bio/Roary/CommandLine/Roary.pm
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ has 'group_limit' => ( is => 'rw', isa => 'Num', default => 50000 );
has 'core_definition' => ( is => 'rw', isa => 'Num', default => 1 );
has 'verbose' => ( is => 'rw', isa => 'Bool', default => 0 );

has '_error_message' => ( is => 'rw', isa => 'Str' );
has 'run_qc' => ( is => 'rw', isa => 'Bool', default => 0 );

sub BUILD {
Expand Down Expand Up @@ -93,6 +92,7 @@ sub BUILD {
if(@{$self->args} == 0)
{
$self->logger->error("Error: You need to provide a GFF file");
die $self->usage_text;
}
$self->output_filename($output_filename) if ( defined($output_filename) );
$self->job_runner($job_runner) if ( defined($job_runner) );
Expand Down Expand Up @@ -139,7 +139,7 @@ sub BUILD {
for my $filename ( @{ $self->args } ) {
if ( !-e $filename ) {
$self->logger->error("Error: Cant access file $filename");
last;
die $self->usage_text;
}
}
$self->fasta_files( $self->args );
Expand All @@ -150,10 +150,6 @@ sub run {
my ($self) = @_;

( !$self->help ) or die $self->usage_text;
if ( defined( $self->_error_message ) ) {
print $self->_error_message . "\n";
die $self->usage_text;
}

$self->logger->info("Extracting proteins from GFF files");
my $prepare_input_files = Bio::Roary::PrepareInputFiles->new(
Expand Down