OpenMS / Tutorials

Tutorials as used in the user meetings. (Please assign a git tag for the revision used for the UM)
BSD 3-Clause "New" or "Revised" License
13 stars 19 forks source link

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

Open jpfeuffer opened 5 years ago

jpfeuffer commented 5 years ago

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 commented 5 years ago

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

cbielow commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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