|
7 | 7 | include { QUANTMSUTILS_DIANNCFG } from '../../../modules/nf-core/quantmsutils/dianncfg/main' |
8 | 8 | include { QUANTMSUTILS_MZMLSTATISTICS } from '../../../modules/nf-core/quantmsutils/mzmlstatistics/main' |
9 | 9 | include { QUANTMSUTILS_DIANN2MZTAB } from '../../../modules/nf-core/quantmsutils/diann2mztab/main' |
| 10 | +include { THERMORAWFILEPARSER } from '../../../modules/nf-core/thermorawfileparser/main' |
10 | 11 |
|
11 | 12 | include { DIANN as DIANN_INSILICOLIBRARYGENERATION } from '../../../modules/nf-core/diann/main' |
12 | 13 | include { DIANN as DIANN_PRELIMINARYANALYSIS } from '../../../modules/nf-core/diann/main' |
@@ -152,6 +153,33 @@ workflow DIA_PROTEOMICS_ANALYSIS { |
152 | 153 | ch_versions = Channel.empty() |
153 | 154 | (random_preanalysis, random_preanalysis_n, random_preanalysis_seed) = random_preanalysis ?: [false, null, null] |
154 | 155 |
|
| 156 | + // |
| 157 | + // MODULE: Convert RAW files to mzML if needed |
| 158 | + // |
| 159 | + ch_input |
| 160 | + .branch { |
| 161 | + raw: it[1].toString().toLowerCase().endsWith('.raw') |
| 162 | + other: true |
| 163 | + } |
| 164 | + .set { ch_input_branched } |
| 165 | + |
| 166 | + THERMORAWFILEPARSER(ch_input_branched.raw.map { meta, ms_file, enzyme, fixed_mods, variable_mods, precursor_tolerance, fragment_tolerance, precursor_tolerance_unit, fragment_tolerance_unit -> |
| 167 | + [meta, ms_file] |
| 168 | + }) |
| 169 | + ch_versions = ch_versions.mix(THERMORAWFILEPARSER.out.versions) |
| 170 | + |
| 171 | + // Reconstruct the input channel with converted files |
| 172 | + ch_input_converted = THERMORAWFILEPARSER.out.spectra |
| 173 | + .join(ch_input_branched.raw.map { meta, ms_file, enzyme, fixed_mods, variable_mods, precursor_tolerance, fragment_tolerance, precursor_tolerance_unit, fragment_tolerance_unit -> |
| 174 | + [meta, enzyme, fixed_mods, variable_mods, precursor_tolerance, fragment_tolerance, precursor_tolerance_unit, fragment_tolerance_unit] |
| 175 | + }) |
| 176 | + .map { meta, mzml, enzyme, fixed_mods, variable_mods, precursor_tolerance, fragment_tolerance, precursor_tolerance_unit, fragment_tolerance_unit -> |
| 177 | + [meta, mzml, enzyme, fixed_mods, variable_mods, precursor_tolerance, fragment_tolerance, precursor_tolerance_unit, fragment_tolerance_unit] |
| 178 | + } |
| 179 | + |
| 180 | + // Combine converted and non-RAW files |
| 181 | + ch_input = ch_input_branched.other.mix(ch_input_converted) |
| 182 | + |
155 | 183 | // |
156 | 184 | // Generate all combinations of inputs and create channel views with appropriate metadata |
157 | 185 | // This multiMap creates all necessary entity combinations up-front: |
|
0 commit comments