-
Notifications
You must be signed in to change notification settings - Fork 105
/
qiime2_diversity_beta.nf
33 lines (27 loc) · 1.04 KB
/
qiime2_diversity_beta.nf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
process QIIME2_DIVERSITY_BETA {
tag "${core.baseName} - ${category}"
label 'process_low'
conda (params.enable_conda ? { exit 1 "QIIME2 has no conda package" } : null)
container "quay.io/qiime2/core:2021.8"
input:
tuple path(metadata), path(core), val(category)
output:
path("beta_diversity/*"), emit: beta
path "versions.yml" , emit: versions
script:
"""
export XDG_CONFIG_HOME="\${PWD}/HOME"
qiime diversity beta-group-significance \
--i-distance-matrix ${core} \
--m-metadata-file ${metadata} \
--m-metadata-column \"${category}\" \
--o-visualization ${core.baseName}-${category}.qzv \
--p-pairwise
qiime tools export --input-path ${core.baseName}-${category}.qzv \
--output-path beta_diversity/${core.baseName}-${category}
cat <<-END_VERSIONS > versions.yml
"${task.process}":
qiime2: \$( qiime --version | sed -e "s/q2cli version //g" | tr -d '`' | sed -e "s/Run qiime info for more version details.//g" )
END_VERSIONS
"""
}