INNER CODE UNIT · Python
envcheck3
franciscozorrilla/metaGEM · workflow/metaGEM.sh:131
envcheck3=$(conda info --envs|grep -w prokkaroary|wc -l)
if [[ "$envcheck3" -ge 1 ]]; then
echo -e "detected!\n"
else
echo -e "not detected, please run the env_setup.sh script!\n"
fi
# run createFolders rule to create folders in case any of them are missing
echo -e "Checking folders in workspace $pwd ... "
nFolders=$(ls -d */|wc -l)
if [[ "$nFolders" -le 20 ]]; then
while true; do
read -p "Some folders appear to be missing, do you wish to run the createFolders Snakefile rule? (y/n)" yn
case $yn in
[Yy]* ) echo "Running the createFolders snakefile rule ... " && snakemake createFolders -j1; break;;
[Nn]* ) echo "Skipping folder creation ... "; break;;
* ) echo "Please answer yes or no.";;
esac