mafreitas / tdf2mzml

Other
25 stars 14 forks source link

conversion breaks when ms1_type is profile: index out of bounds #15

Closed jtprince closed 2 years ago

jtprince commented 2 years ago

The file had no problems being run with ms1_type set to centroid or raw.

Here's the output message:

INFO:root:writting to mzML file: /data/PS211008_S100_1to27_inj01_2-A__3_1_67.mzml
INFO:root:sha1_checksum function took 0.007 s
INFO:root:sha1_checksum function took 0.041 s
INFO:root:Processing 16291 Spectra.
INFO:root:Reading, Merging and Formating Frames for mzML
Traceback (most recent call last):
  File "/tdf2mzml/tdf2mzml.py", line 971, in <module>
    main()
  File "/tdf2mzml/tdf2mzml.py", line 966, in main
    write_mzml(args)
  File "/tdf2mzml/tdf2mzml.py", line 60, in wrap
    ret = f(*args)
  File "/tdf2mzml/tdf2mzml.py", line 844, in write_mzml
    write_precursor_frame(mzml_data_struct)
  File "/tdf2mzml/tdf2mzml.py", line 607, in write_precursor_frame
    base_peak_mz = ms1_mz_array[bp_index]
IndexError: index 115392 is out of bounds for axis 0 with size 1001

I work at a private company, so not sure I can share the file publicly. If I can't debug it myself and create a PR, then perhaps I can get permission to share it privately for debugging purposes?

mafreitas commented 2 years ago

We just pushed a new release to main. You may try that. If not then I would need a file for testing.

jtprince commented 2 years ago

I tried it with main and it worked! :+1: I was using the docker image before, so that means that all that needs to be done to close this issue is update the docker image, I think.

mafreitas commented 2 years ago

Pushed to mfreitas/tdf2mzml:latest for testing. If any issues occur during testing I will reopen the issue.