Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mobiusklein opened this issue Jan 19, 2024 · 1 comment
Open

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

mobiusklein opened this issue Jan 19, 2024 · 1 comment
Assignees
Labels

Comments

@mobiusklein
Copy link

mobiusklein commented Jan 19, 2024

  • Describe the issue or question:

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

File f = new File(lcmsPathStr);
ScanCollectionDefault scanCollectionDefault = new ScanCollectionDefault();
scanCollectionDefault.setDefaultStorageStrategy(StorageStrategy.STRONG);
scanCollectionDefault.isAutoloadSpectra(true);
AbstractLCMSDataSource<?> source = new MZMLFile(f.getAbsolutePath());
source.setNumThreadsForParsing(1);
source.setExcludeEmptyScans(false);
scanCollectionDefault.setDataSource(source);
scanCollectionDefault.loadData(LCMSDataSubset.WHOLE_RUN);
Map<Integer, IScan> originalScans = scanCollectionDefault.getMapNum2scan();
source.close();
MZBINFile mzbinFile = new MZBINFile(1, mzBINFile, true);
Map<Integer, MZBINSpectrum> calibratedScans = new TreeMap<>();
for (MZBINSpectrum t : mzbinFile.specs) {
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
Copy link
Member

fcyu commented Jan 19, 2024

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

@fcyu fcyu self-assigned this Jan 19, 2024
@fcyu fcyu changed the title Writing out sub-mzML files fail on non-mzML files on FragPipe v21 Writing out sub-mzML files fail on timsTOF data Jan 19, 2024
@fcyu fcyu added the FragPipe label Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants