Skip to content
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
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,22 @@ A graphical overview of suggested routes through the pipeline depending on conte
> [!NOTE]
> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.

### Supported file formats

The pipeline supports the following mass spectrometry data file formats:

- **`.raw`** - Thermo RAW files (automatically converted to mzML)
- **`.mzML`** - Open standard mzML files
- **`.d`** - Bruker timsTOF files (optionally converted to mzML when `--convert_dotd` is set)
- **`.dia`** - DIA-NN native binary format (passed through without conversion)

Compressed variants are supported for `.raw`, `.mzML`, and `.d` formats:

- `.gz` (gzip compressed)
- `.tar` (tar archive)
- `.tar.gz` or `.tgz` (tar gzip compressed)
- `.zip` (zip compressed)

First, find or create a sample-to-data relationship file ([SDRF](https://github.com/bigbio/proteomics-sample-metadata)).
Have a look at public datasets that were already annotated [here](https://github.com/bigbio/proteomics-sample-metadata/tree/master/annotated-projects).
Those SDRFs should be ready for one-command re-analysis and you can just use the URL to the file on GitHub,
Expand Down
18 changes: 17 additions & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,23 @@ where the experimental design file has to be one of:
- [Sample-to-data-relationship format](https://pubs.acs.org/doi/abs/10.1021/acs.jproteome.0c00376) (.sdrf.tsv)
- [OpenMS experimental design format](https://abibuilder.cs.uni-tuebingen.de/archive/openms/Documentation/release/latest/html/classOpenMS_1_1ExperimentalDesign.html#details) (.tsv)

In the respective "comment[file uri]" or "Spectra_Filepath" columns, the raw or mzML files with the mass spectra to be staged have to be listed. URIs are possible,
### Supported file formats

The pipeline supports the following mass spectrometry data file formats:

- **`.raw`** - Thermo RAW files (automatically converted to mzML)
- **`.mzML`** - Open standard mzML files
- **`.d`** - Bruker timsTOF files (optionally converted to mzML when `--convert_dotd` is set)
- **`.dia`** - DIA-NN native binary format (passed through without conversion)

Compressed variants are supported for `.raw`, `.mzML`, and `.d` formats:

- `.gz` (gzip compressed)
- `.tar` (tar archive)
- `.tar.gz` or `.tgz` (tar gzip compressed)
- `.zip` (zip compressed)

In the respective "comment[file uri]" or "Spectra_Filepath" columns, the mass spectra files to be processed have to be listed. URIs are possible,
and the root folder as well as the file endings can be changed in the options in case of previously downloaded, moved or converted experiments.

This will launch the pipeline with the `docker` configuration profile. See below for more information about profiles.
Expand Down
2 changes: 1 addition & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"description": "Overwrite the file type/extension of the filename as specified in the SDRF/design",
"fa_icon": "fas fa-file-invoice",
"default": "mzML",
"help_text": "If the above [`--root_folder`](#root_folder) was given to load local input files, this overwrites the file type/extension of\nthe filename as specified in the SDRF/design. Usually used in case you have an mzML-converted version of the files already. Needs to be\none of 'mzML' or 'raw' (the letter cases should match your files exactly)."
"help_text": "If the above [`--root_folder`](#root_folder) was given to load local input files, this overwrites the file type/extension of\nthe filename as specified in the SDRF/design. Usually used in case you have an mzML-converted version of the files already. Needs to be\none of 'mzML', 'raw', 'd', or 'dia' (the letter cases should match your files exactly). Compressed variants (.gz, .tar, .tar.gz, .zip) are supported for 'mzML', 'raw', and 'd' formats."
},
"acquisition_method": {
"type": "string",
Expand Down
22 changes: 22 additions & 0 deletions subworkflows/local/file_preparation/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,26 @@ workflow FILE_PREPARATION {
raw: hasExtension(it[1], '.raw')
mzML: hasExtension(it[1], '.mzML')
dotd: hasExtension(it[1], '.d')
dia: hasExtension(it[1], '.dia')
unsupported: true
}.set { ch_branched_input }

// Warn about unsupported file formats
ch_branched_input.unsupported
.collect()
.subscribe { files ->
if (files.size() > 0) {
log.warn "=" * 80
log.warn "WARNING: ${files.size()} file(s) with unsupported format(s) detected and will be SKIPPED from processing:"
files.each { meta, file ->
log.warn " - ${file}"
}
log.warn "\nSupported formats: .raw, .mzML, .d (Bruker), .dia"
log.warn "Compressed variants (.gz, .tar, .tar.gz, .zip) are also supported."
log.warn "=" * 80
}
}

// Note: we used to always index mzMLs if not already indexed but due to
// either a bug or limitation in nextflow
// peeking into a remote file consumes a lot of RAM
Expand Down Expand Up @@ -83,6 +101,10 @@ workflow FILE_PREPARATION {
ch_results = indexed_mzml_bundle.mix(ch_branched_input.dotd)
}

// Pass through .dia files without conversion (DIA-NN handles them natively)
// Note: .dia files bypass peak picking (when enabled) as they are only used with DIA-NN
ch_results = ch_results.mix(ch_branched_input.dia)


MZML_STATISTICS(ch_results)
ch_statistics = ch_statistics.mix(MZML_STATISTICS.out.ms_statistics.collect())
Expand Down