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

Synchro/slice data import #269

Open
videlc opened this issue Apr 5, 2023 · 7 comments
Open

Synchro/slice data import #269

videlc opened this issue Apr 5, 2023 · 7 comments

Comments

@videlc
Copy link

videlc commented Apr 5, 2023

Hi,

Thanks a lot for developing alphatims.
I am currently facing an issue when importing a segmented (metabolomics) synchro/slicePASEF analysis, yielding in the following error:

File /usr/miniconda3/envs/py3.8/lib/python3.8/site-packages/alphatims/bruker.py:2306, in TimsTOF.set_cycle(self)
   2304     low_mz = row.IsolationMz - row.IsolationWidth / 2
   2305     high_mz = row.IsolationMz + row.IsolationWidth / 2
-> 2306     cycle[
   2307         frame,
   2308         scan_begin: scan_end,
   2309     ] = (low_mz, high_mz)
   2310     precursor_frames[frame] = False
   2312 cycle[precursor_frames] = (-1, -1)

IndexError: index 166 is out of bounds for axis 0 with size 4

Let me know if any need further information is needed or a minimal data example via email.
Best regards,
Vivian

@sander-willems-bruker
Copy link
Collaborator

Dear Vivian, would it be possible for you to share the data? Otherwise it is very difficult to track down what goes wrong in this particular case.

@videlc
Copy link
Author

videlc commented Jul 18, 2023

Dear Sander,
Test file and example jupyter notebook have been sent to you via email minutes ago.
Thanks,
Vivian

@sander-willems-bruker
Copy link
Collaborator

sander-willems-bruker commented Jul 18, 2023

Dear Vivian, thanks for sharing the test file via a private message. It turns out this is particular sample actually defines two acquisition modes, i.e. 0 (which I am not sure what it is) and 9 (diaPASEF, no particular mode is defined for synchro/slice at the moment). In effect, the first 166 frames are defined as MS1 frames and only as of frame 167 does a cyclic DIA acquistion start. This confuses alphatims, as it assumes a single cample only can have one acquistion mode. I would be curious to know how you set up this acquisition.

@videlc
Copy link
Author

videlc commented Jul 18, 2023

Default metabolomics (with VIPHESI) methods incoporate MS1 scans at the beginning of the run which is timed with the tims 6 way valve. Valve switches at the beginning of the run to ensure that a "plug" of calibrant is being pushed into the ion source with ensures mz + IM recalibration for every run (see capture with salt cluster example).
You can load default metabolomics pos in timscontrol to get an example method (4D_metabolomics_pos).
Please note that early-run recalibration is standard in metabolomics in many labs, so I might not be the only one interested into a fix of this issue.

image

@videlc
Copy link
Author

videlc commented Jul 18, 2023

Also third segment of the method contains a "synchro/slice-ish" dia acquisition scheme (see capture).

image

@sander-willems-bruker
Copy link
Collaborator

This is not a trivial fix I am afraid, best I might be able to do at short notice is a bandaid and even that is not straightforward. Do you use AlphaTims as a gui, cli or python package?

@videlc
Copy link
Author

videlc commented Jul 25, 2023

Hi,
Python+Jupyter only.
Note that I was not aware of the issue while making the methods. Since this, I've unfortunately deleted the recalibration segment so I'm able to work with alphatims. Of course, being able to perform a pre-run calilbration is a highly valuable feature that other users (metabolomics and proteomics) are going to request later IMO.
Best regards,
Vivian

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