Skip to contents

Run the optional scPagwas package from scop without bundling LD, pathway, or block-annotation resources. The wrapper validates required GWAS columns, normalizes output paths, and records provenance in Seurat tools or a result attribute. It prefers the upstream scPagwas_main2 runner and applies Seurat 5 compatibility to local function copies without modifying the installed backend namespace.

Usage

RunscPagwas(
  object = NULL,
  single_data = NULL,
  gwas_data,
  group.by = NULL,
  singlecell = TRUE,
  celltype = TRUE,
  assay = NULL,
  block_annotation = c("hg38", "hg37", "custom"),
  output.dirs = tempdir(),
  cleanup_soar = TRUE,
  return_seurat = !is.null(srt) || inherits(single_data, "Seurat") || !is.null(object),
  verbose = TRUE,
  ...,
  srt = NULL
)

Arguments

object

The single-cell input. Supply a Seurat object or a path to a Seurat .rds file.

single_data

Deprecated alias for object. It will be removed in scop 1.0.0.

gwas_data

GWAS summary statistics as a data frame or delimited text file. Required columns are chrom, pos, rsid, se, beta, and maf.

group.by

Optional Seurat metadata column used to set cell identities.

singlecell

Whether to calculate single-cell results.

celltype

Whether to calculate cell-type results.

assay

Assay used by scPagwas. Defaults to the active assay for a Seurat object and to "RNA" for other inputs.

block_annotation

Genome build for bundled upstream annotations ("hg38" or "hg37") or a custom annotation path.

output.dirs

Output directory passed to scPagwas.

cleanup_soar

Deprecated compatibility argument. SOAR cleanup is managed by the upstream scPagwas backend and is ignored by scop.

return_seurat

Whether to return a Seurat object when one is available.

verbose

Whether to print the message. Default is TRUE.

...

Additional arguments passed to the upstream scPagwas function after filtering by its formal arguments.

srt

Deprecated alias for object; supply exactly one of the two. It will be removed in scop 1.0.0.

Value

A Seurat object or upstream result list.

See also