Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add msgfdb_indexing #374

Merged
merged 4 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions modules/local/openms/thirdparty/msgfdb_indexing/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
process MSGFDBINDEXING {
tag "$database.baseName"
label 'process_low'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if process_low is a good fit. But we will see while we use it.

label 'openms'

conda "bioconda::openms-thirdparty=3.1.0"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/openms-thirdparty:3.1.0--h9ee0642_1' :
'biocontainers/openms-thirdparty:3.1.0--h9ee0642_1' }"

input:
path(database)

output:
tuple path("${database.baseName}.cnlcp"), path("${database.baseName}.canno"), path("${database.baseName}.csarr"), path("${database.baseName}.cseq"), emit: msgfdb_idx
path "versions.yml", emit: version
path "*.log", emit: log

script:
def args = task.ext.args ?: ''

"""
msgf_plus edu.ucsd.msjava.msdbsearch.BuildSA \\
-d ${database} \\
-o ./ \\
-tda 0 \\
-debug $params.db_debug \\
$args \\
2>&1 | tee ${database.baseName}_msgfdb_idx.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
msgf_plus: \$(msgf_plus 2>&1 | grep -E '^MS-GF\\+ Release.*')
END_VERSIONS
"""
}
32 changes: 32 additions & 0 deletions modules/local/openms/thirdparty/msgfdb_indexing/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: msgfdb_indexing
description: Indexing the database prior to the database search for MS-GF+.
keywords:
- Indexing
- database
- msgf
tools:
- msgf_plus:
description: |
The MS-GF+ protein identification (database search) engine.
homepage: https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/nightly/html/TOPP_MSGFPlusAdapter.html
documentation: https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/nightly/html/TOPP_MSGFPlusAdapter.html
input:
- database:
type: file
description: fasta file
pattern: "*.{fasta,fa}"
output:
- msgfdb_idx:
type: file
description: Database indexing files
pattern: "*.{cnlcp,canno,csarr,cseq}"
- log:
type: file
description: log file
pattern: "*.log"
- version:
type: file
description: File containing software version
pattern: "versions.yml"
authors:
- "@daichengxin"
2 changes: 1 addition & 1 deletion modules/local/openms/thirdparty/searchenginemsgf/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ process SEARCHENGINEMSGF {
'biocontainers/openms-thirdparty:3.1.0--h9ee0642_1' }"

input:
tuple val(meta), path(mzml_file), path(database)
tuple val(meta), path(mzml_file), path(database), path(cnlcp), path(canno), path(csarr), path(cseq)

output:
tuple val(meta), path("${mzml_file.baseName}_msgf.idXML"), emit: id_files_msgf
Expand Down
4 changes: 3 additions & 1 deletion subworkflows/local/databasesearchengines.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
include { SEARCHENGINEMSGF } from '../../modules/local/openms/thirdparty/searchenginemsgf/main'
include { SEARCHENGINECOMET } from '../../modules/local/openms/thirdparty/searchenginecomet/main'
include { SEARCHENGINESAGE } from '../../modules/local/openms/thirdparty/searchenginesage/main'
include { MSGFDBINDEXING } from '../../modules/local/openms/thirdparty/msgfdb_indexing/main'

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

if (params.search_engines.contains("msgf")) {
SEARCHENGINEMSGF(ch_mzmls_search.combine(ch_searchengine_in_db))
MSGFDBINDEXING(ch_searchengine_in_db)
SEARCHENGINEMSGF(ch_mzmls_search.combine(ch_searchengine_in_db).combine(MSGFDBINDEXING.out.msgfdb_idx))
ch_versions = ch_versions.mix(SEARCHENGINEMSGF.out.version)
ch_id_msgf = ch_id_msgf.mix(SEARCHENGINEMSGF.out.id_files_msgf)
}
Expand Down
Loading