Nesvilab / FragPipe

A cross-platform Graphical User Interface (GUI) for running MSFragger and Philosopher - powered pipeline for comprehensive analysis of shotgun proteomics data
http://fragpipe.nesvilab.org
Other
181 stars 37 forks source link

Writing out sub-mzML files fail on timsTOF data #1417

Open mobiusklein opened 7 months ago

mobiusklein commented 7 months ago

Enabling writing sub-mzML fails with FragPipe v21 when the source MS data file is not an mzML file, but does work on v20.

The relevant snippet from the log file is:

C:\Users\massspecuser\Downloads\FragPipe-jre-21.2-build04\fragpipe\lib\fragpipe-21.2-build04.jar;C:\Users\massspecuser\Downloads\FragPipe-jre-21.2-build04\fragpipe\lib\maven-artifact-3.9.6.jar;C:\Users\massspecuser\Downloads\FragPipe-jre-21.2-build04\fragpipe\lib\fragpipe-21.2-build04.jar com.dmtavt.fragpipe.util.WriteSubMzml D:\Data_files_received_from_Bruker_demo\October2023_BrukerDemo_DDA\20231004_Ramos_5e7_100min_Slot1-21_1_1792.d D:\FragPipeProjects\2024.01.16_HD_Test-Searches\Oct_Bruker_firstpass_exp_folders\Ramos\psm.tsv D:\FragPipeProjects\2024.01.16_HD_Test-Searches\Oct_Bruker_firstpass_exp_folders\20231004_Ramos_5e7_100min_Slot1-21_1_1792_sub.mzML 0.0 1
Please wait. WriteSubMzml is running. It can take a long time.
Found D:\Data_files_received_from_Bruker_demo\October2023_BrukerDemo_DDA\20231004_Ramos_5e7_100min_Slot1-21_1_1792.mzBIN_all.
Found 3981 scans to exclude.
umich.ms.fileio.exceptions.FileParsingException: java.io.FileNotFoundException: D:\Data_files_received_from_Bruker_demo\October2023_BrukerDemo_DDA\20231004_Ramos_5e7_100min_Slot1-21_1_1792.d (Access is denied)
    at umich.ms.fileio.filetypes.mzml.MZMLIndexParser.parse(MZMLIndexParser.java:107)
    at umich.ms.fileio.filetypes.mzml.MZMLFile.parseIndex(MZMLFile.java:68)
    at umich.ms.fileio.filetypes.mzml.MZMLFile.fetchIndex(MZMLFile.java:57)
    at umich.ms.fileio.filetypes.mzml.MZMLFile.fetchIndex(MZMLFile.java:32)
    at umich.ms.fileio.filetypes.xmlbased.AbstractXMLBasedDataSource.parse(AbstractXMLBasedDataSource.java:116)
    at umich.ms.datatypes.scancollection.impl.ScanCollectionDefault.loadData(ScanCollectionDefault.java:807)
    at umich.ms.datatypes.scancollection.impl.ScanCollectionDefault.loadData(ScanCollectionDefault.java:791)
    at com.dmtavt.fragpipe.util.WriteSubMzml.removeScans(WriteSubMzml.java:104)
    at com.dmtavt.fragpipe.util.WriteSubMzml.writeSubMzml(WriteSubMzml.java:90)
    at com.dmtavt.fragpipe.util.WriteSubMzml.main(WriteSubMzml.java:57)
Caused by: java.io.FileNotFoundException: D:\Data_files_received_from_Bruker_demo\October2023_BrukerDemo_DDA\20231004_Ramos_5e7_100min_Slot1-21_1_1792.d (Access is denied)
    at java.base/java.io.RandomAccessFile.open0(Native Method)
    at java.base/java.io.RandomAccessFile.open(Unknown Source)
    at java.base/java.io.RandomAccessFile.<init>(Unknown Source)
    at java.base/java.io.RandomAccessFile.<init>(Unknown Source)
    at java.base/java.io.RandomAccessFile.<init>(Unknown Source)
    at umich.ms.util.file.AbstractFile.getRandomAccessFile(AbstractFile.java:56)
    at umich.ms.fileio.filetypes.mzml.MZMLIndexParser.parse(MZMLIndexParser.java:78)
    ... 9 more
Process 'WriteSubMzml' finished, exit code: 1
Process returned non-zero exit code, stopping
Processing interrupted, stopping WriteSubMzml

The root cause is at https://github.com/Nesvilab/FragPipe/blob/cb80ec8d99349db5201ab9efecf3633bf70171d6/MSFragger-GUI/src/com/dmtavt/fragpipe/util/WriteSubMzml.java#L96-L110 which tries to unconditionally open the source LCMS file as an mzML file to later read out spectrum metadata to augment the data in the mzBIN file. This code path in v20 ignores the original LCMS file and just writes out data from the mzBIN file.

fcyu commented 7 months ago

This code path in v20 ignores the original LCMS file and just writes out data from the mzBIN file.

Yes, that is on purpose.

I see that your input seems to be from timsTOF? We never tested that, but I think I can let FragPipe read the uncalibrated.mzML for this case. But then, there will be no MS1 for the quantification.

BTW, the write sub mzML checkbox is for a specific application, two-pass searching for the variant peptide analysis: https://fragpipe.nesvilab.org/docs/tutorial_two_pass_search.html. I am not sure if it is a good idea to use that option for other tasks.

Best,

Fengchao