-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #178 from daichengxin/diann
restruct DIA-NN step2
- Loading branch information
Showing
4 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
process DIANN_PRELIMINARY_ANALYSIS { | ||
label 'process_high' | ||
|
||
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' : | ||
'biocontainers/diann:v1.8.1_cv1' }" | ||
|
||
input: | ||
tuple file(mzML), file(predict_tsv), file(diann_config) | ||
|
||
output: | ||
path "*.quant", emit: diann_quant | ||
path "${mzML.baseName}_lib.tsv", emit: lib | ||
path "*.log.txt", emit: log | ||
path "versions.yml", emit: version | ||
|
||
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" : "" | ||
|
||
quick_mass_acc = params.quick_mass_acc ? "--quick-mass-acc" : "" | ||
time_corr_only = params.time_corr_only ? "--time-corr-only" : "" | ||
|
||
""" | ||
diann `cat diann_config.cfg` \\ | ||
--lib ${predict_tsv} \\ | ||
--f ${mzML} \\ | ||
${min_pr_mz} \\ | ||
${max_pr_mz} \\ | ||
${min_fr_mz} \\ | ||
${max_fr_mz} \\ | ||
--threads ${task.cpus} \\ | ||
--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 \\ | ||
--verbose $params.diann_debug \\ | ||
--window $params.scan_window \\ | ||
--gen-spec-lib \\ | ||
--out-lib ${mzML.baseName}_lib.tsv \\ | ||
--temp ./ \\ | ||
--min-corr $params.min_corr \\ | ||
--corr-diff $params.corr_diff \\ | ||
${quick_mass_acc} \\ | ||
${time_corr_only} \\ | ||
$args \\ | ||
|& tee diann.log | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
DIA-NN: \$(diann 2>&1 | grep "DIA-NN" | grep -oP "(\\d*\\.\\d+\\.\\d+)|(\\d*\\.\\d+)") | ||
END_VERSIONS | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: diann_preliminary_analysis | ||
description: A module for preliminary analysis of individual raw files based on DIA-NN. | ||
keywords: | ||
- DIA-NN | ||
- DIA | ||
tools: | ||
- DIA-NN: | ||
description: | | ||
DIA-NN - a universal software for data-independent acquisition (DIA) proteomics data processing by Demichev. | ||
homepage: https://github.com/vdemichev/DiaNN | ||
documentation: https://github.com/vdemichev/DiaNN | ||
input: | ||
- predict_tsv: | ||
type: file | ||
description: Silico-predicted spectral library by deep leaning predictor in DIA-NN | ||
pattern: "*.tsv" | ||
- mzML: | ||
type: file | ||
description: Spectra file in mzML format | ||
pattern: "*.mzML" | ||
- cfg: | ||
type: dir | ||
description: Specifies a file to load options/commands from. | ||
pattern: "*.cfg" | ||
output: | ||
- diann_quant: | ||
type: file | ||
description: Quantification file from DIA-NN | ||
pattern: "*.quant" | ||
- lib: | ||
type: file | ||
description: Spectral library file | ||
pattern: "*.tsv" | ||
- log: | ||
type: file | ||
description: DIA-NN log file | ||
pattern: "diann_report.log.txt" | ||
- version: | ||
type: file | ||
description: File containing software version | ||
pattern: "versions.yml" | ||
authors: | ||
- "@daichengxin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters