Mercurial > repos > nml > getmlst
comparison getmlst.pl @ 0:c2e910327131 draft default tip
planemo upload commit 132092ff7fe1c4810d1221054419389180b81657
| author | nml |
|---|---|
| date | Fri, 17 Nov 2017 11:49:10 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:c2e910327131 |
|---|---|
| 1 #!/usr/bin/env perl | |
| 2 | |
| 3 use strict; | |
| 4 use warnings; | |
| 5 use Cwd; | |
| 6 use File::Copy; | |
| 7 | |
| 8 my ($mlst_db, $mlst_defs, $species) = @ARGV; | |
| 9 | |
| 10 $species =~ s/__pd__/#/ig; | |
| 11 | |
| 12 my $command = "getmlst.py --species '$species'"; | |
| 13 | |
| 14 my $rv = system($command); | |
| 15 | |
| 16 if ($rv == 0) | |
| 17 { | |
| 18 #need to find output files in the dir | |
| 19 my $cur_dir = getcwd(); | |
| 20 | |
| 21 foreach my $file (<$cur_dir/*>) | |
| 22 { | |
| 23 if ($file =~ /\.fasta$/) | |
| 24 { | |
| 25 move($file, $mlst_db); | |
| 26 } | |
| 27 elsif ($file =~/\.txt$/) | |
| 28 { | |
| 29 move($file, $mlst_defs); | |
| 30 } | |
| 31 } | |
| 32 } | |
| 33 $rv = $rv >> 8; | |
| 34 exit $rv; |
