Closed tsufz closed 1 year ago
@meowcat, I tried something in buildRecord.R#396ff
variables$mode_hash <- substr(toupper(adduct$hash), 1, .adductHashSize)
# a "MS condition hash" merging instrument type, ionization, collision and CE
# AC$INSTRUMENT_TYPE: LC-ESI-ITFT
# AC$MASS_SPECTROMETRY: MS_TYPE MS2
# AC$MASS_SPECTROMETRY: ION_MODE POSITIVE
# AC$MASS_SPECTROMETRY: IONIZATION ESI
# AC$MASS_SPECTROMETRY: FRAGMENTATION_MODE HCD
# AC$MASS_SPECTROMETRY: COLLISION_ENERGY 15 % (nominal)
# AC$MASS_SPECTROMETRY: RESOLUTION 15000
variables$polarity <- function(digits=1) substr(variables$metadata$ION_MODE, 1, digits)
variables$condition <- glue_data(
variables$metadata,
"{INSTRUMENT_TYPE}${MS_TYPE}${ION_MODE}${IONIZATION}${FRAGMENTATION_MODE}${COLLISION_ENERGY}${mode_hash}")
But I get
INFO [2023-07-25 19:05:14] mbWorkflow: Step 3. Data reformatting
INFO [2023-07-25 19:05:14] mbWorkflow: Step 4. Spectra compilation
INFO [2023-07-25 19:05:14] Compiling: Bisoprolol
Error in eval(parse(text = text, keep.source = FALSE), envir) :
object 'FRAGMENTATION_MODE' not found
Any clue, why FM is not found?
I wouldn't know since this is not something that changed? But my suggestion to fix the collision issue (thanks for noticing!) would be:
variables$metadata <- c(
spectrum@info$`AC$MASS_SPECTROMETRY`,
spectrum@info$`CH$LINK`
spectrum@info$`MS$FOCUSED_ION`
)
// [...]
variables$condition <- glue_data(
variables$metadata,
"{INSTRUMENT_TYPE}${MS_TYPE}${ION_MODE}${IONIZATION}${FRAGMENTATION_MODE}${COLLISION_ENERGY}${PRECURSOR_TYPE}")
Merge #344 into your branch while working on this; variables$metadata
now has much more data to access.
Hm but adding mode_hash
should also have been a viable option. Why it doesn't work, i can't tell from here...
@meowcat enhanced documentation, now works.
Hi, I tried the accession generation using the accessionBuilder. Unfortuntely, the
condition_hash
creates collisions. As it does not include the ion, there is a collision if the precursor type is not included in the accessionBuilder. As we want to avoid semantics in the accession, I suggest upgrading the hash with additional information such as theprecursor_type
.Yours, Tobias