get_the_up_genes_for_all_possible_groups {celaref} | R Documentation

## get_the_up_genes_for_all_possible_groups

### Description

For the most overrepresented genes of each group in the test dataset, get their rankings in all the groups of the reference dataset.

### Usage

    get_the_up_genes_for_all_possible_groups(de_table.test, de_table.ref,
      rankmetric = "TOP100_LOWER_CI_GTE1", n = 100)

### Arguments

`de_table.test` | A differential expression table of the query experiment, as generated from `contrast_each_group_to_the_rest`
`de_table.ref` | A differential expression table of the reference dataset, as generated from `contrast_each_group_to_the_rest`
`rankmetric` | Specifiy ranking method used to pick the 'top' genes. The default 'TOP100_LOWER_CI_GTE1' picks genes from the top 100 overrepresented genes (ranked by inner 95 work best for distinct cell types (e.g. tissue sample.). 'TOP100_SIG' again picks from the top 100 ranked genes, but requires only statistical significance, 95 clusters (e.g. PBMCs).
`n` | For tweaking maximum returned genes from different ranking methods. Will change the p-values! Suggest leaving as default unless you're keen.

### Details

This is effectively a subset of the reference data, 'marked' with the 'top' genes that represent the groups in the query data. The distribution of the rescaled ranks of these marked genes in each reference data group indicate how similar they are to the query group.

This function is simply a conveinent wrapper for `get_the_up_genes_for_group` that merges output for each group in the query into one table.

### Value

de_table.marked This will alsmost be a subset of de_table.ref, with an added column test_group set to the query groups, and test_dataset set to test_dataset_name.

If nothing passes the rankmetric criteria, a warning is thrown and NA is returned. (This can be a genuine inability to pick out the representative 'up' genes, or due to some problem in the analysis)

### See Also

`get_the_up_genes_for_group` Function for testing a single group.

### Examples

    de_table.marked.query_vs_ref <- get_the_up_genes_for_all_possible_groups(
       de_table.test=de_table.demo_query ,
       de_table.ref=de_table.demo_ref )

[Package celaref version 1.2.0 Index]