wkumler / squallms

Repository for the Bioconductor squallms R package
Other
3 stars 0 forks source link

About the Demo code: "makeXcmsObjFlat" can't work #9

Open v-v1150n opened 7 months ago

v-v1150n commented 7 months ago

I just used the demo code to try to see if this peak evaluation function can be implemented in my environment, but I encountered a warning that makeXcmsObjFlatcannot be found, and I have no way to proceed further. In addition, I am curious whether the method you provided is also applicable to the netCDF file of GC-MS I am using?

wkumler commented 7 months ago

Thanks for giving the package a try! Strange that the makeXcmsObjFlat function can't be found - did you have any errors or warnings thrown by the install_github or library(squallms) steps? Can the other functions in the package (e.g. extractChromMetrics) be found?

Unfortunately the package only handles the mzML and mzXML files at the moment, so it may be a moot point if you'd prefer to avoid the conversion from netCDF to mzML.

wkumler commented 7 months ago

Update: I just realized that by "demo code" you meant the section in the README where I illustrate the package's functionality. I'd completely forgotten to update that after the latest updates and you're entirely correct that it throws an error. It should be fixed now! Thanks for catching that.

v-v1150n commented 7 months ago

Thanks for solving that problem. It can be used normally now. But for the operation and interpretation of step2. labeling, is there a better example that can provide users with a quick understanding of how to use the lasso tool to select the range? I am currently selecting colors based on the wave front density classification on the right side of the labeling interface. The denser ones are marked as good, and the sparser ones are marked as bad. But I am not sure whether this operation is correct. In addition, for Number I am also curious about how to choose the settings of k-means groups (max=10) and Number of PCs to use for k-means (max=10). Thanks!

wkumler commented 7 months ago

Great! Glad to hear you've gotten past that first step. Unfortunately Github/Bioconductor makes it difficult to render vignettes for easy sharing until they're actually part of the repository, but were you able to take a look at the vignette that's included with the package? I normally view it by downloading the raw file from Github and then running it in RStudio one chunk at a time. That'll let you see some of the interactive options that are difficult to render in a static vignette and you may get more info out of that than just from the demo code in the README.

The idea behind the lasso tool is that you're able to browse through your XCMS peaks just by mousing over them and see which ones of them are "good" and "bad" - that alone is what it sounded like you were interested in from your post on the XCMS thread. Hopefully some of those are looking like good chromatographic peaks with high centers and low tails, and ideally there's a cluster of good ones all close to each other. I typically find that the densest clusters of peaks are actually the low-quality ones.

The k-means and PCs to use are totally arbitrary, but provide a way to use the separation in multivariate space that can't be seen in the 2D ggplot. I usually start with the defaults of 4 k-means and 2-3 PCs. I'll bump up the number of PCs to use if the barplot in the sidebar shows a lot of variation that's not captured by the first few PCs, then fiddle with the k-means groups until one of the colors on the right looks like a really nice clean chromatographic feature. Double-clicking on the cluster number in the legend then isolates that color alone for lassoing. If you're willing to share a screenshot of the lasso tool for your data, I might be able to provide some recommendations for those settings!