From 03f114a627c5e7f331fa9be147300457e961279f Mon Sep 17 00:00:00 2001 From: mauraisa Date: Tue, 24 Sep 2024 14:39:53 -0700 Subject: [PATCH 1/3] Fix error message. --- workflows/get_mzmls.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/get_mzmls.nf b/workflows/get_mzmls.nf index a8be187..10b850b 100644 --- a/workflows/get_mzmls.nf +++ b/workflows/get_mzmls.nf @@ -52,7 +52,7 @@ workflow get_mzmls { extensions = fileList.collect { it.substring(it.lastIndexOf('.') + 1) }.unique() // Check that we have exactly 1 MS file extension - directories = spectra_dir.collect{ it -> "${it}${it[-1] == '/' ? '' : '/' }${spectra_glob}" }.join('\n') + directories = spectra_dirs.collect{ it -> "${it}${it[-1] == '/' ? '' : '/' }${spectra_glob}" }.join('\n') if (extensions.size() == 0) { error "No files matches fore:\n" + directories + "\nPlease choose a file glob that will match raw or mzML files." From 2fbd7a4c64b94714eb9e6b96738120f064dacbd7 Mon Sep 17 00:00:00 2001 From: mauraisa Date: Wed, 18 Sep 2024 13:15:23 -0700 Subject: [PATCH 2/3] Deal with mzml and raw files with spaces. --- modules/encyclopedia.nf | 8 ++++---- modules/msconvert.nf | 2 +- modules/panorama.nf | 2 +- modules/skyline.nf | 5 +++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/encyclopedia.nf b/modules/encyclopedia.nf index 07f9048..f8b5533 100644 --- a/modules/encyclopedia.nf +++ b/modules/encyclopedia.nf @@ -49,11 +49,11 @@ process ENCYCLOPEDIA_SEARCH_FILE { stub: """ touch stub.stderr stub.stdout - touch "${mzml_file}.elib" + touch ${mzml_file}.elib touch "${mzml_file.baseName}.dia" - touch "${mzml_file}.features.txt" - touch "${mzml_file}.encyclopedia.txt" - touch "${mzml_file}.encyclopedia.decoy.txt" + touch ${mzml_file}.features.txt + touch ${mzml_file}.encyclopedia.txt + touch ${mzml_file}.encyclopedia.decoy.txt md5sum *.elib *.features.txt *.encyclopedia.txt *.encyclopedia.decoy.txt *.mzML | sed -E 's/([a-f0-9]{32}) [ \\*](.*)/\\2\\t\\1/' | sort > hashes.txt stat -L --printf='%n\t%s\n' *.elib *.features.txt *.encyclopedia.txt *.encyclopedia.decoy.txt *.mzML | sort > sizes.txt diff --git a/modules/msconvert.nf b/modules/msconvert.nf index 5f2dd27..38e9935 100644 --- a/modules/msconvert.nf +++ b/modules/msconvert.nf @@ -32,6 +32,6 @@ process MSCONVERT { stub: """ - touch ${raw_file.baseName}.mzML + touch '${raw_file.baseName}.mzML' """ } diff --git a/modules/panorama.nf b/modules/panorama.nf index 0016378..3a32d71 100644 --- a/modules/panorama.nf +++ b/modules/panorama.nf @@ -84,7 +84,7 @@ process PANORAMA_GET_MS_FILE_LIST { > >(tee "panorama-get-files.stdout") 2> >(tee "panorama-get-files.stderr" >&2) && \ # Filter raw files by file_glob and prepend web_dav_url to file names - grep -P '${regex}' all_files.txt | xargs printf '${web_dav_url.replaceAll("%", "%%")}/%s\n' > download_files.txt + grep -P '${regex}' all_files.txt | xargs -d'\\n' printf '${web_dav_url.replaceAll("%", "%%")}/%s\\n' > download_files.txt """ } diff --git a/modules/skyline.nf b/modules/skyline.nf index 467c50f..844e5c4 100644 --- a/modules/skyline.nf +++ b/modules/skyline.nf @@ -112,7 +112,7 @@ process SKYLINE_IMPORT_MZML { wine SkylineCmd \ --in="${skyline_zipfile.baseName}" --memstamp \ --import-no-join \ - --import-file="/tmp/${mzml_file}" \ + --import-file="/tmp/${mzml_file.name}" \ > >(tee '${mzml_file.baseName}.stdout') 2> >(tee '${mzml_file.baseName}.stderr' >&2) """ @@ -142,7 +142,8 @@ process SKYLINE_MERGE_RESULTS { path('output_file_hashes.txt'), emit: output_file_hashes script: - import_files_params = "--import-file=${(mzml_files as List).collect{ "/tmp/" + file(it).name }.join(' --import-file=')}" + + import_files_params = "--import-file=\"${(mzml_files as List).collect{ "/tmp/" + file(it).name }.join('\" --import-file=\"')}\"" protein_parsimony_args = "--import-fasta=${fasta} --associate-proteins-shared-peptides=DuplicatedBetweenProteins --associate-proteins-min-peptides=1 --associate-proteins-remove-subsets --associate-proteins-minimal-protein-list" if(params.skyline.group_by_gene) { protein_parsimony_args += ' --associate-proteins-gene-level-parsimony' From 95ee8cd44e33bc86f156feab8bd7eb79492ac4bd Mon Sep 17 00:00:00 2001 From: mauraisa Date: Wed, 25 Sep 2024 08:00:18 -0700 Subject: [PATCH 3/3] Fix typo. --- workflows/get_mzmls.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/get_mzmls.nf b/workflows/get_mzmls.nf index 10b850b..b6b4b98 100644 --- a/workflows/get_mzmls.nf +++ b/workflows/get_mzmls.nf @@ -54,7 +54,7 @@ workflow get_mzmls { // Check that we have exactly 1 MS file extension directories = spectra_dirs.collect{ it -> "${it}${it[-1] == '/' ? '' : '/' }${spectra_glob}" }.join('\n') if (extensions.size() == 0) { - error "No files matches fore:\n" + directories + + error "No files matches for:\n" + directories + "\nPlease choose a file glob that will match raw or mzML files." } if (extensions.size() > 1) {