RunFilteredContrasts: RunFilteredContrasts

View source: R/PseudoBulk.R

RunFilteredContrastsR Documentation

RunFilteredContrasts

Description

This is the companion function to FilterPseudobulkContrasts. FilterPseudobulkContrasts determines the valuable contrasts relative to your metadata variable of interest, and this function performs the model fitting and collecting the differential expression results.

Usage

RunFilteredContrasts(
  seuratObj,
  filteredContrastsFile = NULL,
  filteredContrastsDataframe = NULL,
  design,
  test.use,
  logFC_threshold = 1,
  minCountsPerGene = 1,
  FDR_threshold = 0.05,
  assayName = "RNA",
  showPlots = FALSE
)

Arguments

seuratObj

A pseudobulked Seurat object that was used for DesignModelMatrix() and FilterPseudobulkContrasts().

filteredContrastsFile

A file containing the output of FilterPseudobulkContrasts. This can be omitted if you use the dataframe returned by FilterPseudobulkContrasts insetad.

filteredContrastsDataframe

A dataframe containing the output of FilterPseudobulkContrasts. This can be omitted if you read the results of FilterPseudobulkContrasts from the file written by the function instead.

design

a design/model matrix returned by DesignModelMatrix().

test.use

A passthrough argument specifying the statistical test to be run by PerformGlmFit and PerformDifferentialExpression.

logFC_threshold

A passthrough argument specifying the log fold change threshold to be used by PerformDifferentialExpression (for plotting only).

minCountsPerGene

A passthrough argument specifying the minimum counts a gene must have before it is filtered and excluded from GLM fitting by PerformGlmFit().

FDR_threshold

A passthrough argument specifying the FDR threshold to be used by PerformDifferentialExpression (for plotting only).

assayName

A passthrough argument specifying in which assay the counts are held.

showPlots

A passthrough argument specifying whether or not PerformDifferentialExpression should show the volcano plots.

Value

A list of dataframes containing the differentially expressed genes in each contrast supplied by one of the filteredGenes arguments.


bimberlabinternal/CellMembrane documentation built on Oct. 16, 2024, 6:53 a.m.