Last data update: 2014.03.03

R: Differentially Expressed Genes Heatmap
GSEPD_DEGHeatmapR Documentation

Differentially Expressed Genes Heatmap

Description

Generates a gene-by-subject heatmap plot of differentially expressed genes.

Usage

 GSEPD_DEGHeatmap(G)

Arguments

G

The GSEPD master object carries sample information and gene expression data. It should have already run Process() to be eligible. Parameters regarding differential expression limits are set within the G$LIMIT list object.

Details

After GSEPD_Process() has created differential expression tables with known filenames, this function can read those tables and make heatmap plots for a subset of genes. We use the N most significant genes, specified by the MAX_Genes_for_Heatmap parameter of the passed GSEPD object.

Value

This function doesn't return anything. If successful, four PDF files are created. HM and HM- are all subjects from sampleMeta and finalCounts, HMS and HMS- are only those in the test groups. The hyphen indicates a smaller unlabeled figure. In each case the data is manipulated as in GSEPD_Heatmap() such that complete linkage clustering is performed on z-score normalized genes using the normalized counts directly from DESeq2::varianceStabilizingTransformation, which are displayed in the labeled figures.

Examples

  data("IlluminaBodymap")
  data("IlluminaBodymapMeta")
  set.seed(1000) #fixed randomness
  isoform_ids <- Name_to_RefSeq(c("HIF1A","EGFR","MYH7","CD33","BRCA2"))
  rows_of_interest <- unique( c( isoform_ids ,
                                 sample(rownames(IlluminaBodymap),
                                        size=500,replace=FALSE)))
  G <- GSEPD_INIT(Output_Folder="OUT",
                finalCounts=round(IlluminaBodymap[rows_of_interest , ]),
                sampleMeta=IlluminaBodymapMeta,
                COLORS=c("green","black","red"))    
  G <- GSEPD_ChangeConditions( G, c("A","B")) #set testing groups first!
  G <- GSEPD_Process( G ) #have to have processed results to plot them
  GSEPD_DEGHeatmap(G) # all parameters automatic
  

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(rgsepd)
Loading required package: DESeq2
Loading required package: S4Vectors
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit


Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: SummarizedExperiment
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: goseq
Loading required package: BiasedUrn
Loading required package: geneLenDataBase


Loading R/GSEPD 1.4.2
Building human gene name caches
'select()' returned 1:1 mapping between keys and columns
'select()' returned 1:1 mapping between keys and columns
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/rgsepd/GSEPD_DEGHeatmap.Rd_%03d_medium.png", width=480, height=480)
> ### Name: GSEPD_DEGHeatmap
> ### Title: Differentially Expressed Genes Heatmap
> ### Aliases: GSEPD_DEGHeatmap
> ### Keywords: plot
> 
> ### ** Examples
> 
>   data("IlluminaBodymap")
>   data("IlluminaBodymapMeta")
>   set.seed(1000) #fixed randomness
>   isoform_ids <- Name_to_RefSeq(c("HIF1A","EGFR","MYH7","CD33","BRCA2"))
>   rows_of_interest <- unique( c( isoform_ids ,
+                                  sample(rownames(IlluminaBodymap),
+                                         size=500,replace=FALSE)))
>   G <- GSEPD_INIT(Output_Folder="OUT",
+                 finalCounts=round(IlluminaBodymap[rows_of_interest , ]),
+                 sampleMeta=IlluminaBodymapMeta,
+                 COLORS=c("green","black","red"))    
Keeping rows with counts (458 of 505)
>   G <- GSEPD_ChangeConditions( G, c("A","B")) #set testing groups first!
>   G <- GSEPD_Process( G ) #have to have processed results to plot them
converting counts to integer mode
Generating OUT/DESEQ.counts.Ax4.Bx8.csv
converting counts to integer mode
estimating size factors
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
fitting model and testing
Generating OUT/DESEQ.Volcano.Ax4.Bx8.png
Generating OUT/DESEQ.RES.Ax4.Bx8.csv
dumping rows with raw PVAL>0.990 OR baseMean < 1 OR on excludes list
Rows remaining: 433
Converting identifiers with local DB
Converting identifiers with biomart
Generating OUT/DESEQ.RES.Ax4.Bx8.Annote.csv, overwriting previous existing version.
Generating OUT/HM.Ax4.Bx8.154.pdf, overwriting previous existing version.
Loading hg19 length data...
Fetching GO annotations...
Loading required package: AnnotationDbi
Calculating the p-values...
'select()' returned 1:1 mapping between keys and columns
Loading hg19 length data...
Fetching GO annotations...
Calculating the p-values...
'select()' returned 1:1 mapping between keys and columns
Loading hg19 length data...
Fetching GO annotations...
Calculating the p-values...
'select()' returned 1:1 mapping between keys and columns
Generating OUT/GOSEQ.RES.Ax4.Bx8.GO.csv, overwriting previous existing version.
Written GO categories, now reverse mapping
Generating OUT/GSEPD.RES.Ax4.Bx8.GO2.csv
Generating OUT/GSEPD.RES.Ax4.Bx8.MERGE.csv
Generating OUT/GSEPD.PCA_AG.Ax4.Bx8.pdf
Generating OUT/GSEPD.PCA_DEG.Ax4.Bx8.pdf
Generating OUT/SCA.GSEPD.Ax4.Bx8.pdf
Calculating Projections and Segregation Significance
Generating OUT/GSEPD.HMA.Ax4.Bx8.pdf, overwriting previous existing version.
Generating OUT/GSEPD.HMA.Ax4.Bx8.csv
All Done!
>   GSEPD_DEGHeatmap(G) # all parameters automatic
Generating OUT/HM.Ax4.Bx8.154.pdf, overwriting previous existing version.
png 
  2 
>   
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>