# NOT RUN {
#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)
# }
# NOT RUN {
#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)
# }
Run the code above in your browser using DataLab