make_bulk_matrix_from_seurat: Create a gene expression matrix to predict dependencies

View source: R/make_bulk_matrix_from_seurat.R

make_bulk_matrix_from_seuratR Documentation

Create a gene expression matrix to predict dependencies

Description

This function creates a gene expression matrix from a list of files, each containing bulk gene expression profiles. It returns a samples-by-genes matrix.

Usage

make_bulk_matrix_from_seurat(
  scrna_folder,
  scrna_name,
  scrna_group_cells_by = "seurat_clusters",
  scrna_groups_to_keep = NULL,
  scrna_assay_markers = "RNA",
  scrna_assay_vars = "RNA",
  scrna_test_markers = "MAST",
  scrna_logfc = 0.585,
  scrna_minpct = 0.25,
  scrna_var_nfeatures = 3000,
  scrna_label_prefix = "cluster",
  pseudocount = 0.083,
  qvalue_cutoff = 0.05,
  force_find_markers = FALSE
)

Arguments

scrna_folder

Folder that hosts the Seurat object.

scrna_name

Name of the Seurat object (without .rds).

scrna_group_cells_by

The name of the column in the metadata to group by (default = "seurat_clusters").

scrna_assay_markers

The assay (e.g. "RNA", "SCT", "alra") used for differential expression analysis.

scrna_assay_vars

The assay (e.g. "RNA", "SCT", "alra") used for pre-calculated variable features.

scrna_test_markers

The method used (e.g. "MAST", "wilcox", "t") used for differential expression analysis. See help for FindAllMarkers() in Seurat.

scrna_logfc

See help for FindAllMarkers() in Seurat.

scrna_minpct

See help for FindAllMarkers() in Seurat.

scrna_label_prefix

When creating a pseudobulk profile for each subgroup, this is a prefix to add to their labels (default = "cluster").

pseudocount

An arbitrary small number to add to gene counts before log transformation. 1 works well for 10X data, 0.083 works well for Drop-seq data (default = 1).

qvalue_cutoff

FDR cutoff to consider a marker significant.

force_find_markers

By default, finding markers will be skipped if done previously (saved as scrna_name.scrna_group_cells_by.markers inside the scrna_folder folder). If TRUE, finding markers will always happen.

Examples

make_bulk_matrix_from_seurat("./data","my_seurat_object")

Mushriq/mixmap documentation built on Jan. 28, 2024, 7:22 p.m.