Skip to content

Commit 963b381

Browse files
committed
Check for required dependencies depending on what pipelien we're running (e.g. graphaligner only for ONT, bwa only for HiC, etc)
1 parent 87bc717 commit 963b381

File tree

1 file changed

+31
-22
lines changed

1 file changed

+31
-22
lines changed

src/verkko.sh

+31-22
Original file line numberDiff line numberDiff line change
@@ -675,34 +675,43 @@ elif [ ! -e "$mbg" ] ; then
675675
errors="${errors}Can't find MBG executable at '$mbg'.\n"
676676
fi
677677

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

684-
if [ "x$mashmap" = "x" ] ; then
685-
errors="${errors}Can't find MashMap executable in \$PATH or \$VERKKO/bin/mashmap.\n"
686-
elif [ ! -e "$mashmap" ] ; then
687-
errors="${errors}Can't find MashMap executable at '$mashmap'.\n"
686+
if [ "x$winnowmap" = "x" ] ; then
687+
errors="${errors}Can't find Winnowmap executable in \$PATH or \$VERKKO/bin/winnowmap.\n"
688+
elif [ ! -e "$winnowmap" ] ; then
689+
errors="${errors}Can't find Winnowmap executable at '$winnowmap'.\n"
690+
fi
688691
fi
689692

690-
if [ "x$winnowmap" = "x" ] ; then
691-
errors="${errors}Can't find Winnowmap executable in \$PATH or \$VERKKO/bin/winnowmap.\n"
692-
elif [ ! -e "$winnowmap" ] ; then
693-
errors="${errors}Can't find Winnowmap executable at '$winnowmap'.\n"
693+
# mashmap required for hic and for screening contaminant
694+
if [ ! -z "$screen" -o "x$withhic" = "xTrue" ] ; then
695+
if [ "x$mashmap" = "x" ] ; then
696+
errors="${errors}Can't find MashMap executable in \$PATH or \$VERKKO/bin/mashmap.\n"
697+
elif [ ! -e "$mashmap" ] ; then
698+
errors="${errors}Can't find MashMap executable at '$mashmap'.\n"
699+
fi
694700
fi
695701

696-
if [ "x$bwa" = "x" ] ; then
697-
errors="${errors}Can't find BWA executable in \$PATH or \$VERKKO/bin/bwa.\n"
698-
elif [ ! -e "$bwa" ] ; then
699-
errors="${errors}Can't find BWA executable at '$bwa'.\n"
700-
fi
702+
# bwa and samtools required for HiC data
703+
if [ "x$withhic" = "xTrue" ] ; then
704+
if [ "x$bwa" = "x" ] ; then
705+
errors="${errors}Can't find BWA executable in \$PATH or \$VERKKO/bin/bwa.\n"
706+
elif [ ! -e "$bwa" ] ; then
707+
errors="${errors}Can't find BWA executable at '$bwa'.\n"
708+
fi
701709

702-
if [ "x$samtools" = "x" ] ; then
703-
errors="${errors}Can't find Samtools executable in \$PATH or \$VERKKO/bin/samtools.\n"
704-
elif [ ! -e "$samtools" ] ; then
705-
errors="${errors}Can't find Samtools executable at '$samtools'.\n"
710+
if [ "x$samtools" = "x" ] ; then
711+
errors="${errors}Can't find Samtools executable in \$PATH or \$VERKKO/bin/samtools.\n"
712+
elif [ ! -e "$samtools" ] ; then
713+
errors="${errors}Can't find Samtools executable at '$samtools'.\n"
714+
fi
706715
fi
707716

708717
#

0 commit comments

Comments
 (0)