countMarkers: Generate a XLSX file of counts for all markers in a given...

Description Usage Arguments Details

View source: R/halo.R

Description

Given a marker file and a directory of *.rda files each containing Halo data for a single sample, generate a XLSX file with multiple sheets of counts, median counts for each marker in each sample, and fractions of counts using alternate "bases" (e.g., DAPI)

Usage

1
2
3
4
countMarkers(markerFile, dataDir, lf = NULL, v = TRUE, pad = 0,
  countsXLSXFile = NULL, countsRDAFile = NULL, writeXLSXfile = TRUE,
  saveRDSfile = TRUE, runCounts = TRUE, runFracTotal = FALSE,
  runMedians = TRUE, altBases = NULL, debug = FALSE)

Arguments

markerFile

File containing list of marker names

v

verbose - when set to TRUE, messages will be printed to screen as well as to file; DEFAULT = TRUE

pad

amount that will be trimmed from FOV

countsXLSXFile

name of XLSX file to write to; if NULL, name will be automatically generated according to input file names and padding

countsRDAFile

name of RDA file to write to; if NULL, RDA file will NOT be written

writeXLSXfile

write counts to XLSX file; DEFAULT=TRUE

saveRDSfile

save counts table to RDS file; DEFAULT=TRUE

runCounts

include counts sheet in output; DEFAULT=TRUE

runFracTotal

include fractions of total counts sheet in output; DEFAULT=FALSE

runMedians

include medians of counts for each marker in each sample; DEFAULT=TRUE

altBases

vector of additional markers for which fractions of counts should be calculated; one sheet will be generated for each element

debug

print debug messages; DEFAULT=FALSE

dataFiles

vector of data file(s)

logFile

file to write log messages to; DEFAULT=NULL

Details

By default, the file will contain at minimum a sheet of counts and a sheet containing fractions of total counts. In all sheets, a column represents a marker and a row represents a single FOV from a single sample.

If a vector of markers is provided (e.g., c("DAPI","CD3")), another sheet will be created for each of them containing the fraction of cells using those markers as "bases". IMPORTANT NOTE: Any altBases in addition to DAPI must be counted ONLY IF DAPI IS POSITIVE AS WELL (e.g., CD3+DAPI+). The names in the output .xlsx file, however will exclude the DAPI+ to avoid redundancy.


bic-mskcc/halo documentation built on Jan. 27, 2018, 12:19 a.m.