make_test: Perform co-DIU statistical test for one gene pair

View source: R/coDIU_genes.R

make_testR Documentation

Perform co-DIU statistical test for one gene pair

Description

This function is called iteratively by test_codiu_genes to test cluster-dependent expression for a single pair of candidate co-DIU genes.

Usage

make_test(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 named list containing two elements, pvalue and test:

  1. pvalue: A tibble containing two columns, cluster:cell_type and gene:cell_type, containing the p-value obtained in the likelihood ratio chi-square test (see test_codiu_genes) for each of these two interactions.

  2. test: A tibble containing three columns, transcript, cluster and gene, each detailing the tested elements of the co-DIU interaction.

References

\insertRef

Venables2002acorde

\insertRef

Fox2019acorde


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