Skip to contents

Wrapper function to run fragtk qc and add the metadata to the Seurat object.

Usage

ATACqc(object, ...)

# Default S3 method
ATACqc(
  object,
  annotations,
  fragtk.path = NULL,
  outdir = tempdir(),
  cleanup = TRUE,
  verbose = TRUE,
  ...
)

# S3 method for class 'Fragment2'
ATACqc(
  object,
  annotations,
  fragtk.path = NULL,
  outdir = tempdir(),
  cleanup = TRUE,
  verbose = TRUE,
  ...
)

# S3 method for class 'ChromatinAssay5'
ATACqc(
  object,
  annotations = NULL,
  fragtk.path = NULL,
  outdir = tempdir(),
  cleanup = TRUE,
  verbose = TRUE,
  ...
)

# S3 method for class 'Seurat'
ATACqc(
  object,
  assay = NULL,
  annotations = NULL,
  fragtk.path = NULL,
  outdir = tempdir(),
  cleanup = TRUE,
  verbose = TRUE,
  suffix = ".atacqc",
  ...
)

Arguments

object

A SeuratObject::Seurat object, ChromatinAssay5 object , or path to a fragment file.

...

Arguments passed to other methods

annotations

GenomicRanges::GRanges() object containing gene annotations. If NULL, attempt to extract this from the ChromatinAssay5 object if provided.

fragtk.path

Path to fragtk executable. If NULL, try to find fragtk automatically.

outdir

Path for output directory

cleanup

Remove output files created by fragtk

verbose

Display messages

assay

Name of assay to use. If NULL, use the default assay.

suffix

Suffix to append to the names of QC metric columns that already exist in the object metadata, to avoid overwriting them. For example, if a FRiP column computed by FRiP() is already present, the promoter-based FRiP metric computed here will instead be stored as FRiP<suffix>. Set to NULL to disable this behavior and allow existing columns to be overwritten.

Value

When run on a SeuratObject::Seurat object, returns the input object with per-cell QC metrics added to the cell metadata. When run on a ChromatinAssay5, Fragment2, or path to a fragment file, returns a data.frame of per-cell QC metrics with cell barcodes as row names. Column names correspond to the metrics produced by fragtk qc.