compomics / reporter

Protein quantification based on reporter ions
http://compomics.github.io/projects/reporter.html
4 stars 2 forks source link

problem using custom exports #18

Closed jcanderan closed 3 years ago

jcanderan commented 3 years ago

I have not been able to use custom exports when using Reporter from (linux) command line.

It works successfully in Windows GUI (creating exportFactory.json and exporting the report) and then I will use the same exportFactory.json from the command line.

paths.txt contains the proper directory:

reporter_exports=/home/jamie/jcms_projects/jc/pnnl/scripts/reporter

Within this directory is exportFactory.json generated as mentioned above.

Running reporter then generates the log entry showing the custom report isn't recognized:

java.lang.IllegalArgumentException: Unrecognized report type: 13. Available reports are: 0: Certificate of Analysis, 1: Default Hierarchical Report, 2: Default PSM Phosphorylation Report, 3: Default PSM Report, 4: Default PSM Report with non-validated matches, 5: Default Peptide Phosphorylation Report, 6: Default Peptide Report, 7: Default Peptide Report with non-validated matches, 8: Default Protein Phosphorylation Report, 9: Default Protein Report, 10: Default Protein Report with non-validated matches, 11: Extended PSM Report, 12: Fractions Report.
        at eu.isas.peptideshaker.export.PSExportFactory.getExportTypeFromCommandLineOption(PSExportFactory.java:749)
        at eu.isas.reporter.cli.ReportCLIInputBean.<init>(ReportCLIInputBean.java:68)
        at eu.isas.reporter.cli.ReporterCLIInputBean.<init>(ReporterCLIInputBean.java:335)
        at eu.isas.reporter.cli.ReporterCLI.call(ReporterCLI.java:352)
        at eu.isas.reporter.cli.ReporterCLI.main(ReporterCLI.java:845)

I noticed paths.txt also has a peptideshaker_exports entry so I manually updated it to be the directory above.

peptideshaker_exports=/home/jamie/jcms_projects/jc/pnnl/scripts/reporter

Now if I run reporter, I get the following log entry:

java.io.FileNotFoundException: File resources not found.
        at eu.isas.peptideshaker.preferences.PeptideShakerPathParameters.loadPathParametersFromLine(PeptideShakerPathParameters.java:214)
        at eu.isas.reporter.preferences.ReporterPathPreferences.loadPathParametersFromLine(ReporterPathPreferences.java:153)
        at eu.isas.reporter.preferences.ReporterPathPreferences.loadPathParametersFromFile(ReporterPathPreferences.java:126)
        at eu.isas.reporter.cli.PathSettingsCLI.setPathSettings(PathSettingsCLI.java:132)
        at eu.isas.reporter.cli.PathSettingsCLI.extractAndUpdatePathOptions(PathSettingsCLI.java:275)
        at eu.isas.reporter.cli.ReporterCLI.main(ReporterCLI.java:822)

Furthermore, now within the exports directory listed above is the file: reporter_exportFactory.cus containing:

{
  "userSchemes": {}
}

The next thing I tried is renaming exportFactory.json that I generated to both reporter_exportFactory.json and reporter_exportFactory.cus but neither helped (same log entries mentioned above).

Anyway, I haven't been able to find any sort of workaround to get this issue resolved to be able to suggest how it can be fixed.

I'll also note that I have no problems using exportFactory.json (generated in Windows PeptideShaker) in the command-line version of PeptideShaker.

Thanks!

hbarsnes commented 3 years ago

There was a copy-paste error where PeptideShaker exports were used instead of Reporter exports. Should now be fixed.

Note however that there seems to be an issue with the saving of the quantification values into the PeptideShaker project. Direct use of the ReportCLI therefore does not currently work, as this requires that the quantification values are saved in the project used as input. However you can instead add the report options directly to the ReporterCLI, i.e. something like this: java -cp Reporter-0.9.3.jar eu.isas.reporter.cli.ReporterCLI -id "C:\Users\Harald\Desktop\tmt test\TMT.psdb" -out_reports "C:\Users\Harald\Desktop\tmt test\reports" -reports 13.

I will try to look into the savings issue later, but at least you should now be able to use the export options via the command line. If this is not the case, please let me know and I'll reopen the issue.

hbarsnes commented 3 years ago

Quick update: I just noticed that the saving issue was already set up as a separate issue: #16. So apparently it matters after all...