-
Notifications
You must be signed in to change notification settings - Fork 4
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
Handle spcaes in raw/mzML file names #22
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come you removed the quotes around all the files being created, except for the .dia one? Aren't those quotes necessary to support mzML files with spaces in the name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nextflow will automatically escapes spaces when it is expanding file variables but not the methods for file variables. So ${mzml_file}
would expand to file\ with_space.mzML
, but ${mzml_file.baseName}
would expand to file with_space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we keep the quotes, when it expands "${mzml_file}.elib"
it will create a file name with a literal \
character in the file name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curious about this. Why was adding the -d
option necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-d'\n'
tells xargs
to use new lines as the delimiter instead of all white space, which is the default. Each file is on it's own line in all_files.txt
so xargs
will parse each line as an argument regardless of whether the file name has spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thought new lines were the default, makes sense, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So did I until I was getting an error on this step
mzML
andraw
files with spaces or other crazy characters in the file nameworkflows/get_mzmls.nf
where error messages weren't being printed properly in some cases