forked from bigbio/quantms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.nf
More file actions
57 lines (48 loc) · 1.88 KB
/
main.nf
File metadata and controls
57 lines (48 loc) · 1.88 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
55
56
57
process DIANN_INSILICO_LIBRARY_GENERATION {
tag "$fasta.Name"
label 'process_medium'
label 'diann'
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://containers.biocontainers.pro/s3/SingImgsRepo/diann/v1.8.1_cv1/diann_v1.8.1_cv1.img' :
'docker.io/biocontainers/diann:v1.8.1_cv1' }"
input:
file(fasta)
file(diann_config)
output:
path "versions.yml", emit: versions
path "*.predicted.speclib", emit: predict_speclib
path "silicolibrarygeneration.log", emit: log
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
min_pr_mz = params.min_pr_mz ? "--min-pr-mz $params.min_pr_mz":""
max_pr_mz = params.max_pr_mz ? "--max-pr-mz $params.max_pr_mz":""
min_fr_mz = params.min_fr_mz ? "--min-fr-mz $params.min_fr_mz":""
max_fr_mz = params.max_fr_mz ? "--max-fr-mz $params.max_fr_mz":""
"""
diann `cat diann_config.cfg` \\
--fasta ${fasta} \\
--fasta-search \\
${min_pr_mz} \\
${max_pr_mz} \\
${min_fr_mz} \\
${max_fr_mz} \\
--missed-cleavages $params.allowed_missed_cleavages \\
--min-pep-len $params.min_peptide_length \\
--max-pep-len $params.max_peptide_length \\
--min-pr-charge $params.min_precursor_charge \\
--max-pr-charge $params.max_precursor_charge \\
--var-mods $params.max_mods \\
--threads ${task.cpus} \\
--predictor \\
--verbose $params.diann_debug \\
--gen-spec-lib \\
${args}
cp *lib.log.txt silicolibrarygeneration.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
DIA-NN: \$(diann 2>&1 | grep "DIA-NN" | grep -oP "\\d+\\.\\d+(\\.\\w+)*(\\.[\\d]+)?")
END_VERSIONS
"""
}