load_stellarscope_seurat: Load count matrix from Stellarscope output files

View source: R/load_stellarscope_seurat.R

load_stellarscope_seuratR Documentation

Load count matrix from Stellarscope output files

Description

This returns a Seurat object with raw counts from Stellarscope and STARsolo (if provided). Only cell barcodes present in both are retained. Feature metadata can also be included for TEs and genes.

Usage

load_stellarscope_seurat(
  stellarscope_dir,
  starsolo_dir = NULL,
  exp_tag = "stellarscope",
  project = "StellarscopeProject",
  min.cells = 0,
  min.features = 0,
  remove.nofeat = TRUE,
  TE_count_filename = "*TE_counts.mtx",
  TE_feature_filename = "*features.tsv",
  TE_barcode_filename = "*barcodes.tsv",
  GENE_count_filename = "*matrix.mtx",
  GENE_feature_filename = "*features.tsv",
  GENE_barcode_filename = "*barcodes.tsv",
  TE_metadata = data.frame(retro.hg38.v1, row.names = "locus"),
  GE_metadata = NULL,
  use.symbols = TRUE
)

Arguments

stellarscope_dir

Stellarscope output directory

starsolo_dir

STARsolo output directory, optional.

exp_tag

Experiment tag used in stellarscope run. Default is "stellarscope".

project

Project name for the Seurat object

min.cells

Include features detected in at least this many cells. Will subset the counts matrix as well. To reintroduce excluded features, create a new object with a lower cutoff.

min.features

Include cells where at least this many features are detected.

remove.nofeat

Remove "no feature" category from Stellarscope counts. Default is TRUE.

TE_count_filename

File name pattern for TE count matrix (MTX format). May contain wildcards.Default is '*TE_counts.mtx'.

TE_feature_filename

File name pattern for TE feature list (tab-separated, features in first column). May contain wildcards. Default is '*features.tsv'.

TE_barcode_filename

File name pattern for TE barcode list (tab-separated, barcodes in first column). May contain wildcards. Default is '*barcodes.tsv'.

GENE_count_filename

File name pattern for gene count matrix (MTX format). May contain wildcards. Default is '*matrix.mtx'.

GENE_feature_filename

File name pattern for gene feature list (tab-separated, features in first column). May contain wildcards. Default is '*features.tsv'.

GENE_barcode_filename

File name pattern for gene barcode list (tab-separated, barcodes in first column). May contain wildcards. Default is '*barcodes.tsv'.

TE_metadata

Data frame with metadata related to the TE features

GE_metadata

Data frame with metadata related to the gene features

use.symbols

Use gene symbols as the gene ID. Duplicate symbols have sequential numbers appended (using base::make.unique()). Default is TRUE.

Value

A Seurat object with counts from stellarscope and STARsolo.

See Also

base::make.unique() for use.symbols


nixonlab/scopetools documentation built on Sept. 30, 2022, 11:15 a.m.