skschum / MFAssignR

The MFAssignR package was designed for multi-element molecular formula (MF) assignment of ultrahigh resolution mass spectrometry measurements. A number of tools for internal mass recalibration, MF assignment, signal-to-noise evaluation, and unambiguous formula selections are provided.
GNU General Public License v2.0
22 stars 26 forks source link

Setting Limits for Carbon and Hydrogen in # Elemental Composition Constraints #35

Open arsilan324 opened 1 week ago

arsilan324 commented 1 week ago

Thank you for developing and sharing the MFAssignR package—it's been incredibly useful for my work in formula assignment.

I have a question regarding the # Elemental Composition Constraints in MFAssign. I noticed that while I can set limits for elements like nitrogen and sulfur using Nx, Sx, etc., there doesn't appear to be a way to set similar limits for carbon and hydrogen (e.g., Cx and Hx). I tried adding Cx and Hx as arguments, but this resulted in an error.

Is there currently a way to specify the maximum allowable numbers of carbon and hydrogen atoms for formula assignments? If not, I want to ask what are default conditions set?

Thank you for your attention on this matter! Best

skschum commented 1 week ago

Hello Muhammad,

There is no explicit way to limit the carbon and hydrogen limits because of the way the internal algorithm assigns C,H,O, which is in chunks as opposed to trying every combination like it has to do for the other atom types. Thus the C and H are limited to what is mathematically and chemically feasible automatically without outside input. You can set the H/C and O/C limits, which would have an indirect impact. Is there a particular reason you want to limit the number of C and H? There may be some other work arounds if it is a specific problem.

Let me know if you have any other questions, or need clarification on my answer.

Thanks, Simeon

On Thu, Nov 14, 2024 at 8:17 PM arsilan324 @.***> wrote:

Thank you for developing and sharing the MFAssignR package—it's been incredibly useful for my work in formula assignment.

I have a question regarding the # Elemental Composition Constraints in MFAssign. I noticed that while I can set limits for elements like nitrogen and sulfur using Nx, Sx, etc., there doesn't appear to be a way to set similar limits for carbon and hydrogen (e.g., Cx and Hx). I tried adding Cx and Hx as arguments, but this resulted in an error.

Is there currently a way to specify the maximum allowable numbers of carbon and hydrogen atoms for formula assignments? If not, I want to ask what are default conditions set?

Thank you for your attention on this matter! Best

— Reply to this email directly, view it on GitHub https://github.com/skschum/MFAssignR/issues/35, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF72HFF2FZJ6HQ27S4JR5RD2AVRWBAVCNFSM6AAAAABR2IZ6BCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY3DANRQHAYDIOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

arsilan324 commented 1 week ago

Thanks Simeon for the detailed reply. It's quite helpful. I will get in touch if I have any other issues. For now, all is good. Best