Skip to contents

Convenience wrapper to run a sample

Usage

run_scatools(
  sample_id,
  fragment_file,
  cells = NULL,
  bins = bins_10mb,
  bin_name = prettyMb(getmode(width(bins))),
  blacklist = NULL,
  outdir = sample_id,
  segment = FALSE,
  rmsb_size = 0.1 * getmode(width(bins)),
  gc_range = c(0.3, 0.8),
  overwrite = FALSE,
  verbose = TRUE,
  save_h5ad = TRUE,
  min_bin_counts = 1,
  min_bin_prop = 0.95,
  min_cell_counts = min_bin_counts,
  min_cell_prop = min_bin_prop,
  ncores = 1,
  bpparam = BiocParallel::SerialParam()
)

Arguments

sample_id

Sample id

fragment_file

Fragments file

cells

A vector of cell barcodes. If not provided will use all barcodes

bins

Genomic ranges object with bins to use

bin_name

bin_name Name of the bins (e.g. '10Mb', '500Kb', 'chr_arm'). If not provided is automatically detected based on binwidth.

blacklist

Genome blacklist regions to filter against

outdir

Output directory

segment

Logical. Determines whether to run segmentation or not

rmsb_size

Remove small bins below a given size. Useful in cases where small bins are leftover at the ends of chromosomes. Defaults to 10% of the binwidth.

gc_range

GC range for bins to keep. Removes large GC outliers

overwrite

Whether to overwrite previous binned counts

verbose

Verbosity

save_h5ad

Logical. Whether to save raw and processed h5ad files. Requires packages zellkonverter and anndata

min_bin_counts

A bin requires at least min_bin_counts across min_bin_prop proportion of cells to be kept

min_bin_prop

Minimum proportion of cells with at least min_bin_counts per bin in order to keep a bin

min_cell_counts

A cell requires at least min_cell_counts across min_cell_prop proportion of bins to be kept

min_cell_prop

Minimum proportion of bins with at least min_cell_counts per cell in order to keep a cell

ncores

Number of cores

bpparam

BiocParallel Parameters

Value

SingleCellExperiment object