Skip to contents

Calculate CNV using the moving average approach firstly described in Patel et al., 2014 Science (DOI: 10.1126/science)

Usage

calculate_CNV(
  genes_by_cells,
  reference = NULL,
  mc.cores = 1,
  wnd_size = 100,
  min_genes = 200,
  min_cells = 100,
  expr_lim = NULL,
  center_cells = TRUE,
  na.rm = FALSE,
  center_genes = FALSE,
  gene_ann = NULL
)

Arguments

genes_by_cells

genes-by-cells data.frame

reference

one-column data.frame with a reference expression profile; rownames must match those of genes_by_cell;

mc.cores

number of cores;

wnd_size

number of adjacent genes considered;

min_genes

minimun number of genes expressed in a cell;

min_cells

minimum number of cells in which a gene must be expressed;

expr_lim

min and max values of relative expression; by default, lower and higher whiskers returned by grDevices::boxplot.stats will be used. Set to NA or anything other value such that length(expr_lim) != 2 to disbale the removal of outliers.

center_cells

whether to center cells

na.rm

whether to remove 0 values in CNV estimation

center_genes

whether to center genes or not

gene_ann

optional data.frame with gene annotation with mandatory columns "Chromosome", "symbol" and "pos" (genomic location). If NULL gene locations will be collected from org.Hs.eg.db