Skip to content
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

Boston19: CometAdapter has problems with Temp files on Windows (with spaces in path?) #162

Open
jpfeuffer opened this issue May 1, 2019 · 6 comments

Comments

@jpfeuffer
Copy link
Contributor

No description provided.

@jpfeuffer
Copy link
Contributor Author

Confirmed:
If your tmp path has space (e.g. because it is in your user folder and your username has spaces)
Comet has problems reading the temporary param file since it does not handle spaces correctly.

C:\jenkins\ws\openms_nightly_packaging\c2e226b2\build\bin\Release>set "TMP=C:\foo bar baz"

C:\jenkins\ws\openms_nightly_packaging\c2e226b2\build\bin\Release>echo %TMP%
C:\foo bar baz

C:\jenkins\ws\openms_nightly_packaging\c2e226b2\build\bin\Release>CometAdapter.exe -in C:\jenkins\ws\openms_nightly_packaging\c2e226b2\source\share\OpenMS\examples\BSA\BSA1.mzML -out foo.idXML -comet_executable C:\jenkins\ws\openms_nightly_packaging\c2e226b2\thirdparties_flat\Comet\comet.exe -database C:\jenkins\ws\openms_nightly_packaging\c2e226b2\source\share\OpenMS\examples\TOPPAS\data\BSA_Identification\18Protein_SoCe_Tr_detergents_trace_target_decoy.fasta
File 'C:/Users/jpfeuffer/.OpenMS/OpenMS.ini' is deprecated.
Updating missing/wrong entries in 'C:/Users/jpfeuffer/.OpenMS/OpenMS.ini' with defaults!
Comet is writing the default parameter file...
Executing: C:\jenkins\ws\openms_nightly_packaging\c2e226b2\thirdparties_flat\Comet\comet.exe
Executed C:\jenkins\ws\openms_nightly_packaging\c2e226b2\thirdparties_flat\Comet\comet.exe successfully!
Progress of 'loading spectra list':
-- done [took 0.28 s (CPU), 0.28 s (Wall)] --
FATAL: External invocation of C:\jenkins\ws\openms_nightly_packaging\c2e226b2\thirdparties_flat\Comet\comet.exe failed. Standard output and error were:

<Executing: C:\jenkins\ws\openms_nightly_packaging\c2e226b2\thirdparties_flat\Comet\comet.exe> occurred 2 times

 Comet version 2016.01 rev. 3
 Error - cannot open parameter file "C:\foo".

@jpfeuffer
Copy link
Contributor Author

Either try to fix the path before passing to Comet or write the Comet guys.

@cbielow
Copy link
Contributor

cbielow commented May 28, 2019

on first sight, we pass the arguments quoted, i.e. "C:\Program Files\OpenMS-2.4.0\share\OpenMS\THIRDPARTY\Comet/comet.exe" -P"C:\TEMP\with space\20190528_093217_ukkonen_6624_2\param.txt" "-NC:\TEMP\with space\20190528_093217_ukkonen_6624_2\result" C:/dev/openmsqt5/src/tests/topp/THIRDPARTY/CometAdapter_3.mzML

still yields


 Comet version 2016.01 rev. 3

 Error - cannot open parameter file "C:\TEMP\with".

@cbielow
Copy link
Contributor

cbielow commented May 28, 2019

ok, seems the comet guys should revisit their code:
at https://sourceforge.net/p/comet-ms/code/HEAD/tree/trunk/comet-ms/Comet.cpp#l124 the argument
"-PC:\TEMP\with space\20190528_093217_ukkonen_6624_2\param.txt" is parsed (as char* arg), and then a string is extracted via sscanf (which stops at the first whitespace).
Solution: just remove the first two characters, i.e. -P, and treat the remaining string as filename.
This also needs to be done for all other arguments, e.g. -N, which uses the same mechanism.

@cbielow
Copy link
Contributor

cbielow commented May 28, 2019

all we can do is check the filenames and quit with a better error message... not sure its worth the trouble though, because we'd need to check the comet version and stop doing this when the bug is fixed on their side...

@cbielow
Copy link
Contributor

cbielow commented May 28, 2019

posted as issue on the Comet ticket system: https://groups.google.com/forum/#!topic/comet-ms/lTGA76ul1pk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants