Last data update: 2014.03.03

R: Plot expression patterns of top ranked genes.
PlotTopPCOPAR Documentation

Plot expression patterns of top ranked genes.

Description

It first sorts the expression value exprslist[[i]]$exprs[j,] among the baseline samples(e.g. normal ones) and comparison group (e.g. tumor ones)seperately for selected gene j, and then plot the sorted expression values. The first argument exprslist should be the same one as for PCOPA; the second argument PCOPAresult should be an output of PCOPA; the third argument topcut determines how far we would go down the top ranked list; and the last argument typelist is a vector specifying the titles for each graph corresponds to a specific study.

Usage

PlotTopPCOPA(exprslist, PCOPAresult, topcut, typelist)

Arguments

exprslist

Each element of exprslist is a list with the first element being exprs and the second element being classlab. Each row of exprs represents one gene and each column represents one sample. classlab is a zero-one vector indicating the status of samples. We use 0 for the baseline group, usually the normal group, and 1 for the comparison group, usually the tumor group.

PCOPAresult

Output of PCOPA.

topcut

Cutoff of top ranked gene list.

typelist

A vector specifying the titles for each graph corresponds to a specific study.

Author(s)

Michael Ochs, Yingying Wei

Examples

#read in data
data(Exon_exprs_matched)
data(Methy_exprs_matched)
data(CNV_exprs_matched)
data(Exon_classlab_matched)
data(Methy_classlab_matched)
data(CNV_classlab_matched)
head(Exon_exprs_matched)

#exprslist[[i]]$exprs should be in matrix format
Exon_exprs<-as.matrix(Exon_exprs_matched)
Methy_exprs<-as.matrix(Methy_exprs_matched)
CNV_exprs<-as.matrix(CNV_exprs_matched)

#exprslist[[i]]$classlab should be in vector format
Exon_classlab<-unlist(Exon_classlab_matched)
Methy_classlab<-unlist(Methy_classlab_matched)
CNV_classlab<-unlist(CNV_classlab_matched)

#make an exprslist consisting 3 studies
trylist<-list()
trylist[[1]]<-list(exprs=Exon_exprs,classlab=Exon_classlab)
trylist[[2]]<-list(exprs=Methy_exprs,classlab=Methy_classlab)
trylist[[3]]<-list(exprs=CNV_exprs,classlab=CNV_classlab)

#calculate P-value based statistics for outlier gene detection and output the outlier gene list for each patient
a7<-PCOPA(trylist,0.05,side=c("up","down","up"),type="subtype")

#plot expression patterns of top ranked genes. 
PlotTopPCOPA(trylist,a7,topcut=1,typelist=c("Exon","Methy","CNV"))

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(coGPS)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/coGPS/PlotTopPCOPA.Rd_%03d_medium.png", width=480, height=480)
> ### Name: PlotTopPCOPA
> ### Title: Plot expression patterns of top ranked genes.
> ### Aliases: PlotTopPCOPA
> 
> ### ** Examples
> 
> #read in data
> data(Exon_exprs_matched)
> data(Methy_exprs_matched)
> data(CNV_exprs_matched)
> data(Exon_classlab_matched)
> data(Methy_classlab_matched)
> data(CNV_classlab_matched)
> head(Exon_exprs_matched)
              X1       X2       X3       X4       X5       X6       X7       X8
TTLL10  6.717344 7.037852 6.767719 6.420387 6.327140 6.021260 6.802958 6.565168
B3GALT6 6.391804 7.063906 7.088237 6.923357 6.437467 6.271908 6.253419 6.680198
SCNN1D  6.439294 7.363256 6.960123 6.329735 6.056324 6.063382 6.697751 6.466480
PUSL1   6.977590 7.238936 7.501508 6.716543 6.929376 6.472690 6.959503 7.145005
VWA1    8.652309 9.483455 9.331383 8.586654 8.117134 7.992744 8.644902 8.958962
ATAD3B  5.597828 6.759150 6.568391 6.101554 6.011183 5.283774 6.215293 6.317223
              X9      X10      X11      X12      X13      X14      X15      X16
TTLL10  6.765813 7.370351 7.296460 7.029949 7.035034 6.778046 6.342316 6.638865
B3GALT6 6.782816 6.984191 6.841483 6.882356 6.827630 6.830731 6.501511 6.505848
SCNN1D  6.392550 7.245926 7.327243 7.197378 7.265614 6.855853 6.382801 6.507529
PUSL1   6.946383 7.540651 7.309493 7.006620 6.746047 6.625370 6.413635 6.879022
VWA1    9.187475 9.139831 9.202465 8.940639 8.835697 8.446824 8.486203 8.584459
ATAD3B  5.407129 7.695888 6.784873 6.744911 7.672325 6.120150 6.306978 6.036962
             X17      X18      X19      X20      X21      X22      X23      X24
TTLL10  6.630275 6.880321 5.822085 6.938988 6.155770 7.255672 6.539775 6.728796
B3GALT6 6.662160 6.864900 6.378942 6.669006 6.774910 7.224341 6.515777 7.067236
SCNN1D  6.960951 6.885746 6.410952 6.750683 6.159458 7.201927 6.175093 6.553313
PUSL1   7.038580 6.936754 6.832866 6.672017 6.896562 7.080499 6.749687 6.979493
VWA1    8.823299 8.937490 8.255057 8.538660 8.317646 9.156729 8.781056 8.685218
ATAD3B  6.022810 6.227742 5.806159 6.844010 5.504515 6.828893 5.737992 6.101854
             X25      X26      X28      X29      X30      X31      X32      X34
TTLL10  7.349511 6.222901 6.450357 7.155907 6.142837 6.941349 6.993922 7.347530
B3GALT6 6.610331 6.561367 6.889000 7.143500 6.105871 6.758780 6.694823 7.107328
SCNN1D  7.213324 6.397252 6.945769 7.344438 5.940604 6.942353 7.071245 7.211935
PUSL1   6.917890 6.919865 6.875544 7.145978 6.398197 6.766223 6.691729 7.075981
VWA1    9.123007 8.053801 8.533527 9.048422 7.954419 9.035219 8.889461 9.149951
ATAD3B  7.734609 5.713086 5.815728 7.259397 6.226590 6.976508 6.476074 7.234955
             X36      X37      X39      X40      X42      X43      X44      X45
TTLL10  7.326101 7.311347 6.991544 7.045667 7.096191 6.881008 7.437047 6.261925
B3GALT6 7.169580 6.767356 6.811405 6.741186 6.794087 6.572717 7.035525 6.389907
SCNN1D  7.452910 7.167752 6.952759 7.077353 7.100853 6.398965 7.420180 6.163163
PUSL1   7.335138 7.274647 7.045931 6.995847 7.192199 7.181268 7.613215 6.572634
VWA1    9.626447 9.075283 9.253604 9.613301 9.175428 8.655518 9.693675 8.487168
ATAD3B  7.252187 7.036508 6.322563 5.658568 6.619566 7.352853 7.579946 5.248414
             X46      X48      X49      X50     X101     X102     X103     X104
TTLL10  6.091281 6.351090 7.245919 6.332631 6.175444 6.526325 6.993948 6.352198
B3GALT6 6.268075 6.468479 6.795439 6.243039 6.155962 6.478274 6.793457 6.618019
SCNN1D  6.235057 6.316706 7.268961 5.908808 6.098997 6.545779 7.010997 6.481817
PUSL1   6.666450 6.947142 7.395174 6.200799 6.601731 7.205105 7.151909 6.590461
VWA1    8.176575 8.206245 9.048180 7.820119 8.308915 8.850597 9.206188 8.536567
ATAD3B  5.443310 5.591231 7.586484 4.724622 5.468589 6.480090 6.379689 5.717596
            X105     X106     X107     X108     X109     X110     X111     X112
TTLL10  6.057432 6.169847 6.743647 6.580217 6.934032 7.002434 7.468342 7.144143
B3GALT6 6.387443 6.384970 6.634314 6.592694 6.500949 7.084170 6.950996 6.835831
SCNN1D  6.188529 6.273794 6.594849 6.656638 6.902333 7.204583 7.272807 6.995456
PUSL1   6.757143 6.769657 7.081627 7.106480 6.948968 6.821125 7.369567 7.035014
VWA1    8.480613 8.558919 8.838223 8.963497 8.758554 8.905375 9.374813 9.197508
ATAD3B  5.276746 5.326817 5.803382 6.389514 6.946244 7.564640 7.058470 7.091069
            X113     X114     X115     X116     X117     X118     X119     X120
TTLL10  7.032456 7.114646 7.805640 7.090285 6.008772 7.053594 6.452542 6.986286
B3GALT6 6.868740 6.665759 7.304095 6.738399 6.146693 7.035733 6.385679 6.808980
SCNN1D  7.022062 7.123668 7.591675 7.072867 6.119495 7.033086 6.438129 7.010724
PUSL1   7.130521 6.882828 7.205286 7.078629 6.709224 7.353354 6.734967 6.991307
VWA1    8.926076 8.759304 9.805158 9.191159 8.188826 9.503163 8.593098 8.815196
ATAD3B  6.765420 6.781535 6.995158 7.384282 5.049811 5.806972 6.209759 6.538271
            X121     X122     X123     X124     X125
TTLL10  7.373057 7.092566 6.261309 7.203535 7.326272
B3GALT6 6.869633 6.900112 6.684478 6.755753 6.918623
SCNN1D  7.378726 7.159766 6.276814 7.275432 7.279676
PUSL1   6.823601 7.409655 6.473880 7.112525 6.986746
VWA1    8.680673 9.185197 8.173928 9.103608 9.039881
ATAD3B  7.195699 7.346750 5.895025 6.950708 7.117018
> 
> #exprslist[[i]]$exprs should be in matrix format
> Exon_exprs<-as.matrix(Exon_exprs_matched)
> Methy_exprs<-as.matrix(Methy_exprs_matched)
> CNV_exprs<-as.matrix(CNV_exprs_matched)
> 
> #exprslist[[i]]$classlab should be in vector format
> Exon_classlab<-unlist(Exon_classlab_matched)
> Methy_classlab<-unlist(Methy_classlab_matched)
> CNV_classlab<-unlist(CNV_classlab_matched)
> 
> #make an exprslist consisting 3 studies
> trylist<-list()
> trylist[[1]]<-list(exprs=Exon_exprs,classlab=Exon_classlab)
> trylist[[2]]<-list(exprs=Methy_exprs,classlab=Methy_classlab)
> trylist[[3]]<-list(exprs=CNV_exprs,classlab=CNV_classlab)
> 
> #calculate P-value based statistics for outlier gene detection and output the outlier gene list for each patient
> a7<-PCOPA(trylist,0.05,side=c("up","down","up"),type="subtype")
> 
> #plot expression patterns of top ranked genes. 
> PlotTopPCOPA(trylist,a7,topcut=1,typelist=c("Exon","Methy","CNV"))
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>