test_gene_enrichment-methods: analyse gene enrichment with EGSEA

Description Usage Arguments Details Value Examples

Description

test_gene_enrichment() takes as input a 'tbl' formatted as | <SAMPLE> | <ENSEMBL_ID> | <COUNT> | <...> | and returns a 'tbl' with the additional transcript symbol column

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
test_gene_enrichment(
  .data,
  .formula,
  .sample = NULL,
  .entrez,
  .abundance = NULL,
  .contrasts = NULL,
  method = c("camera", "roast", "safe", "gage", "padog", "globaltest", "ora"),
  species,
  cores = 10
)

## S4 method for signature 'spec_tbl_df'
test_gene_enrichment(
  .data,
  .formula,
  .sample = NULL,
  .entrez,
  .abundance = NULL,
  .contrasts = NULL,
  method = c("camera", "roast", "safe", "gage", "padog", "globaltest", "ora"),
  species,
  cores = 10
)

## S4 method for signature 'tbl_df'
test_gene_enrichment(
  .data,
  .formula,
  .sample = NULL,
  .entrez,
  .abundance = NULL,
  .contrasts = NULL,
  method = c("camera", "roast", "safe", "gage", "padog", "globaltest", "ora"),
  species,
  cores = 10
)

## S4 method for signature 'tidybulk'
test_gene_enrichment(
  .data,
  .formula,
  .sample = NULL,
  .entrez,
  .abundance = NULL,
  .contrasts = NULL,
  method = c("camera", "roast", "safe", "gage", "padog", "globaltest", "ora"),
  species,
  cores = 10
)

Arguments

.data

A 'tbl' formatted as | <SAMPLE> | <TRANSCRIPT> | <COUNT> | <...> |

.formula

A formula with no response variable, representing the desired linear model

.sample

The name of the sample column

.entrez

The ENTREZ ID of the transcripts/genes

.abundance

The name of the transcript/gene abundance column

.contrasts

= NULL,

method

A character vector. The methods to be included in the ensembl. Type EGSEA::egsea.base() to see the supported GSE methods.

species

A character. For example, human or mouse

cores

An integer. The number of cores available

Details

\lifecycle

maturing

This wrapper execute ensemble gene enrichment analyses of the dataset using EGSEA (DOI:0.12688/f1000research.12544.1)

dge = data keep_abundant( factor_of_interest = !!as.symbol(parse_formula(.formula)[[1]]), !!.sample, !!.entrez, !!.abundance )

# Make sure transcript names are adjacent [...] as_matrix(rownames = !!.entrez) edgeR::DGEList(counts = .)

idx = buildIdx(entrezIDs = rownames(dge), species = species)

dge

# Calculate weights limma::voom(design, plot = FALSE)

# Execute EGSEA egsea( contrasts = my_contrasts, baseGSEAs = method, sort.by = "med.rank", num.threads = cores, report = FALSE )

Value

A 'tbl' object

A 'tbl' object

A 'tbl' object

A 'tbl' object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 

df_entrez = symbol_to_entrez(tidybulk::counts_mini, .transcript = transcript, .sample = sample)
df_entrez = aggregate_duplicates(df_entrez, aggregation_function = sum, .sample = sample, .transcript = entrez, .abundance = count)

library("EGSEA")

	test_gene_enrichment(
		df_entrez,
		~ condition,
		.sample = sample,
		.entrez = entrez,
		.abundance = count,
      method = c("roast" , "safe", "gage"  ,  "padog" , "globaltest", "ora" ),
		species="human",
		cores = 2
	)


## End(Not run)

tidybulk documentation built on April 7, 2021, 6 p.m.