Skip to content

Commit

Permalink
Add ARIBA support
Browse files Browse the repository at this point in the history
  • Loading branch information
tseemann committed Jan 17, 2017
1 parent 0e7ddc0 commit c691656
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion bin/mdu-qc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ use lib "$FindBin::RealBin/../perl5";
use MDU;
use MDU::Logger qw(msg err);

#-------------------------------------------------------------------
# globals

my $ARIBA_DB = "$FindBin::RealBin/../db/ariba/resfinder";
my $TMPDIR = $ENV{'TMPDIR'} || '/tmp';

#-------------------------------------------------------------------
# command line

Expand Down Expand Up @@ -131,7 +137,8 @@ for my $id (@id)

$make{$id} = {
# DEP => [ "$id/timestamp.txt", "$id/yield.tab", "$id/species.txt", "$id/mlst.tab", "$id/abricate.tab", "$id/kmerstream.tab" ],
DEP => [ "$id/timestamp.txt", "$id/yield.tab", "$id/species.txt", "$id/mlst.tab", "$id/abricate.tab" ],
DEP => [ "$id/timestamp.txt", "$id/yield.tab", "$id/species.txt", "$id/mlst.tab",
"$id/abricate.tab", "$id/ariba.tab" ],
PHONY => 1,
};

Expand Down Expand Up @@ -217,6 +224,18 @@ for my $id (@id)
]
};

my $ARIBA_DIR = "$id/ariba";
$make{"$id/ariba.tab"} = {
DEP => $reads{$id},
CMD => [
"mkdir -p '$id'",
"rm -fr '$ARIBA_DIR'",
"ariba run --tmp_dir $TMPDIR --verbose $ARIBA_DB $make_deps $ARIBA_DIR",
"cp '$ARIBA_DIR/report.tsv' $make_target",
# "rm -fr '$SDIR'",
]
};

$make{"$id/mlst.tab"} = {
DEP => "$id/contigs.fa",
CMD => [
Expand All @@ -241,7 +260,9 @@ $make{blastdb} = {
};


msg("Writing Makefile");
write_makefile(\%make);
msg("Done.");

#-------------------------------------------------------------------
# write makefile
Expand Down

0 comments on commit c691656

Please sign in to comment.