forked from nf-core/modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.nf
More file actions
54 lines (46 loc) · 1.58 KB
/
main.nf
File metadata and controls
54 lines (46 loc) · 1.58 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
process VUEGEN {
label 'process_single'
conda "${moduleDir}/environment.yml"
container "nf-core/vuegen:v0.5.1"
input:
val input_type
path input_path
val report_type
output:
path "*report", emit: output_folder
path "versions.yml", emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
"""
# Validate quarto_check flag if using a conda environment
if [[ "${task.conda}" != "null" ]]; then
QUARTO_CHECK_FLAG="--quarto_checks"
else
QUARTO_CHECK_FLAG=""
fi
# Execute VueGen based on the input type
if [ "${input_type}" == "config" ]; then
echo "Running VueGen with config file: ${input_path}"
vuegen --config ${input_path} --report_type ${report_type} \$QUARTO_CHECK_FLAG ${args}
elif [ "${input_type}" == "directory" ]; then
echo "Running VueGen with directory: ${input_path}"
vuegen --directory ${input_path} --report_type ${report_type} \$QUARTO_CHECK_FLAG ${args}
fi
cat <<-END_VERSIONS > versions.yml
"${task.process}":
vuegen: \$( python -c "import vuegen; print(vuegen.__version__)" )
END_VERSIONS
"""
stub:
"""
echo "STUB MODE: Creating a generic report directory"
mkdir -p report
touch report/report.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
vuegen: \$( python -c "import vuegen; print(vuegen.__version__)" )
END_VERSIONS
"""
}