calTissueDist: calculate Startrac.dist (tissue distribution preference)

View source: R/functions.R

calTissueDistR Documentation

calculate Startrac.dist (tissue distribution preference)

Description

calculate Startrac.dist (tissue distribution preference)

Usage

calTissueDist(
  dat.tb,
  byPatient = F,
  colname.cluster = "majorCluster",
  colname.patient = "patient",
  colname.tissue = "loc",
  method = "chisq",
  min.rowSum = 0
)

Arguments

dat.tb

data.frame. Each line for a cell, and these columns as required: 'majorCluster', 'loc'

byPatient

logical. whether calculate the index for each patient. (default: FALSE)

colname.cluster

character. which column specify the cluster (default: "majorCluster")

colname.patient

character. which column specify the patient (default: "patient")

colname.tissue

character. which column specify the tissue (default: "loc")

method

character. method to use, one of "chisq", "fisher", and "freq" (default: "chisq")

min.rowSum

integer. rows with rowSum <= this value will be filtered out (default: 0)

Details

calculate Startrac.dist (tissue distribution preference).

Value

an array full of R_o/e (method="chisq") or list with components of OR, p.value etc. from fisher.test (method="fisher")


Japrin/STARTRAC documentation built on Dec. 4, 2023, 1:35 a.m.