MIGSAres-genes {MIGSA} | R Documentation

## Get or edit MIGSAres with/by genes that contributed to enrichment

### Description

`genesInSets` returns a data.frame with gene sets as rows, genes as columns, and as value the number of experiments in which each gene contributed to enrich each gene set. If it was enriched only by SEA then it returns the genes that contributed in SEA. If it was enriched only by GSEA then it returns the genes that contributed in GSEA. If it was enriched by both then it returns the genes that contributed in both. `filterByGenes` returns a MIGSAres object with only the gene sets which resulted enriched by at least one gene from a provided list.

### Usage

    "MIGSAres-genes"(migsaRes)

    genesInSets(migsaRes)

    ## S4 method for signature 'MIGSAres'
    genesInSets(migsaRes)

    filterByGenes(migsaRes, genes)

    ## S4 method for signature 'MIGSAres,character'
    filterByGenes(migsaRes, genes)

### Arguments

`migsaRes` | MIGSAres object.
`genes` | character vector of the interest genes for MIGSAres filtering.

### Value

If genesInSets: a data.frame with the number of experiments in which each gene contributed to enrich each gene set. If filterByGenes: A MIGSAres object containing only the gene sets in which provided genes contributed to enrichment.

### See Also

`setEnrCutoff`

### Examples

    data(migsaRes);

    ###### genesInSets
    ## First lets set a cutoff of 0.1
    migsaResWCoff <- setEnrCutoff(migsaRes, 0.1);
    gInSets <- genesInSets(migsaResWCoff);
    class(gInSets); # matrix

    ## Now we can do stuff as check which genes enriched a gene set in all (two)
    ## experiments.
    gInSets[rowSums(gInSets==2) > 0, colSums(gInSets==2) > 0];

    ###### filterByGenes
    ## Suppose we are interested in studying these genes:
    intGenes <- c("g10", "g91", "g388", "g742", "g874");
    migsaResIntGenes <- filterByGenes(migsaResWCoff, intGenes);

    ## Now in migsaResIntGenes we have the MIGSA results of the gene sets in
    ## which at least one gene of our list contributed to enrich.
    migsaResIntGenes

[Package MIGSA version 1.8.1 Index]