top.genes {geva} | R Documentation

## Top Results from GEVA

### Description

Extracts the genes with a relevant classification according to the GEVA results.

### Usage

    top.genes(
      gevaresults,
      classif = c("similar", "factor-dependent", "factor-specific"),
      which.spec = levels(gevaresults),
      add.cols = NULL,
      ...,
      names.only = FALSE
    )

### Arguments

`gevaresults` | a `GEVAResults` object
`classif` | `character` vector, filters the returned genes by their final classification. Possible options are `"similar"`, `"factor-dependent"`, `"factor-specific"`, `"sparse"`, and `"basal"`. Multiple options can be combined
`which.spec` | `factor`, filters the specific factors to be returned
`add.cols` | `character` vector with column names from the feature table (accessed by `featureTable(gevaresults)`). The matching columns will be added to the returned table
`...` | optional arguments (not used in this version)
`names.only` | `logical`, set to `TRUE` to return only the table row names

### Value

If `names.only` is `FALSE` (the default), returns a subset of the `resultstable` slot (`data.frame`) from the `gevaresults` that includes only the filtered genes according to the function parameters.

Otherwise, if `names.only` is `TRUE`, returns only the row names (`character` vector) of this table subset.

### Examples

    ## Basic usage with a random generated input
    ginput <- geva.ideal.example() # Generates a random input example
    gresults <- geva.quick(ginput) # Performs the entire analysis (default parameters)

    # Gets a table that includes all the top genes
    dtgenes <- top.genes(gresults) # Gets the top genes table
    head(dtgenes)                  # Prints the first results

    # Appends the "Symbol" column to the results table
    dtgenes <- top.genes(gresults, add.cols="Symbol")
    head(dtgenes)                  # Prints the first results

    # Appends all feature columns to the results table
    dtgenes <- top.genes(gresults, add.cols=names(featureTable(gresults)))
    head(dtgenes)                  # Prints the first results

    # Gets only the factor-specific genes
    dtgenes <- top.genes(gresults, "factor-specific")
    head(dtgenes)                  # Prints the first results

    # Gets only the factor-specific genes for "Cond_1" factor (if any)
    dtgenes <- top.genes(gresults, "factor-specific", "Cond_1")
    head(dtgenes)                  # Prints the first results

[Package geva version 1.2.0 Index]