compomics / peptide-shaker

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

ClassCastException Error #477

Open umutcakir opened 2 years ago

umutcakir commented 2 years ago

Hi, I am running PeptideShaker with the following command:

java -Xmx96G -cp PeptideShaker-2.0.33/PeptideShaker-2.0.33.jar eu.isas.peptideshaker.cmd.PeptideShakerCLI\ -reference "Reference_name"\ -identification_files "files.zip"\ -zip "PeptideShaker.zip" -out "PeptideShaker.psdb"\

java -Xmx96G -cp PeptideShaker-2.0.33/PeptideShaker-2.0.33.jar eu.isas.peptideshaker.cmd.ReportCLI\ -in "PeptideShaker_output_file.zip"\ -out_reports "Output_directory_for_reports/" -reports "0,9"

There is no problem with the first command; the zip file is successfully created. However, when I generate reports, I receive the following errors:

slurm output file:

PeptideShaker processing failed. See the PeptideShaker log for details.

PeptideShaker version 2.0.33. Memory given to the Java virtual machine: 103079215104. Total amount of memory in the Java virtual machine: 2147483648. Free memory: 2122651128. Java version: 10.0.2. java.lang.ClassCastException: com.compomics.util.experiment.identification.matches.ProteinMatch cannot be cast to eu.isas.peptideshaker.scoring.PSMaps at eu.isas.peptideshaker.utils.PsdbParent.loadPsdbFile(PsdbParent.java:318) at eu.isas.peptideshaker.utils.PsdbParent.loadPsdbFromZipFile(PsdbParent.java:179) at eu.isas.peptideshaker.cmd.ReportCLI.call(ReportCLI.java:106) at eu.isas.peptideshaker.cmd.ReportCLI.main(ReportCLI.java:383)

I increase the number of CPUs up to 56, but I receive the same error. Do you have any suggestions on how to solve this problem? Thank you.

hbarsnes commented 2 years ago

If the first command line works fine, I would suggest merging the two into one command line:

java -Xmx96G -cp PeptideShaker-2.0.33/PeptideShaker-2.0.33.jar eu.isas.peptideshaker.cmd.PeptideShakerCLI -reference "Reference_name" -identification_files "files.zip" -zip "PeptideShaker.zip" -out "PeptideShaker.psdb"\ -out_reports "Output_directory_for_reports/" -reports "0,9"

This will also be faster as it means that you do not have to reopen the PeptideShaker project just to do the export.

Please let me know if this solves the problem.

umutcakir commented 2 years ago

I tried your suggestion on our small test data, and it works. Besides, exporting reports from the already generated Peptide-Shaker project file still has the problem. Do you have any idea why I am encountering “ClassCastException” error? Is it related to the fasta database or mgf file, etc.? I will try your suggestion on our large data; probably it will also work; thus, we can close the issue. Thank you very much for your help.

hbarsnes commented 2 years ago

Do you have any idea why I am encountering “ClassCastException” error? Is it related to the fasta database or mgf file, etc.?

I'm afraid this is a known issue with our backend code that we have not yet been able to solve. In other words, it is not due to your input files (besides happening more often on larger datasets that use a lot of memory). The only known fix at the moment is to run the processing with only a single thread/core. However, this is significantly slower and should only be done if nothing else works. You can set the number of threads via the -threads option.