compomics / peptide-shaker

Interpretation of proteomics identification results
http://compomics.github.io/projects/peptide-shaker.html
48 stars 19 forks source link

exportFactory.json file gets overwritten when running ReportCLI #484

Closed veitveit closed 2 years ago

veitveit commented 2 years ago

After creating the exportFactory.json in the GUI (being written into the .peptideshaker) folder, it gets overwritten with the empty version when running the CLI via java -cp /opt/PeptideShaker-2.2.0/PeptideShaker-2.2.0.jar eu.isas.peptideshaker.cmd.ReportCLI

Did I miss anything here?

hbarsnes commented 2 years ago

I'm not able to reproduce this on my side it seems. But you can always move the custom exportFactory.json file to a separate folder and use the -peptideshaker_exports option to ensure that the specific json file is used?

I see that you are not using the latest version though, so updating to 2.2.7 may also solve the problem. Not that I remember making any changes related to this recently though.

veitveit commented 2 years ago

Still same issue. It also overwrites the file when it is in a different folder.

2.2.7 behaves the same.

Maybe it is that specific format (attached file, you need to remove the .txt ending)? exportFactory.json.txt

I ran java -cp /opt/PeptideShaker-2.2.0/PeptideShaker-2.2.0.jar eu.isas.peptideshaker.cmd.ReportCLI -peptideshaker_exports /tmp/ and the file was overwritten.

hbarsnes commented 2 years ago

Yup, seems to be that particular file. I will look into it and get back to you.

veitveit commented 2 years ago

Thanks!

hbarsnes commented 2 years ago

Did you by any chance make or modify this json file by hand? As there seems to be one incorrect line:

"PsIdentificationAlgorithmMatchesFeaturetotal_spectrum_intensity.",

should have been

"PsIdentificationAlgorithmMatchesFeature.total_spectrum_intensity.",

If corrected, the json file not overwritten when used.

hbarsnes commented 2 years ago

Never mind. I see now that the error is in our code as I get the same problem when creating my own export with this particular feature included. Should not be too hard to fix. But in the mean time, just manually add the missing "." and your export should work.

hbarsnes commented 2 years ago

I've now fixed the typo and released a new version. So if you update to PeptideShaker 2.2.8 the problem should now longer occur. (Note that you'll still need to either manually fix your existing json file or make a new one in the latest version.)

veitveit commented 2 years ago

Thanks a lot again for this superfast fix!