RGLab / flowWorkspace

flowWorkspace
GNU Affero General Public License v3.0
44 stars 21 forks source link

from the 'flowCore::workFlow' to the 'flowWorkspace::GatingSet' #326

Closed abbatidanilo closed 4 years ago

abbatidanilo commented 4 years ago

Dear Mike, This is not an issue and I beg your pardon for this. I am deploying a shiny web-app for high dimensional flowSet analysis which contains several workflows to pre-process, assays and analyze the entered fcs samples. Since the beginning I would like to implement the flowSet alignment with flowStats. My code is currently:

wf <- flowCore::workFlow(flow_Set) 

tl <- transformList(from = sel_col, tfun = asinh, transformationId="asinh")

flowWorkspace::add(wf, tl)

norm <- normalization(normFun=function(x, parameters, ...)
    warpSet(x, parameters, ...),
    parameters=marker_names,
    normalizationId="Warping")

add(wf, norm, parent="asinh")  

The procedure worked just fine but before to move to the R4.0 version I would like to fix this since the flowCore::workFlow is deprecated and I should use 'flowWorkspace::GatingSet' instead from now on. I already try following the documentation but in vain (probably I miss something). Could you help me? Many thanks

mikejiang commented 4 years ago

Based on your script, you can try something like this

gs <- GatingSet(flow_set)
trans <- transformerList(sel_col, asinhtGml2_trans())
gs <- transform(gs, trans)
cs <- gs_cyto_data(gs)
warpSet(cs, target = your_reference_sample , stains = marker_names)
abbatidanilo commented 4 years ago

Thank you very much Mike