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

SpectrumProcessor saving of spectra should maybe be one by one #646

Open
florian-huber opened this issue May 15, 2024 · 1 comment
Open

Comments

@florian-huber
Copy link
Collaborator

Currently the SpectrumProcessor will first process all spectra (self.process_spectrum) and only at the end write them to file (save_spectra(processed_spectrums, cleaned_spectra_file)).

For larger workflows this seems not ideal because it can crash at a very late stage (just happened to me...).
I think it would be better to write each spectrum to the file once processed, at least for formats where this is possible such as .msp and .mgf.

@hechth
Copy link
Collaborator

hechth commented May 20, 2024

I agree - this is also already possible with the streaming write we implemented for those formats - we should add the json implementation though at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants