-
-
Save soh-i/f03b5277d05f12d1342158a50df7621a to your computer and use it in GitHub Desktop.
Get single cell expression from GatingSet object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
sample.names <- sampleNames(gs.trans) | |
gs.exp.df <- data.table() | |
for (sample in sample.names) { | |
message(sprintf("Processing: %s", sample)) | |
df <- gs_get_singlecell_expression(gs.trans, c("P1"), | |
threshold = FALSE, marginal = FALSE, inverse.transform = TRUE, | |
other.markers = c("SSC-A", "FL1-A", "FL5-A") | |
)[[sample]] %>% | |
data.table() %>% | |
mutate(sample = sample) | |
gs.exp.df <- rbindlist(list(gs.exp.df, df)) | |
} | |
sample.meta <- cyto_details(gs.trans) | |
exp.df <- merge(gs.exp.df, sample.meta, by.x = "sample", by.y = "name") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment