Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Optimized annotation wgs & exome [#695](https://github.com/BU-ISCIII/buisciii-tools/pull/695)
- Updated several software versions [#696](https://github.com/BU-ISCIII/buisciii-tools/pull/696)
- Updated nextclade checks for IRMA and viralrecon [#697](https://github.com/BU-ISCIII/buisciii-tools/pull/697)
- Enabled micromamba env activation when launching a script [#699](https://github.com/BU-ISCIII/buisciii-tools/pull/699)

### Modules

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ echo "
# Combine all results into one single file.
echo "
# Activate the conda environment
eval \"\$(micromamba shell hook --shell bash)\"
export MAMBA_EXE=\"/data/ucct/bi/pipelines/micromamba/bin/micromamba\"
export MAMBA_ROOT_PREFIX=\"/data/ucct/bi/pipelines/micromamba\"
eval \"\$(\$MAMBA_EXE shell hook --shell bash)\"
micromamba activate biopython_v1.84
echo -e \"-----Generating nextclade_combined.csv-----\"
python3 merge_results.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ cat ./sample_type_ref.txt | xargs -I % echo '
awk -v id="${header_id}_${fragment}" "BEGIN{RS=\">\"; ORS=\"\"} \$0 ~ id {print \">\"\$0}" \
../04-irma/all_samples_completo.txt > concatenated_sequences/${sample_id}/${sample_id}_${fragment}_ref.fasta
# Activate the conda environment
eval "$(micromamba shell hook --shell bash)"
export MAMBA_EXE="/data/ucct/bi/pipelines/micromamba/bin/micromamba"
export MAMBA_ROOT_PREFIX="/data/ucct/bi/pipelines/micromamba"
eval "$($MAMBA_EXE shell hook --shell bash)"
micromamba activate refgenie_v0.12.1
# Get the reference path from refgenie
ref_path=$(refgenie seek orthomyxoviridae/fasta:${ref} -c /data/ucct/bi/references/refgenie/genome_config.yaml)
Expand All @@ -75,7 +77,9 @@ cat ./sample_type_ref.txt | xargs -I {} echo "
mkdir -p vcf_files/\${sample_id}
echo -e \"-----Starting \$sample_id \${fragment}-----\"
# Activate the conda environment
eval \"\$(micromamba shell hook --shell bash)\"
export MAMBA_EXE=\"/data/ucct/bi/pipelines/micromamba/bin/micromamba\"
export MAMBA_ROOT_PREFIX=\"/data/ucct/bi/pipelines/micromamba\"
eval \"\$(\$MAMBA_EXE shell hook --shell bash)\"
micromamba activate biopython_v1.84
if [ -z \"\$input_file\" ]; then
echo \"No allAlleles file found in IRMA results for \${sample_id} and \${fragment}. Skipping...\"
Expand All @@ -98,7 +102,9 @@ cat ./sample_type_ref.txt | xargs -I {} echo "
fragment=\$(echo '{}' | awk '{print \$3}')
mkdir -p annotated_vcfs/\${sample_id}
# Activate the conda environment
eval \"\$(micromamba shell hook --shell bash)\"
export MAMBA_EXE=\"/data/ucct/bi/pipelines/micromamba/bin/micromamba\"
export MAMBA_ROOT_PREFIX=\"/data/ucct/bi/pipelines/micromamba\"
eval \"\$(\$MAMBA_EXE shell hook --shell bash)\"
micromamba activate refgenie_v0.12.1
dataDir=$(refgenie seek snpeff/flu_surveillance_db -c /data/ucct/bi/references/refgenie/genome_config.yaml)
echo -e \"-----Annotating \$sample_id \${fragment} vcf file-----\"
Expand All @@ -119,7 +125,9 @@ cat ./sample_type_ref.txt | xargs -I {} echo "
ref=\$(echo '{}' | awk '{print \$4}')
fragment=\$(echo '{}' | awk '{print \$3}')
# Activate the conda environment
eval \"\$(micromamba shell hook --shell bash)\"
export MAMBA_EXE=\"/data/ucct/bi/pipelines/micromamba/bin/micromamba\"
export MAMBA_ROOT_PREFIX=\"/data/ucct/bi/pipelines/micromamba\"
eval \"\$(\$MAMBA_EXE shell hook --shell bash)\"
micromamba activate refgenie_v0.12.1
dataDir=$(refgenie seek snpeff/flu_surveillance_db -c /data/ucct/bi/references/refgenie/genome_config.yaml)
echo -e \"-----Extracting relevant fields for \$sample_id \${fragment} vcf file-----\"
Expand Down
16 changes: 12 additions & 4 deletions buisciii/templates/IRMA/ANALYSIS/ANALYSIS01_IRMA/99-stats/lablog
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ cat ./sample_type_ref.txt | xargs -I % echo '
# Create a table of all the reported variants for a set of samples.
echo "
# Activate the conda environment
eval \"\$(micromamba shell hook --shell bash)\"
export MAMBA_EXE=\"/data/ucct/bi/pipelines/micromamba/bin/micromamba\"
export MAMBA_ROOT_PREFIX=\"/data/ucct/bi/pipelines/micromamba\"
eval \"\$(\$MAMBA_EXE shell hook --shell bash)\"
micromamba activate biopython_v1.84
echo -e \"-----Generating variants_long_table.csv-----\"
python3 create_variants_long_table.py ../06-variant-calling/annotated_vcfs
Expand All @@ -30,7 +32,9 @@ echo "
# Create a .tab file containing the percentage of Ns for each sample and each fragment.
echo "
# Activate the conda environment
eval \"\$(micromamba shell hook --shell bash)\"
export MAMBA_EXE=\"/data/ucct/bi/pipelines/micromamba/bin/micromamba\"
export MAMBA_ROOT_PREFIX=\"/data/ucct/bi/pipelines/micromamba\"
eval \"\$(\$MAMBA_EXE shell hook --shell bash)\"
micromamba activate biopython_v1.84
echo -e \"-----Generating %Ns.tab-----\"
python3 percentajeNs.py consensus_files %Ns.tab
Expand All @@ -40,7 +44,9 @@ echo "
# Create a table indicating the number of unambiguous bases and the total number of Ns.
echo "
# Activate the conda environment
eval \"\$(micromamba shell hook --shell bash)\"
export MAMBA_EXE=\"/data/ucct/bi/pipelines/micromamba/bin/micromamba\"
export MAMBA_ROOT_PREFIX=\"/data/ucct/bi/pipelines/micromamba\"
eval \"\$(\$MAMBA_EXE shell hook --shell bash)\"
micromamba activate biopython_v1.84
echo -e \"-----Generating qc_metrics.tsv-----\"
# Define the input directory and the output file
Expand Down Expand Up @@ -81,7 +87,9 @@ echo "#!/usr/bin/env bash
fi

# Activate the conda environment
eval \"\$(micromamba shell hook --shell bash)\"
export MAMBA_EXE=\"/data/ucct/bi/pipelines/micromamba/bin/micromamba\"
export MAMBA_ROOT_PREFIX=\"/data/ucct/bi/pipelines/micromamba\"
eval \"\$(\$MAMBA_EXE shell hook --shell bash)\"
micromamba activate refgenie_v0.12.1

in=\"\$1\"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# module load singularity
# Activate the micromamba environment
eval "$(micromamba shell hook --shell bash)"
export MAMBA_EXE="/data/ucct/bi/pipelines/micromamba/bin/micromamba"
export MAMBA_ROOT_PREFIX="/data/ucct/bi/pipelines/micromamba"
eval "$($MAMBA_EXE shell hook --shell bash)"
micromamba activate refgenie_v0.12.1

# Create folders.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ ln -s ../../../../ANALYSIS/*CHARACTERIZATION/*emmtyper/01-typing/results_emmtype

cd ../../../

eval "$(micromamba shell hook --shell=bash)"
export MAMBA_EXE="/data/ucct/bi/pipelines/micromamba/bin/micromamba"
export MAMBA_ROOT_PREFIX="/data/ucct/bi/pipelines/micromamba"
eval "$($MAMBA_EXE shell hook --shell bash)"
micromamba activate outbreakinfo

python3 generate_summary_outbreak.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ mv @@/data.json @@/@@_data.json
mv @@/results.txt @@/@@_results.txt
ln -s ../@@/@@_results.txt reports/" >> _02_kmerfinder_summary.sh

echo "eval \"\$(micromamba shell hook --shell bash)\"; micromamba activate outbreakinfo" >> _02_kmerfinder_summary.sh
echo "export MAMBA_EXE=\"/data/ucct/bi/pipelines/micromamba/bin/micromamba\"; export MAMBA_ROOT_PREFIX=\"/data/ucct/bi/pipelines/micromamba\"; eval \"\$(\$MAMBA_EXE shell hook --shell bash)\"; micromamba activate outbreakinfo" >> _02_kmerfinder_summary.sh
echo "python3 /data/ucct/bi/pipelines/nf-core-bacass/nf-core-bacass-2.4.0/2_4_0/bin/kmerfinder_summary.py --path reports/ --output_bn kmerfinder.bn --output_csv kmerfinder_summary.csv" >> _02_kmerfinder_summary.sh
echo "rm -rf reports" >> _02_kmerfinder_summary.sh
8 changes: 6 additions & 2 deletions buisciii/templates/viralrecon/ANALYSIS/lablog_viralrecon
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ check_references() {
exit 1
fi
# Activate the micromamba environment
eval "$(micromamba shell hook --shell bash)"
export MAMBA_EXE="/data/ucct/bi/pipelines/micromamba/bin/micromamba"
export MAMBA_ROOT_PREFIX="/data/ucct/bi/pipelines/micromamba"
eval "$($MAMBA_EXE shell hook --shell bash)"
micromamba activate refgenie_v0.12.1
environment=$(micromamba info | awk '/environment/ && /active/ {print $3}')
if [[ $environment == *"refgenie"* ]]; then
Expand Down Expand Up @@ -361,7 +363,9 @@ check_references() {
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)"
export MAMBA_EXE="/data/ucct/bi/pipelines/micromamba/bin/micromamba"
export MAMBA_ROOT_PREFIX="/data/ucct/bi/pipelines/micromamba"
eval "$($MAMBA_EXE shell hook --shell bash)"
micromamba activate refgenie_v0.12.1
environment=$(micromamba info | awk '/environment/ && /active/ {print $3}')
if [[ $environment == *"refgenie"* ]]; then
Expand Down
4 changes: 3 additions & 1 deletion buisciii/templates/viralrecon/ANALYSIS/sgene_metrics.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/bash

# Activate the micromamba environment
eval "$(micromamba shell hook --shell bash)"
export MAMBA_EXE="/data/ucct/bi/pipelines/micromamba/bin/micromamba"
export MAMBA_ROOT_PREFIX="/data/ucct/bi/pipelines/micromamba"
eval "$($MAMBA_EXE shell hook --shell bash)"
micromamba activate outbreakinfo

# Ensure required tools are available
Expand Down
Loading