Mercurial > repos > dfornika > snippy
comparison snippy_core_wrapper.pl @ 2:1a3c85497d96 draft
planemo upload for repository https://github.com/tseemann/snippy commit 73ec6ea773b1b88f7c32a2e8bc57b644b82f7ff9-dirty
| author | dfornika |
|---|---|
| date | Fri, 18 Jan 2019 22:46:34 -0500 |
| parents | 0276bb8bd561 |
| children | 8a6b951f6ec2 |
comparison
equal
deleted
inserted
replaced
| 1:e7e5da92d0ab | 2:1a3c85497d96 |
|---|---|
| 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 |
