tablesDE {maigesPack} | R Documentation

## Save HTML or CSV tables of differentially expressed genes

### Description

This function takes an object of class `maigesDE` or `maigesDEcluster` generated by functions `deGenes2by2Ttest`, `deGenes2by2Wilcox`, `deGenes2by2BootT` and `deGenesANOVA` and save HTML or CSV tables differentially expressed genes.

### Usage

    tablesDE(deComp=NULL, dir="./", filenames=NULL, dataID="Someone's",
             type=c("HTML","CSV")[1], geneID="GeneName", hsID="ClusterId",
             gbID="GeneId", annotID="Annot", genes=NULL, logFold=TRUE,
             adjP="none", sort="p.value", nDEgenes=NULL)

### Arguments

`deComp` | object of class `maigesDE`.
`dir` | character specifying the directory to save the files.
`filenames` | character vector with file names to be saved, if NULL default names are given.
`dataID` | character giving an identifier for the dataset. If NULL the `notes` slot from `DE.comp` are used.
`type` | type of file to be saved. May be 'HTML' (default) or 'CSV'.
`geneID` | character giving the ID of label for gene symbol in the dataset.
`hsID` | character giving the ID of label for unigene code in the dataset.
`gbID` | character giving the ID of label for Genbank entry in the dataset.
`annotID` | character giving the ID of label for gene annotation in the dataset.
`genes` | character vector specifying the genes to be saved, mapped according to `geneID` label.
`logFold` | logical specifying if the fold change must be saved in log2 scale.
`adjP` | character string giving the type of p-value adjustment. May be 'Bonferroni', 'Holm', 'Hochberg', 'SidakSS', 'SidakSD', 'BH', 'BY' or 'none'. Defaults to 'none'.
`sort` | character specifying the field to be sorted, may be 'p.value' (default), 'fold' or 'statistic'.
`nDEgenes` | number of differentially genes to be saved in the file. Defaults to NULL to save all genes. If an integer value the function saves the `nDEgenes` with smaller p-values (most significantly DE genes). If a number in (0,1) `nDEgenes` is used as a cutoff for the p-values.

### Details

We use the function `mt.rawp2adjp` from package multtest to adjust p-values, any information the methods implemented must be searched in their help pages. The arguments `hsID`, `gbID` and `annotID` are used only to improve the tables generate including links for the respective databases, but if these information are absent in the dataset they must be specified as NULL. The argument `geneID` must be necessarily specified, because the genes must be at least one identification.

### Value

This function don't return any object.

### Author(s)

Gustavo H. Esteves <gesteves@vision.ime.usp.br>

### See Also

`deGenes2by2Ttest`, `deGenes2by2Wilcox`, `deGenes2by2BootT`, `deGenesANOVA`, `maigesDE`, `maigesDEcluster`.

### Examples

    ## Loading the dataset
    data(gastro)

    ## Doing bootstrap from t statistic test fot 'Type' sample label, k=1000
    ## specifies one thousand bootstraps
    gastro.ttest = deGenes2by2Ttest(gastro.summ, sLabelID="Type")

    tablesDE(gastro.ttest) ## Save HTML tables

    ## To save only tables with p-value < 0.05
    tablesDE(gastro.ttest, nDEgenes=0.05)

    ## To save only tables with 30 most significantly genes
    tablesDE(gastro.ttest, nDEgenes=30)

[Package maigesPack version 1.2.1 Index]