Skip to content

Commit

Permalink
Add error for trackLabel containing slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Mar 17, 2018
1 parent 1a27311 commit 7132714
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/perl5/Bio/JBrowse/Cmd/FlatFileToJson.pm
Expand Up @@ -68,15 +68,18 @@ sub run {
my ( $self ) = @_;

Pod::Usage::pod2usage( "Must provide a --trackLabel parameter." ) unless defined $self->opt('trackLabel');
unless( defined $self->opt('gff') ||
defined $self->opt('bed') ||
defined $self->opt('gbk') ||
defined $self->opt('bam')
unless( defined $self->opt('gff') ||
defined $self->opt('bed') ||
defined $self->opt('gbk') ||
defined $self->opt('bam')
) {
Pod::Usage::pod2usage( "You must supply either a --gff or --bed or --gbk parameter." )
}

$self->opt('bam') and die "BAM support has been moved to a separate program: bam-to-json.pl\n";
if($self->opt('trackLabel') =~ /\//) {
die "ERROR: trackLabel cannot contain slashes, use --key which can contain slashes\n";
}

if( ! $self->opt('nclChunk') ) {
# default chunk size is 50KiB
Expand Down

0 comments on commit 7132714

Please sign in to comment.