RGLab / flowIncubator

Routines that don't belong to the core flow packages yet.
1 stars 3 forks source link

overload "GatingSet" methods for 'GatingSetList' #6

Closed mikejiang closed 11 years ago

mikejiang commented 11 years ago

close #3

mikejiang commented 11 years ago

so far we have the methods re-written for 'GatingSetList' ,and passed the preliminary tests

getSamples
lapply
[[
[
getData
getGate
pData
plotGate

To keep the new sample order after '[' subsetting, new slot (a sample vector) needs to be added to class GatingSetList. We can't simply 'rbind2' the 'pData' of each individual 'GatingSet' on the fly because the samples can be randomly selected from GatingSets. This sample vector has to be consistent with the ones in pData,yet maintain its own order.

mikejiang commented 11 years ago

Apparently, we need a convenient wrapper for archiving a GatingSetList.
Looks like we want to create generic functions for 'archive' and 'unarchive' (deprecate the old ones)and dispatch s4 methods based on the signature ( 'GatingSet' or 'GatingSetList')

archive(gs,path)
gs <- unarchive(path)

archive(gslist,path)
gslist <- unarchive(path)
mikejiang commented 11 years ago

Well, unarchive methods won't work since the signature are the same (i.e. "character"). Maybe keep the way it is and have a separate pair of APIs for 'GatingSetList'

save_gs(gs, path)
gs <- load_gs(path)

save_gslist(gslist, path)
gslist <- load_gslist(path)
mikejiang commented 11 years ago

QUALIFIER expects a list instead of a data.frame from getQAStats call on 'GatingSetList'