Skip to content

Commit d64652b

Browse files
authored
Merge pull request #374 from daichengxin/dev
add msgfdb_indexing
2 parents bb0b114 + 55c8d3b commit d64652b

File tree

4 files changed

+72
-2
lines changed

4 files changed

+72
-2
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
process MSGFDBINDEXING {
2+
tag "$database.baseName"
3+
label 'process_low'
4+
label 'openms'
5+
6+
conda "bioconda::openms-thirdparty=3.1.0"
7+
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
8+
'https://depot.galaxyproject.org/singularity/openms-thirdparty:3.1.0--h9ee0642_1' :
9+
'biocontainers/openms-thirdparty:3.1.0--h9ee0642_1' }"
10+
11+
input:
12+
path(database)
13+
14+
output:
15+
tuple path("${database.baseName}.cnlcp"), path("${database.baseName}.canno"), path("${database.baseName}.csarr"), path("${database.baseName}.cseq"), emit: msgfdb_idx
16+
path "versions.yml", emit: version
17+
path "*.log", emit: log
18+
19+
script:
20+
def args = task.ext.args ?: ''
21+
22+
"""
23+
msgf_plus edu.ucsd.msjava.msdbsearch.BuildSA \\
24+
-d ${database} \\
25+
-o ./ \\
26+
-tda 0 \\
27+
-debug $params.db_debug \\
28+
$args \\
29+
2>&1 | tee ${database.baseName}_msgfdb_idx.log
30+
31+
cat <<-END_VERSIONS > versions.yml
32+
"${task.process}":
33+
msgf_plus: \$(msgf_plus 2>&1 | grep -E '^MS-GF\\+ Release.*')
34+
END_VERSIONS
35+
"""
36+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: msgfdb_indexing
2+
description: Indexing the database prior to the database search for MS-GF+.
3+
keywords:
4+
- Indexing
5+
- database
6+
- msgf
7+
tools:
8+
- msgf_plus:
9+
description: |
10+
The MS-GF+ protein identification (database search) engine.
11+
homepage: https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/nightly/html/TOPP_MSGFPlusAdapter.html
12+
documentation: https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/nightly/html/TOPP_MSGFPlusAdapter.html
13+
input:
14+
- database:
15+
type: file
16+
description: fasta file
17+
pattern: "*.{fasta,fa}"
18+
output:
19+
- msgfdb_idx:
20+
type: file
21+
description: Database indexing files
22+
pattern: "*.{cnlcp,canno,csarr,cseq}"
23+
- log:
24+
type: file
25+
description: log file
26+
pattern: "*.log"
27+
- version:
28+
type: file
29+
description: File containing software version
30+
pattern: "versions.yml"
31+
authors:
32+
- "@daichengxin"

modules/local/openms/thirdparty/searchenginemsgf/main.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ process SEARCHENGINEMSGF {
99
'biocontainers/openms-thirdparty:3.1.0--h9ee0642_1' }"
1010

1111
input:
12-
tuple val(meta), path(mzml_file), path(database)
12+
tuple val(meta), path(mzml_file), path(database), path(cnlcp), path(canno), path(csarr), path(cseq)
1313

1414
output:
1515
tuple val(meta), path("${mzml_file.baseName}_msgf.idXML"), emit: id_files_msgf

subworkflows/local/databasesearchengines.nf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
include { SEARCHENGINEMSGF } from '../../modules/local/openms/thirdparty/searchenginemsgf/main'
66
include { SEARCHENGINECOMET } from '../../modules/local/openms/thirdparty/searchenginecomet/main'
77
include { SEARCHENGINESAGE } from '../../modules/local/openms/thirdparty/searchenginesage/main'
8+
include { MSGFDBINDEXING } from '../../modules/local/openms/thirdparty/msgfdb_indexing/main'
89

910
workflow DATABASESEARCHENGINES {
1011
take:
@@ -15,7 +16,8 @@ workflow DATABASESEARCHENGINES {
1516
(ch_id_msgf, ch_id_comet, ch_id_sage, ch_versions) = [ Channel.empty(), Channel.empty(), Channel.empty(), Channel.empty() ]
1617

1718
if (params.search_engines.contains("msgf")) {
18-
SEARCHENGINEMSGF(ch_mzmls_search.combine(ch_searchengine_in_db))
19+
MSGFDBINDEXING(ch_searchengine_in_db)
20+
SEARCHENGINEMSGF(ch_mzmls_search.combine(ch_searchengine_in_db).combine(MSGFDBINDEXING.out.msgfdb_idx))
1921
ch_versions = ch_versions.mix(SEARCHENGINEMSGF.out.version)
2022
ch_id_msgf = ch_id_msgf.mix(SEARCHENGINEMSGF.out.id_files_msgf)
2123
}

0 commit comments

Comments
 (0)