infercnv: massage a (possibly velocitized) SingleCellExperiment into an...

Description Usage Arguments Details Value

View source: R/infercnv.R

Description

massage a (possibly velocitized) SingleCellExperiment into an infercnv object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
infercnv(
  x,
  group_col = "cnv_group",
  ref_prefix = "normal_",
  obs_prefix = "tumor_",
  by_cluster = FALSE,
  downsample = TRUE,
  maxcells = 100,
  run = TRUE,
  cutoff = NULL,
  ...
)

Arguments

x

a SingleCellExperiment

group_col

the colData column with cell annotations ("cnv_group")

ref_prefix

prefix for reference sample clusters ("normal_")

obs_prefix

prefix for tumor sample clusters ("tumor_")

by_cluster

add clusters for references and observations? (FALSE)

downsample

downsample? (TRUE, maxcells per cluster per sample)

maxcells

how many cells per sample per cluster to grab? (100)

run

perform infercnv run with "sensible" defaults? (TRUE)

cutoff

expression cutoff for infercnv::run (default: guess)

...

other arguments for infercnv::run, e.g. num_threads

Details

We do not require or import infercnv, because the requirement for JAGS can be a showstopper for HPC installations. This function will stop() if the infercnv package namespace cannot be attached, however, for obvious reasons. I have no idea why the infercnv function name was not taken by infercnv, but since it wasn't, I stole it. If NumGenesExpressed is among the colData columns for the SingleCellExperiment, and run==TRUE, then this function will use the former to guess a sensible value for the latter. The velocessor package also registers a halfway decent show method for infercnv objects.

Value

1
         an infercnv object

trichelab/velocessor documentation built on Jan. 5, 2022, 6:27 p.m.