vanmooylipidomics / LOBSTAHS

Git repository for the R package "LOBSTAHS" (Lipid and Oxylipin Biomarker Screening Through Adduct Hierarchy Sequences)
Other
8 stars 12 forks source link

LOBSTAHS migration w/pending change of object classes in XCMS3 #31

Closed jamesrco closed 3 years ago

jamesrco commented 7 years ago

Relayed from a LOBSTAHS user.

First, thanks for LOBSTAHS! I’ve been playing around with it for a few months and like how it works.

However, I ran into an issue with the new XCMSnExp object structure. CAMERA can't handle XCMSSnExp objects. When I convert to an xcmsSet object using as(, "xcmsSet") CAMERA works, but doLOBscreen() then throws the error:

if (sum(xsA@groupInfo[colnames(xsA@groupInfo) == "rt"] > 100) ==  : missing value where TRUE/FALSE needed

I traced this back to the presence of NAs in the intensity values of xcmsSet objects after conversion from an XCMSnExp object, which can be fixed with:

xsAP@groupInfo[is.na(xsAP@groupInfo)] <- 0

prior to doLOBscreen().

The NAs are introduced by xcms/CAMERA, which is not strictly a LOBSTAHS problem, but I thought you should know because xcmsSet objects will be phased out in the future.

jamesrco commented 7 years ago

So, this seems like a priority for us… I would say highest priority so we can keep our customers happy.

jamesrco commented 7 years ago

From @lee-t:

This is an issue with XCMS 3, which is now the current version on bioconductor.

I'll need to replicate the issue first. The guy also included a simple enough solution I could write into doLOBscreen.R

Alternatively - I'm in the process of re-writing the whole prepOrbi.R part for XCMS3. I might be able to edit the XCMSnExp structure such that it can be read into CAMERA without losing intensity values. This will take longer than the above solution, I'm still trying to figure out the best way to integrate new objects and structures.

lee-t commented 6 years ago

Part of th issue is that function which converts the new format into the new one doesn't seem to preserve sample names. As such, old functions which relies on knowing how many samples you have, do not function by default (https://github.com/sneumann/xcms/issues/228). You need to then copy them over manually from the new format to the old format.

I guess that the @group inputs also seem to have the same formatting issues, need to be careful that these NAs are not relevant data

`

xset$class NULL xset$class <- newcentWave$sampleNames

xset$class [1] 0_uM_H2O2 0_uM_H2O2 0_uM_H2O2 0_uM_H2O2 0_uM_H2O2 150_uM_H2O2 150_uM_H2O2 150_uM_H2O2 150_uM_H2O2 150_uM_H2O2 30_uM_H2O2 [12] 30_uM_H2O2 30_uM_H2O2 30_uM_H2O2 30_uM_H2O2 30_uM_H2O2 Levels: 0_uM_H2O2 150_uM_H2O2 30_uM_H2O2

`

hholm commented 3 years ago

Fixed original issue referenced by @jamesrco here and added issue #34 (also patched now) for what lee-t was referencing. Closing this now.