Skip to content

Commit

Permalink
Added loading stage for micromamba refgenie enviroment
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimeozaez committed Aug 16, 2024
1 parent c789e8f commit e148200
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions bu_isciii/templates/viralrecon/ANALYSIS/lablog_viralrecon
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,15 @@ check_references() {
log_message "SAMtools module not loaded. Exiting..." blk_red
exit 1
fi
eval "$(micromamba shell hook --shell bash)"
micromamba activate refgenie_v0.12.1
environment=$(micromamba info | awk '/environment/ && /active/ {print $3}')
if [[ $environment == *"refgenie"* ]]; then
log_message "$environment environment succesfully activated." green
else
log_message "Refgenie environment is NOT ACTIVE. Exiting..." blk_red
exit 1
fi
if [ ! -e "/data/bi/references/refgenie/alias/${family}" ]; then # Check if directory doesn't exists
log_message "Creating new directory: /data/bi/references/refgenie/alias/${family}/ and saving file ${ref}.fasta in /data/bi/references/refgenie/alias/${family}/fasta/${ref}."
digest=$(openssl rand -hex 24)
Expand Down Expand Up @@ -255,6 +264,16 @@ check_references() {
if [ -z "$REF_GFF" ]; then
log_message "File ${ref}.gff is not yet downloaded."
if [ ! -v family ]; then obtain_family; if [ -z ${family} ]; then return; fi; fi
if [[ $environment != *"refgenie"* ]]; then
eval "$(micromamba shell hook --shell bash)"
micromamba activate refgenie_v0.12.1
environment=$(micromamba info | awk '/environment/ && /active/ {print $3}')
if [[ $environment == *"refgenie"* ]]; then
log_message "$environment environment succesfully activated." green
else
log_message "Refgenie environment is NOT ACTIVE. Exiting..." blk_red
fi
fi
if [ ! -e "/data/bi/references/refgenie/alias/${family}" ]; then # Check if directory doesn't exist
log_message "Creating new directory: /data/bi/references/refgenie/alias/${family}/ and saving file ${ref}.gff in /data/bi/references/refgenie/alias/${family}/gff/${ref}."
digest=$(openssl rand -hex 24)
Expand Down

0 comments on commit e148200

Please sign in to comment.