compomics / searchgui

Highly adaptable common interface for proteomics search and de novo engines
http://compomics.github.io/projects/searchgui.html
38 stars 16 forks source link

Getting 'Failed to write to the log report file' when running Search CLI #353

Closed Michal-Babins closed 9 months ago

Michal-Babins commented 1 year ago

Issue: When running SearchCLI with a singularity container fetched from the galaxy container (https://depot.galaxyproject.org/singularity/searchgui%3A4.2.9--hdfd78af_0), the job appears to finish and transfers the search_gui.zip to the specific output folder. In the zip all that appears is the params file and the searchGUI_input.txt file. Upon further inspection in the log, here is what I get:

Unable to write in the following configuration folders. Please use a temporary folder, the path configuration command line, or edit the configuration paths from the graphical interface. searchgui_temp: Folder where SearchGUI temporary files are stored. search_engine_temp: Folder where search engine temporary files are stored.

Thu Jun 15 17:55:29 GMT 2023 Importing spectrum files. Thu Jun 15 17:55:29 GMT 2023 Importing spectrum file 12_16_Garden_NaOH_Rep1_1.mgf 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% Thu Jun 15 17:56:16 GMT 2023 Importing spectrum files completed (47.0 seconds).

Processing: 12_16_Garden_NaOH_Rep1_1.mgf (1/1)

Thu Jun 15 17:56:16 GMT 2023 Zipping output files.

10% 20% 30% 40% 50% 60% 70% 80% 90% Thu Jun 15 17:56:16 GMT 2023 Search Completed (47.2 seconds).

Thu Jun 15 17:56:16 GMT 2023 Failed to write to the log report file! java.io.FileNotFoundException: /usr/local/share/searchgui-4.2.9-0/resources/SearchGUI Report 2023-06-15 17.56.16.html (Read-only file system) at java.base/java.io.FileOutputStream.open0(Native Method) at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293) at java.base/java.io.FileOutputStream.(FileOutputStream.java:235) at java.base/java.io.FileOutputStream.(FileOutputStream.java:184) at java.base/java.io.FileWriter.(FileWriter.java:96) at eu.isas.searchgui.SearchHandler.saveReport(SearchHandler.java:1064) at eu.isas.searchgui.SearchHandler.searchCompleted(SearchHandler.java:948) at eu.isas.searchgui.SearchHandler.access$5900(SearchHandler.java:60) at eu.isas.searchgui.SearchHandler$SearchWorker.doInBackground(SearchHandler.java:4067) at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:833)

Search Completed.

Setup: The general setup of the command looks like this:

searchgui eu.isas.searchgui.cmd.SearchCLI \
    -spectrum_files 12_16_Garden_NaOH_Rep1_1.mgf \
    -id_params idparams.par \
    -fasta_file uniprot_sprot_decoy.fasta \
    -output_folder out

However, I am running the process through nextflow with singularity being configured. I am happy to provide more info if needed. Best.

hbarsnes commented 1 year ago

I would recommend having a look at the following path-related SearchCLI parameters:

-temp_folder               A folder for temporary file storage. Use only if 
                           you encounter problems with the default configuration.

-log                       Folder where the log files are written.

-use_log_folder            Use the log folder. 0: write logs and errors to standard output, 
                           1: use the log folder. Default: 1.

Not sure how to use these in your framework though but hopefully you can find a way?

Michal-Babins commented 1 year ago

Hey, thanks for the response!

When I add the path setting upfront:

searchgui eu.isas.searchgui.cmd.PathSettingsCLI \
  -temp_folder /temp \
  -log /log \
  -use_log_folder 1 && \
  searchgui eu.isas.searchgui.cmd.SearchCLI \
      -spectrum_files 12_16_Garden_NaOH_Rep1_1.mgf \
      -id_params idparams.par \
      -fasta_file uniprot_sprot_decoy.fasta \
      -output_folder out

It errors out with:

Fri Jun 16 14:43:21 GMT 2023: SearchGUI version 4.2.9. Memory given to the Java virtual machine: 4294967296. Total amount of memory in the Java virtual machine: 2151677952. Free memory: 2145419264. Java version: 17.0.3-internal. java.lang.RuntimeException: java.io.FileNotFoundException: /usr/local/share/searchgui-4.2.9-0/resources/conf/paths.txt (Read-only file system) at com.compomics.util.io.flat.SimpleFileWriter.(SimpleFileWriter.java:59) at eu.isas.searchgui.parameters.SearchGUIPathParameters.writeConfigurationToFile(SearchGUIPathParameters.java:346) at eu.isas.searchgui.cmd.PathSettingsCLI.setPathSettings(PathSettingsCLI.java:150) at eu.isas.searchgui.cmd.PathSettingsCLI.call(PathSettingsCLI.java:54) at eu.isas.searchgui.cmd.PathSettingsCLI.main(PathSettingsCLI.java:276) Caused by: java.io.FileNotFoundException: /usr/local/share/searchgui-4.2.9-0/resources/conf/paths.txt (Read-only file system) at java.base/java.io.FileOutputStream.open0(Native Method) at java.base/java.io.FileOutputStream.open(FileOutputStream.java:293) at java.base/java.io.FileOutputStream.(FileOutputStream.java:235) at java.base/java.io.FileOutputStream.(FileOutputStream.java:184) at java.base/java.io.FileWriter.(FileWriter.java:96) at com.compomics.util.io.flat.SimpleFileWriter.(SimpleFileWriter.java:53) ... 4 more

hbarsnes commented 1 year ago

Can you try also adding config_folder to your SearchCLI command line? This allows you to set the folder where the config files are written as well.

BTW, you do not have to run the PathSettingsCLI separately, as the PathSettingsCLI parameters can also be given directly to the SearchCLI command line.

Michal-Babins commented 1 year ago

Hey, thanks.

I changed everything to run under SearcCLI.

When I add config_folder, it errs with: UnrecognizedOptionException: Unrecognized option: -config_folder

I am using version 4.2.9.

Is config_folder associated with any given version (>=)?

hbarsnes commented 1 year ago

Seems like the config_folder option was added in version 4.2.10.

But always recommended to upgrade to the most recent version. At the time of writing we are at version 4.2.16.

hbarsnes commented 9 months ago

Issue assumed resolved. If this is not the case, please let us know and we'll reopen the issue.