detect_low_expression: Filter isoforms by absolute expression level across cell...

View source: R/filtering.R

detect_low_expressionR Documentation

Filter isoforms by absolute expression level across cell types

Description

Filter isoforms by absolute expression level across cell types

Usage

detect_low_expression(
  data,
  id_table,
  mean_counts = 10,
  median_counts = NULL,
  expressed_only = TRUE,
  isoform_col = NULL
)

Arguments

data

A data.frame or tibble object including isoforms as rows and cells as columns. Isoform IDs can be included as row names (data.frame) or as an additional column (tibble).

id_table

A data frame including two columns named cell and cell_type, in which correspondence between cell ID and cell type should be provided. The number of rows should be equal to the total number of cell columns in data, and the order of the cell column should match column (i.e. cell) order in data.

mean_counts

A numeric value indicating the mean expression threshold used to flag an isoform as lowly expressed. Defaults to 10 counts, i.e. all isoforms with mean expression below 10 counts in all cell types will be reported as lowly expressed.

median_counts

A numeric value supplying a median expression threshold. If provided, will override mean_counts, and the median expression of the transcripts across cell types will be used to flag low expression.

expressed_only

Logical. When TRUE, zero-expression cells will not be considered to compute mean/median cell type expression. Transcripts will therefore be flagged based solely on their count no. across cells where they are expressed.

isoform_col

When a tibble is provided in data, a character object indicating the name of the column in which isoform IDs are specified. Otherwise, isoform identifiers will be assumed to be defined as rownames, and this argument will not need to be provided.

Value

A tibble containing two columns, the first one including transcript IDs, and the second containing logical values specifying whether the isoform was flagged as lowly expressed (considering the provided mean or median expression threshold).


ConesaLab/acorde documentation built on Feb. 25, 2024, 4:16 a.m.