Skip to content

Commit

Permalink
Merge branch 'dev' into move-conda-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
d4straub authored Nov 9, 2023
2 parents 2326b7e + f956dc1 commit da06524
Show file tree
Hide file tree
Showing 25 changed files with 71 additions and 20 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Fixed`

- [#655](https://github.com/nf-core/ampliseq/pull/655) - Added `NUMBA_CACHE_DIR` to fix downstream analysis with QIIME2 that failed on some systems
- [#656](https://github.com/nf-core/ampliseq/pull/656) - Moved conda-check to script-section and replaced `exit 1` with `error()`

### `Dependencies`
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_alphararefaction.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ process QIIME2_ALPHARAREFACTION {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
maxdepth=\$(count_table_minmax_reads.py $stats maximum 2>&1)
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_ancom_asv.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ process QIIME2_ANCOM_ASV {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime composition add-pseudocount \\
--i-table ${table} \\
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_ancom_tax.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ process QIIME2_ANCOM_TAX {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
mkdir ancom
# Sum data at the specified level
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_barplot.nf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ process QIIME2_BARPLOT {
suffix = setting ? "_${table.baseName}" : ""
def metadata_cmd = metadata ? "--m-metadata-file ${metadata}": ""
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime taxa barplot \\
--i-table ${table} \\
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_classify.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ process QIIME2_CLASSIFY {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime feature-classifier classify-sklearn \\
--i-classifier ${trained_classifier} \\
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_diversity_adonis.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ process QIIME2_DIVERSITY_ADONIS {
}
def args = task.ext.args ?: ''
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime diversity adonis \\
--p-n-jobs $task.cpus \\
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_diversity_alpha.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ process QIIME2_DIVERSITY_ALPHA {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime diversity alpha-group-significance \\
--i-alpha-diversity ${core} \\
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_diversity_beta.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ process QIIME2_DIVERSITY_BETA {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime diversity beta-group-significance \\
--i-distance-matrix ${core} \\
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_diversity_betaord.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ process QIIME2_DIVERSITY_BETAORD {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
mkdir beta_diversity
qiime emperor plot \\
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_diversity_core.nf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ process QIIME2_DIVERSITY_CORE {
# COMMENT: might be fixed in version after QIIME2 2023.5
export UNIFRAC_USE_GPU=N
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
mindepth=\$(count_table_minmax_reads.py $stats minimum 2>&1)
if [ \"\$mindepth\" -lt \"$mindepth\" ]; then mindepth=$mindepth; fi
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_export_absolute.nf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ process QIIME2_EXPORT_ABSOLUTE {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
#produce raw count table in biom format "table/feature-table.biom"
qiime tools export \\
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_export_relasv.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ process QIIME2_EXPORT_RELASV {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
#convert to relative abundances
qiime feature-table relative-frequency \\
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_export_reltax.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ process QIIME2_EXPORT_RELTAX {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
##on several taxa level
array=(\$(seq ${tax_agglom_min} 1 ${tax_agglom_max}))
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_extract.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ process QIIME2_EXTRACT {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
### Import
qiime tools import \\
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_featuretable_group.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ process QIIME2_FEATURETABLE_GROUP {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime feature-table filter-samples \\
--i-table "${table}" \\
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_filtersamples.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ process QIIME2_FILTERSAMPLES {
def args = task.ext.args ?: "--p-where \'${filter}<>\"\"\'"
def prefix = task.ext.prefix ?: "${filter}"
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime feature-table filter-samples \\
--i-table ${table} \\
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_filtertaxa.nf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ process QIIME2_FILTERTAXA {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
if ! [ \"${exclude_taxa}\" = \"none\" ]; then
#filter sequences
Expand Down
3 changes: 3 additions & 0 deletions modules/local/qiime2_inasv.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ process QIIME2_INASV {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
# remove first line if needed
sed '/^# Constructed from biom file/d' "$asv" > biom-table.txt
Expand Down
3 changes: 3 additions & 0 deletions modules/local/qiime2_inseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ process QIIME2_INSEQ {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime tools import \\
--input-path "$seq" \\
--type 'FeatureData[Sequence]' \\
Expand Down
3 changes: 3 additions & 0 deletions modules/local/qiime2_intax.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ process QIIME2_INTAX {
}
def script_cmd = script ? "$script $tax" : "cp $tax tax.tsv"
"""
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
$script_cmd
qiime tools import \\
Expand Down
3 changes: 3 additions & 0 deletions modules/local/qiime2_intree.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ process QIIME2_INTREE {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime tools import \\
--type 'Phylogeny[Rooted]' \\
--input-path $tree \\
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_train.nf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ process QIIME2_TRAIN {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
#Train classifier
qiime feature-classifier fit-classifier-naive-bayes \\
Expand Down
4 changes: 3 additions & 1 deletion modules/local/qiime2_tree.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ process QIIME2_TREE {
error "QIIME2 does not support Conda. Please use Docker / Singularity / Podman instead."
}
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
export XDG_CONFIG_HOME="./xdgconfig"
export MPLCONFIGDIR="./mplconfigdir"
export NUMBA_CACHE_DIR="./numbacache"
qiime alignment mafft \\
--i-sequences ${repseq} \\
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/dada2_taxonomy_wf.nf
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ workflow DADA2_TAXONOMY_WF {
//set file name prefix for SH assignments
if (!params.skip_dada_addspecies) {
ASV_SH_name = "ASV_tax_species_SH"
} else {
} else {
ASV_SH_name = "ASV_tax_SH"
}
//find SHs
Expand Down

0 comments on commit da06524

Please sign in to comment.