Mercurial > repos > nml > getmlst
view getmlst.pl @ 0:c2e910327131 draft default tip
planemo upload commit 132092ff7fe1c4810d1221054419389180b81657
author | nml |
---|---|
date | Fri, 17 Nov 2017 11:49:10 -0500 |
parents | |
children |
line wrap: on
line source
#!/usr/bin/env perl use strict; use warnings; use Cwd; use File::Copy; my ($mlst_db, $mlst_defs, $species) = @ARGV; $species =~ s/__pd__/#/ig; my $command = "getmlst.py --species '$species'"; my $rv = system($command); if ($rv == 0) { #need to find output files in the dir my $cur_dir = getcwd(); foreach my $file (<$cur_dir/*>) { if ($file =~ /\.fasta$/) { move($file, $mlst_db); } elsif ($file =~/\.txt$/) { move($file, $mlst_defs); } } } $rv = $rv >> 8; exit $rv;