calcperevent: Calculates percentages of of cell types of interest out of...

Description Usage Arguments Value Examples

Description

Calculates percentages of of cell types of interest out of total cell population

Usage

1
calcperevent(results)

Arguments

results

- The result of a call to the parseevents function

Value

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.

Examples

 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)

athrom/CytobankAPIstats documentation built on May 14, 2019, 5:24 p.m.