gtluu / timsconvert

https://gtluu.github.io/timsconvert/
Apache License 2.0
28 stars 16 forks source link

Fix update_spectra_count #37

Closed wolfgangcolsman closed 1 year ago

wolfgangcolsman commented 1 year ago

In tdf2mzml.py, update_spectra_count was invoked inside with mzml_data_struct['writer']:. It needs to be invoked after MzMLWriter is flushed/closed.

I optimized the code to only invoke update_spectra_count when spectra_count has changed.

mwang87 commented 1 year ago

I think this looks good, sorry for the delay, will test it out!