EC2gene: Map EC Index to Genes Compatible with the EC

Description Usage Arguments Details Value See Also Examples

View source: R/tr2g.R

Description

In the output file output.bus, equivalence classes (EC) are denoted by an index, which is related to the set of transcripts the EC is compatible to in the output file matrix.ec. This function further relates the set of transcripts to the set of genes the EC is compatible to. This function first reads in matrix.ec, and then translates the transcripts into genes.

Usage

1
EC2gene(tr2g, kallisto_out_path, verbose = TRUE)

Arguments

tr2g

A Data frame with columns gene and transcript, in the same order as in the transcriptome index for kallisto.

kallisto_out_path

Path to the kallisto bus output directory.

verbose

Logical, whether to display progress.

Details

The data frame passed to tr2g can be generated from function transcript2gene in this package for any organism that has gene and transcript ID on Ensembl, or from the tr2g_* family of function. You no longer need to use this function before running make_sparse_matrix; the purpose of this function is to query which genes equivalence classes map to.

Calling this function is unnessary when working with gene count matrices. However, this function is useful for finding genes the ECs map to in TCC matrices, such as when finding species-specific ECs in mixed species datasets and identifying ECs mapped to known marker genes of cell types.

Value

A data frame with 3 columns:

EC_ind

Index of the EC as appearing in the matrix.ec file.

EC

A list column each element of which is a numeric vector of the transcripts in the EC corresponding to the EC index. To learn more about list columns, see the relevant section in the R for Data Science book.

gene

A list column each element of which is a character vector of genes the EC maps to.

See Also

transcript2gene

Examples

1
2
3
4
# Load toy example for testing
toy_path <- system.file("testdata", package = "BUSpaRse")
load(paste(toy_path, "toy_example.RData", sep = "/"))
EC2gene(tr2g_toy, toy_path, verbose = FALSE)

BUSpaRse documentation built on March 3, 2021, 2:01 a.m.