Description Usage Arguments Value Examples
Calculates percentages of of cell types of interest out of total cell population
1 | calcperevent(results)
|
results |
- The result of a call to the parseevents function |
Returns a matrix with values as percent of first column. Columns correspond to cell types. First column corresponds to the population as a total reference, eg. all live cells run. Rows correspond to fcs files.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #Example starting with obtaining data from Cytobank
library(CytobankAPI)
results1<-statistics.event_counts(UserSession, experiment_id, gate_version = 1,
experiment_version, compensation_id,fcs_files, populations = c("Live","NK cells"),
output = "default", timeout = UserSession@long_timeout)
popsofinterest<-c("CD4 T cells","NK cells")
cyto_session <- authenticate(site="premium", username="myusername", password="mypassword")
exptno<-2
popsinterest<-getpops(popsofinterest,exptno,cyto_session)
fcs<-getfcsfiles(exptno,cyto_session)
results<-parseevents(results1,popsinterest,fcs)
calcperevent(results)
#Example from simple dataset
data<-matrix(9:1,nrow=3,ncol=3,byrow=FALSE)
rownames(data)<-c("Control","Patient1","Patient2")
colnames(data)<-c("Live cells","Cell type 1","Cell type 2")
calcperevent(data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.