percentevent {CytobankAPIstats}R Documentation

Calculates the percentage of cell populations given an experiment

Description

Calculates the percentage of cell populations given an experiment

Usage

percentevent(cyto_session, markersofinterest, popsofinterest, exptID, grouping,
  specimennames, means)

Arguments

cyto_session

- API authentication token for session

markersofinterest

- List of names of channel parameters in Cytobank

popsofinterest

- List of populations of interest to calculate percentages with reference population for percentages listed first

exptID

- Integer representing an experiment ID on Cytobank account

grouping

- A list of indices corresponding to samples from the same donor ex list(c(1,2),c(3,4,5)) if rows 1 and 2 are from pt1,3,4,5 are from pt2, etc.

specimennames

- List of specimen names as strings; needs to be same length as number of groupings

means

- A boolean if mean =TRUE, a mean for all groups in the variable group is calculated, otherwise individual means are returned.

Value

- Returns either the percentage or mean percentage per specimen of each cell type, as specified by mean parameter

Examples


library(CytobankAPI)
cyto_session <- authenticate(site="premium", username="myusername", password="mypassword")
markersofinterest<-c("CD3","CD56")
popsofinterest<-c("CD4 T cells","NK cells")
exptID=4
grouping<-list(c(1,2),c(3,4,5),c(6,7))
specimennames<-c("Patient1","Patient2","Control1")
means=T
percentevent(cyto_session,markersofinterest,popsofinterest,exptID,grouping,specimennames,means)


[Package CytobankAPIstats version 2.0 Index]