filterfiles {CytobankAPIstats}R Documentation

Filters a list of fcs files by search terms

Description

Filters a list of fcs files by search terms

Usage

filterfiles(files, string)

Arguments

files

- List of fcs file IDs with FCS file name as names for list

string

- List of one or more strings of interest as a list to filter samples

Value

Returns a list of file IDs matching with names matching string(s)

Examples


#Example starting with obtaining data from Cytobank
library(CytobankAPI)
exptno<-4
cyto_session <- authenticate(site="premium", username="myusername", password="mypassword")
files<-getfcsfiles(exptno,cyto_session)
string<-c("patient","IL-1b")
filterfiles(file,string)

#Simple example when list of file names is already available
files<-1:4
names(files)<-c("Pt1 unst.fcs","Pt2 stim.fcs","Ctrl1 unst.fcs","Ctrl2 stim.fcs")
#Filtering file list to contain only unstimulated files
filterfiles(files,"unstimulated")
#Filtering file list to contain only patient files
filterfiles(files,"Pt")
#Filtering file list to contain both unstimulated and patient files
filterfiles(files,c("Pt","unst"))

[Package CytobankAPIstats version 2.0 Index]