Skip to content

Commit

Permalink
Deal with mzml and raw files with spaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajmaurais committed Sep 24, 2024
1 parent 03f114a commit 2fbd7a4
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions modules/encyclopedia.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules/msconvert.nf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ process MSCONVERT {

stub:
"""
touch ${raw_file.baseName}.mzML
touch '${raw_file.baseName}.mzML'
"""
}
2 changes: 1 addition & 1 deletion modules/panorama.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
}

Expand Down
5 changes: 3 additions & 2 deletions modules/skyline.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
"""

Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 2fbd7a4

Please sign in to comment.