comparison snippy_core_wrapper.pl @ 20:3bbfe41787af draft

planemo upload commit bf653fc1bf39312caf070843fbde7b2570330917-dirty
author dfornika
date Fri, 08 Mar 2019 20:46:56 -0500
parents 8a6b951f6ec2
children
comparison
equal deleted inserted replaced
19:8a6b951f6ec2 20:3bbfe41787af
16 use warnings; 16 use warnings;
17 use strict; 17 use strict;
18 use File::Copy; 18 use File::Copy;
19 use File::Basename; 19 use File::Basename;
20 20
21 my(@Options, $indirs, $noref); 21 my(@Options, $indirs, $ref);
22 setOptions(); 22 setOptions();
23 23
24 my @list_of_dirs = split /\s+/, $indirs; 24 my @list_of_dirs = split /\s+/, $indirs;
25 25
26 #The list of final directories to be passed to snippy-core will be stored here. 26 #The list of final directories to be passed to snippy-core will be stored here.
42 @snippy_outs = split /\s+/, $test_list; 42 @snippy_outs = split /\s+/, $test_list;
43 43
44 44
45 my $commandline = "snippy-core "; 45 my $commandline = "snippy-core ";
46 46
47 $commandline .= "--noref " if $noref; 47 $commandline .= " --ref $ref " if $ref;
48 $commandline .= join(" ", @snippy_outs); 48 $commandline .= join(" ", @snippy_outs);
49 print STDERR "snippy-core commandline: $commandline\n"; 49 print STDERR "snippy-core commandline: $commandline\n";
50 50
51 my $ok = system($commandline); 51 my $ok = system($commandline);
52 52
56 sub setOptions { 56 sub setOptions {
57 use Getopt::Long; 57 use Getopt::Long;
58 58
59 @Options = ( 59 @Options = (
60 {OPT=>"help", VAR=>\&usage, DESC=>"This help"}, 60 {OPT=>"help", VAR=>\&usage, DESC=>"This help"},
61 {OPT=>"noref!", VAR=>\$noref, DEFAULT=>0, DESC=>"Don't include the reference in the alignment."}, 61 {OPT=>"ref=s", VAR=>\$ref, DEFAULT=>"", DESC=>"Reference genome."},
62 {OPT=>"indirs=s", VAR=>\$indirs, DEFAULT=>"", DESC=>"A whitespace delimited list of the snippy output zipped dirs."}, 62 {OPT=>"indirs=s", VAR=>\$indirs, DEFAULT=>"", DESC=>"A whitespace delimited list of the snippy output zipped dirs."},
63 ); 63 );
64 64
65 &GetOptions(map {$_->{OPT}, $_->{VAR}} @Options) || usage(); 65 &GetOptions(map {$_->{OPT}, $_->{VAR}} @Options) || usage();
66 66