make_design: Create design matrix for co-DIU test of a pair of genes

View source: R/coDIU_genes.R

make_designR Documentation

Create design matrix for co-DIU test of a pair of genes

Description

This function is used by test_codiu_genes to create a design matrix for GLM fitting using information from a pair of co-DIU candidategenes, i.e. expression values of the gene's co-expressed isoforms, cell type labels for cells and cluster labels for isoforms.

Usage

make_design(pair, data, cluster_list, gene_tr_table, cell_types)

Arguments

pair

A character vector of length 2 indicating the gene IDs of a gene pair to test.

data

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

cluster_list

A list of character vectors containing isoform IDs. Each element of the list represents a cluster of isoforms.

gene_tr_table

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

cell_types

A character vector including cell type assignments for the cell IDs in data.

Details

Arguments are passed from test_codiu_genes.

Value

A tibble, containing a long-form table with the required factors for GLM fitting and statistical testing.


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