get2status: Filters matrix columns based on two conditions per file, e.g....

Description Usage Arguments Value Examples

View source: R/get2status.R

Description

Filters matrix columns based on two conditions per file, e.g. patient status, stimluation, time points, etc.

Usage

1
get2status(key1, key2, results)

Arguments

key1

- Search string of interest for names

key2

- Search string of interest for names

results

- Results matrix with fcs files corresponding to columns

Value

Returns a list of IDs with names matching search both serach strings with names being the description of these features

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#Example starting with obtaining data from Cytobank
library(CytobankAPI)
cyto_session <- authenticate(site="premium", username="myusername", password="mypassword")
markersofinterest<-c("CD3","CD56")
popsofinterest<-c("CD4 T cells","NK cells")
exptID=4
type=F
results<-analyzedata(cyto_session,markersofinterest,popsofinterest,exptID,type)
key1<-"Patient"
key2<-"Untreated"
get2status(key1,key2,results)

#Example with simple data matrix
data<-matrix(1:18,nrow=3,ncol=6,byrow=TRUE)
colnames(data)<-c("Ctrl1 unst","Pt1 unst","Pt3 unst","Ctrl1 stim","Pt1 stim","Pt3 stim")
rownames(data)<-c("Marker1","Marker2","Marker3")
#Getting all stimulated patient samples
get2status(c("Pt","Ctrl"),"stim", data)
#Getting all stimulated patient and control samples
get2status(c("Pt","Ctrl"),"stim", data)

CytobankAPIstats documentation built on May 2, 2019, 8:27 a.m.