Filter samples based on experiment variables

cyto_filter(x, ...)

Arguments

x

object of class flowSet or GatingSet.

...

tidyverse-style subsetting using comma separated logical predicates based on experimental variables stored in cyto_details(x). See examples below for demonstration.

Value

flowSet or GatingSet restricted to samples which meet the filtering criteria.

Author

Dillon Hammill, Dillon.Hammill@anu.edu.au

Examples

# Load in CytoExploreRData to access data library(CytoExploreRData) # Look at experiment details cyto_details(Activation)
#> name OVAConc Treatment #> Activation_1.fcs Activation_1.fcs 0 Stim-A #> Activation_2.fcs Activation_2.fcs 0 Stim-A #> Activation_3.fcs Activation_3.fcs 5 Stim-A #> Activation_4.fcs Activation_4.fcs 5 Stim-A #> Activation_5.fcs Activation_5.fcs 50 Stim-A #> Activation_6.fcs Activation_6.fcs 50 Stim-A #> Activation_7.fcs Activation_7.fcs 500 Stim-A #> Activation_8.fcs Activation_8.fcs 500 Stim-A #> Activation_9.fcs Activation_9.fcs 0 Stim-B #> Activation_10.fcs Activation_10.fcs 0 Stim-B #> Activation_11.fcs Activation_11.fcs 5 Stim-B #> Activation_12.fcs Activation_12.fcs 5 Stim-B #> Activation_13.fcs Activation_13.fcs 50 Stim-B #> Activation_14.fcs Activation_14.fcs 50 Stim-B #> Activation_15.fcs Activation_15.fcs 500 Stim-B #> Activation_16.fcs Activation_16.fcs 500 Stim-B #> Activation_17.fcs Activation_17.fcs 0 Stim-C #> Activation_18.fcs Activation_18.fcs 0 Stim-C #> Activation_19.fcs Activation_19.fcs 5 Stim-C #> Activation_20.fcs Activation_20.fcs 5 Stim-C #> Activation_21.fcs Activation_21.fcs 50 Stim-C #> Activation_22.fcs Activation_22.fcs 50 Stim-C #> Activation_23.fcs Activation_23.fcs 500 Stim-C #> Activation_24.fcs Activation_24.fcs 500 Stim-C #> Activation_25.fcs Activation_25.fcs 0 Stim-D #> Activation_26.fcs Activation_26.fcs 0 Stim-D #> Activation_27.fcs Activation_27.fcs 5 Stim-D #> Activation_28.fcs Activation_28.fcs 5 Stim-D #> Activation_29.fcs Activation_29.fcs 50 Stim-D #> Activation_30.fcs Activation_30.fcs 50 Stim-D #> Activation_31.fcs Activation_31.fcs 500 Stim-D #> Activation_32.fcs Activation_32.fcs 500 Stim-D #> Activation_33.fcs Activation_33.fcs 0 NA
# Select Stim-C samples with 0 and 500 nM OVA concentrations fs <- cyto_filter( Activation, Treatment == "Stim-C", OVAConc %in% c(0, 500) ) # Select Stim-A and Stim-C treatment groups fs <- cyto_filter( Activation, Treatment %in% c("Stim-A", "Stim-C") )