You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error in `[[<-`(`*tmp*`, i, value = new("logicalFilterResult", subSet = c(TRUE, :
[[<- defined for objects of type "S4" only for subclasses of environment
If I use "filter", without specifying that it is from flowcore:
fset1[[i]]=filter(fset[[i]], rg)
I get:
Error in UseMethod("filter") :
no applicable method for 'filter' applied to an object of class "flowFrame"
@fbenedett, I think you are looking for Subset() - which returns a flowSet of events inside the gate:
# construct a rectangleGate - co-ordinates supplied on transformed scale
rg <- rectangleGate(
filterId = "DNA_gate+", # label the gate
"140Ce" = c(0, 10),
"DNA1" = c(7, 15)
)
# fs is your flowSet - fs_sub is a flowSet of events inside the gate
fs_sub <- Subset(
fs,
rg
)
If you want to have separate gates for every sample, you can include them in a list() named with sampleNames():
# rectangleGate list - example for flowSet with 2 samples (i.e. 2 gates)
rg_list <- structure(
list(
rg, # any gate objects can be added here - one per sample
rg
),
names = sampleNames(fs)
)
# Subset samples individually
fs_sub <- Subset(
fs,
rg_list
)
I'd recommend using ggcyto to visualise the results:
Hello,
I am trying to apply some filter on my data and plot them before and after the filter is applied.
I have a specific type of flow set for which I have renamed some channels:
fset=read.ncdfFlowSet(paste0(adir, l_files), channel_alias = map, emptyValue = FALSE)
I have transformed it:
And now I want to apply a rectangular gate:
But I get this error:
If I use "filter", without specifying that it is from flowcore:
fset1[[i]]=filter(fset[[i]], rg)
I get:
Any Idea why what I am doing is wrong?
Here is my sessioninfo:
The text was updated successfully, but these errors were encountered: