Last data update: 2014.03.03

R: PAM50 permutation test results reports
subjectReport,PAM50-methodR Documentation

PAM50 permutation test results reports

Description

subjectReport is basically a grid.arrange object which basically consists of three main parts: a summary table, a two row ggplot2 facet_wrap with scatter ggplots (Wickham 2009) of subject expression and PAM50 centroids (Perou et al. 2000 & 2010) and a textGrob with the simulation parameter used. Particularly:

tableGrob

with the following fields:

$Summary

subject name, PAM50 and Permuted subtype

$Fields

for the five PAM50 subtypes:

  • Correlation: PAM50 centroid correlation with observed subject exprs.

  • p-value: permutation p-value obtained using the simulation.

  • FDR: adjusted p-value using False Discovery Rate.

ggplot facet_wrap

two rows to display scatter subject exprs vs PAM50 centroids, in addition to a the linear regression fix. If subject, has an unique subtype, then the graph is in red. In addition, if simulated permutations were run with keep=TRUE option, then null distribution boxplots are plotted with observed correlations as a big round point.

textGrob

the permutation @parameter slot used in the simulation.

Usage

## S4 method for signature 'PAM50'
subjectReport(object, subject)   

## S4 method for signature 'PAM50'
databaseReport(object, fileName, ...,  
    verbose = getOption("verbose", default = TRUE))   

## S4 method for signature 'PAM50'
summary(object, ...)   

Arguments

object

a PAM50 object.

subject

integer to select the appropriate subject to report.

fileName

character with the name of the pdf report file to save.

...

additional parameters for pdf function call.

verbose

should the user feedback be displayed? By default value is "verbose" global option parameter, if present, or FALSE otherwise.

Details

summary it basically prints descriptive data of PAM50 dataset, the test parameters used, a frequency table of PAM50 Subtypes and a contingency table with Classes vs PAM50 Subtypes.

databaseReport basically is a pdf report where the first page is a global summary of the database, i.e., a summary contingency table of permutation test classes against original PAM50 subtypes results. The following pages are the database respective subjectReport outputs.

Value

depending on function call:

subjectReport

a grid.arrange object.

databaseReport

a pdf file with database summary and subjectReports.

summary

Console summary statistics plus a data.frame

Author(s)

Cristobal Fresno cfresno@bdmg.com.ar, German A. Gonzalez ggonzalez@bdmg.com.ar, Andrea S. Llera allera@leloir.org.ar and Elmer Andres Fernandez efernandez@bdmg.com.ar

References

  1. Perou CM, Sorlie T, Eisen MB, et al., 2000, Molecular portraits of human breast tumors. Nature 406:747-752.

  2. Perou CM, Parker JS, Prat A, Ellis MJ, Bernard PB., 2010, Clinical implementation of the intrinsic subtypes of breast cancer, The Lancet Oncology 11(8):718-719.

  3. Wickham H, ggplot2: elegant graphics for data analysis. Springer New York, 2009.

See Also

PAM50 for a complete example.

Other PAM50: as, classify,PAM50-method, filtrate,PAM50-method, pam50centroids, permutate,PAM50-method, subtypes,PAM50-method

Other PAM50: as, classify,PAM50-method, filtrate,PAM50-method, pam50centroids, permutate,PAM50-method, subtypes,PAM50-method

Other PAM50: as, classify,PAM50-method, filtrate,PAM50-method, pam50centroids, permutate,PAM50-method, subtypes,PAM50-method

Examples

##Using pam50centroids package example data
data(pam50centroids)
pam50centroids

##This object has already run filtrate, classify and permutate. So, now  
##we can obtain some reports:
##1) database summary  
summary(pam50centroids)

##2)Individual subject report. If keep=FALSE boxplot panel is not available   
subjectReport(pam50centroids, subject=1)##Basal subtype  
subjectReport(pam50centroids, subject=1)##Her2 subtype  

##3) complete database report 
#databaseReport(pam50centroids, fileName="PAM50.pdf", verbose=TRUE)  

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(pbcmc)
Loading required package: genefu
Loading required package: survcomp
Loading required package: survival
Loading required package: prodlim
Loading required package: mclust
Package 'mclust' version 5.2
Type 'citation("mclust")' for citing this R package in publications.
Loading required package: limma
Loading required package: biomaRt
Loading required package: iC10
Loading required package: pamr
Loading required package: cluster
Loading required package: iC10TrainingData
Loading required package: AIMS
Loading required package: e1071
Loading required package: Biobase
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 object is masked from 'package:limma':

    plotMA

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

Welcome to Bioconductor

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

No methods found in "BiocGenerics" for requests: unlist
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/pbcmc/PAM50SubjectReport.Rd_%03d_medium.png", width=480, height=480)
> ### Name: subjectReport,PAM50-method
> ### Title: PAM50 permutation test results reports
> ### Aliases: databaseReport,PAM50-method subjectReport,PAM50-method
> ###   summary,PAM50-method
> 
> ### ** Examples
> 
> ##Using pam50centroids package example data
> data(pam50centroids)
> pam50centroids
A PAM50 molecular permutation classifier object
Dimensions:
           nrow ncol
exprs        50    5
annotation   50    3
targets       0    0
Classification: 
            nrow ncol
probability    5    5
correlation    5    5
$subtype

 Basal   Her2   LumA   LumB Normal 
     1      1      1      1      1 

Permutations test ran with following parameters:
 Permutations=10000, fdr<0.01, corCutoff>0.1, keep=TRUE
Permutation: 
correlation available: TRUE 
        nrow ncol
pvalues    5    5
fdr        5    5
subtype    5    5
> 
> ##This object has already run filtrate, classify and permutate. So, now  
> ##we can obtain some reports:
> ##1) database summary  
> summary(pam50centroids)
PAM50 Permutation Test results!!! 

Permutations: 10000
pcutoff < 0.01
corCutoff > 0.1

Global results:
Assigned 
       5 
Particular results:
              Subtype
Classes        Basal Her2 LumA LumB Normal Not Assigned
  Basal            1    0    0    0      0            0
  Her2             0    1    0    0      0            0
  LumA             0    0    1    0      0            0
  LumB             0    0    0    1      0            0
  Normal           0    0    0    0      1            0
  Not Assigned     0    0    0    0      0            0
> 
> ##2)Individual subject report. If keep=FALSE boxplot panel is not available   
> subjectReport(pam50centroids, subject=1)##Basal subtype  
> subjectReport(pam50centroids, subject=1)##Her2 subtype  
> 
> ##3) complete database report 
> #databaseReport(pam50centroids, fileName="PAM50.pdf", verbose=TRUE)  
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>