Skip to content

Commit

Permalink
Check for required dependencies depending on what pipelien we're runn…
Browse files Browse the repository at this point in the history
…ing (e.g. graphaligner only for ONT, bwa only for HiC, etc)
  • Loading branch information
skoren committed Aug 8, 2023
1 parent 87bc717 commit 963b381
Showing 1 changed file with 31 additions and 22 deletions.
53 changes: 31 additions & 22 deletions src/verkko.sh
Original file line number Diff line number Diff line change
Expand Up @@ -675,34 +675,43 @@ elif [ ! -e "$mbg" ] ; then
errors="${errors}Can't find MBG executable at '$mbg'.\n"
fi

if [ "x$graphaligner" = "x" ] ; then
errors="${errors}Can't find GraphAligner executable in \$PATH or \$VERKKO/bin/GraphAligner.\n"
elif [ ! -e "$graphaligner" ] ; then
errors="${errors}Can't find GraphAligner executable at '$graphaligner'.\n"
fi
# graphaligner and winnowmap are required when we have ONT data
if [ "x$withont" = "xTrue" ] ; then
if [ "x$graphaligner" = "x" ] ; then
errors="${errors}Can't find GraphAligner executable in \$PATH or \$VERKKO/bin/GraphAligner.\n"
elif [ ! -e "$graphaligner" ] ; then
errors="${errors}Can't find GraphAligner executable at '$graphaligner'.\n"
fi

if [ "x$mashmap" = "x" ] ; then
errors="${errors}Can't find MashMap executable in \$PATH or \$VERKKO/bin/mashmap.\n"
elif [ ! -e "$mashmap" ] ; then
errors="${errors}Can't find MashMap executable at '$mashmap'.\n"
if [ "x$winnowmap" = "x" ] ; then
errors="${errors}Can't find Winnowmap executable in \$PATH or \$VERKKO/bin/winnowmap.\n"
elif [ ! -e "$winnowmap" ] ; then
errors="${errors}Can't find Winnowmap executable at '$winnowmap'.\n"
fi
fi

if [ "x$winnowmap" = "x" ] ; then
errors="${errors}Can't find Winnowmap executable in \$PATH or \$VERKKO/bin/winnowmap.\n"
elif [ ! -e "$winnowmap" ] ; then
errors="${errors}Can't find Winnowmap executable at '$winnowmap'.\n"
# mashmap required for hic and for screening contaminant
if [ ! -z "$screen" -o "x$withhic" = "xTrue" ] ; then
if [ "x$mashmap" = "x" ] ; then
errors="${errors}Can't find MashMap executable in \$PATH or \$VERKKO/bin/mashmap.\n"
elif [ ! -e "$mashmap" ] ; then
errors="${errors}Can't find MashMap executable at '$mashmap'.\n"
fi
fi

if [ "x$bwa" = "x" ] ; then
errors="${errors}Can't find BWA executable in \$PATH or \$VERKKO/bin/bwa.\n"
elif [ ! -e "$bwa" ] ; then
errors="${errors}Can't find BWA executable at '$bwa'.\n"
fi
# bwa and samtools required for HiC data
if [ "x$withhic" = "xTrue" ] ; then
if [ "x$bwa" = "x" ] ; then
errors="${errors}Can't find BWA executable in \$PATH or \$VERKKO/bin/bwa.\n"
elif [ ! -e "$bwa" ] ; then
errors="${errors}Can't find BWA executable at '$bwa'.\n"
fi

if [ "x$samtools" = "x" ] ; then
errors="${errors}Can't find Samtools executable in \$PATH or \$VERKKO/bin/samtools.\n"
elif [ ! -e "$samtools" ] ; then
errors="${errors}Can't find Samtools executable at '$samtools'.\n"
if [ "x$samtools" = "x" ] ; then
errors="${errors}Can't find Samtools executable in \$PATH or \$VERKKO/bin/samtools.\n"
elif [ ! -e "$samtools" ] ; then
errors="${errors}Can't find Samtools executable at '$samtools'.\n"
fi
fi

#
Expand Down

0 comments on commit 963b381

Please sign in to comment.