detect_minor_isoforms: Filter isoforms by gene-relative expression across cell types

View source: R/filtering.R

detect_minor_isoformsR Documentation

Filter isoforms by gene-relative expression across cell types

Description

For convenience, acorde includes a function to assist lenient filtering of isoforms based on the mean gene-relative expression of the isoform across cell types. Isoforms that contribute marginally to total gene expression in all cell types will be flagged as minor. Based on this criteria, isoforms must have higher mean gene-relative expression than specified in at least one of the cell types.

Usage

detect_minor_isoforms(
  data,
  id_table,
  gene_tr_table,
  gene_expr_proportion = 0.2,
  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.

gene_tr_table

A data.frame or tibble containing two columns named transcript and gene, indicating gene-isoform correspondence.

gene_expr_proportion

A numeric value indicating the mean gene-relative expression threshold that will be used to detect minor isoforms across cell types. Defaults to 0.2 (i.e. mean 20% of the gene's total expression in at least one cell type).

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 minor (considering the provided gene-relative expression threshold).


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