fix the version issue for motus_profile.

This commit is contained in:
JIANHONG OU 2022-05-05 15:35:31 -04:00
parent b8efa2ae7c
commit e391c65510

View file

@ -39,10 +39,10 @@ process MOTUS_PROFILE {
## mOTUs version number is not available from command line.
## mOTUs save the version number in index database folder.
## mOTUs will check the database version is same version as exec version.
if [ "$refdb" == "" ]; then
if [ "$db" == "" ]; then
VERSION=\$(echo \$(motus -h 2>&1) | sed 's/^.*Version: //; s/References.*\$//')
else
VERSION=\$(grep motus $refdb/db_mOTU_versions | sed 's/motus\\t//g')
VERSION=\$(grep motus $db/db_mOTU_versions | sed 's/motus\\t//g')
fi
cat <<-END_VERSIONS > versions.yml
"${task.process}":