cummerbund how to get matrix for csheatmap
1
0
Entering edit mode
@adrian-johnson-2728
Last seen 4.6 years ago
Hi: I am trying to plot the most significant genes. I have 3 different sample types and 4 replicates each. Could anyone suggest how do I get the matrix of fpkm values that was plotted in csHeatmap function. > diffGeneIDs <- getSig(cuff,level="genes",alpha=0.001) > diffGenes<-getGenes(cuff,diffGeneIDs) >h<-csHeatmap(diffGenes,cluster='both') the heatmap gene names are not visible. I want to get the matrix for h and plot heatmap using another heatmap function. How do I get the matrix for h. thanks Adrian > sessionInfo() R version 2.15.2 (2012-10-26) Platform: i386-w64-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C LC_TIME=English_United States.1252 attached base packages: [1] grid stats graphics grDevices utils datasets methods base other attached packages: [1] cummeRbund_2.0.0 Gviz_1.2.1 rtracklayer_1.18.2 GenomicRanges_1.10.7 IRanges_1.16.6 fastcluster_1.1.8 reshape2_1.2.2 [8] ggplot2_0.9.3 RSQLite_0.11.2 DBI_0.2-5 BiocGenerics_0.4.0 loaded via a namespace (and not attached): [1] AnnotationDbi_1.20.4 Biobase_2.18.0 biomaRt_2.14.0 Biostrings_2.26.3 biovizBase_1.6.2 bitops_1.0-5 [7] BSgenome_1.26.1 cluster_1.14.3 colorspace_1.2-1 dichromat_2.0-0 digest_0.6.3 GenomicFeatures_1.10.2 [13] gtable_0.1.2 Hmisc_3.10-1 labeling_0.1 lattice_0.20-13 MASS_7.3-23 munsell_0.4 [19] parallel_2.15.2 plyr_1.8 proto_0.3-10 RColorBrewer_1.0-5 RCurl_1.95-3 Rsamtools_1.10.2 [25] scales_0.2.3 stats4_2.15.2 stringr_0.6.2 tools_2.15.2 XML_3.95-0.1 zlibbioc_1.4.0
• 2.3k views
ADD COMMENT
0
Entering edit mode
@valerie-obenchain-4275
Last seen 2.9 years ago
United States
Hi Adrian, If we follow the example in the vignette we eventually get to these lines which I think are similar to what you are showing below. From vignette: ... data(sampleData) myGeneIds<-sampleIDs myGeneIds myGenes<-getGenes(cuff,myGeneIds) myGenes head(fpkm(myGenes)) h<-csHeatmap(myGenes,cluster='both') To get the data plotted in csHeatmap() you'll want to look inside the the 'myGenes' object. > myGenes CuffGeneSet instance for 20 genes Slots: annotation fpkm repFpkm diff count isoforms CuffFeatureSet instance of size 45 TSS CuffFeatureSet instance of size 23 CDS CuffFeatureSet instance of size 36 promoters CuffFeatureSet instance of size 20 splicing CuffFeatureSet instance of size 23 relCDS CuffFeatureSet instance of size 20 Each of the slots has an accessor and I think fpkm() is what your are looking for. > head(fpkm(myGenes)) gene_id sample_name fpkm conf_hi conf_lo quant_status 1 XLOC_000069 Fibroblasts 2.05083e-01 8.94501e-01 0.000 OK 2 XLOC_000069 hESC 1.77686e+02 2.15888e+02 139.484 OK 3 XLOC_000069 iPS 1.90000e+01 3.88149e+01 0.000 OK 4 XLOC_000089 Fibroblasts 1.39701e+04 2.19187e+04 6021.450 OK 5 XLOC_000089 hESC 7.18339e+03 7.92296e+03 6443.810 OK 6 XLOC_000089 iPS 1.41690e+03 1.96558e+03 868.215 OK stdev 1 0.344709 2 19.101000 3 9.907450 Valerie On 03/01/13 10:05, Adrian Johnson wrote: > Hi: > I am trying to plot the most significant genes. I have 3 different > sample types and 4 replicates each. Could anyone suggest how do I get > the matrix of fpkm values that was plotted in csHeatmap function. > >> diffGeneIDs <- getSig(cuff,level="genes",alpha=0.001) >> diffGenes<-getGenes(cuff,diffGeneIDs) >> h<-csHeatmap(diffGenes,cluster='both') > > the heatmap gene names are not visible. I want to get the matrix for h > and plot heatmap using another heatmap function. > How do I get the matrix for h. > > thanks > Adrian > > > > > > > > >> sessionInfo() > R version 2.15.2 (2012-10-26) > Platform: i386-w64-mingw32/i386 (32-bit) > > locale: > [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United > States.1252 LC_MONETARY=English_United States.1252 > [4] LC_NUMERIC=C LC_TIME=English_United > States.1252 > > attached base packages: > [1] grid stats graphics grDevices utils datasets > methods base > > other attached packages: > [1] cummeRbund_2.0.0 Gviz_1.2.1 rtracklayer_1.18.2 > GenomicRanges_1.10.7 IRanges_1.16.6 fastcluster_1.1.8 > reshape2_1.2.2 > [8] ggplot2_0.9.3 RSQLite_0.11.2 DBI_0.2-5 > BiocGenerics_0.4.0 > > loaded via a namespace (and not attached): > [1] AnnotationDbi_1.20.4 Biobase_2.18.0 biomaRt_2.14.0 > Biostrings_2.26.3 biovizBase_1.6.2 bitops_1.0-5 > [7] BSgenome_1.26.1 cluster_1.14.3 colorspace_1.2-1 > dichromat_2.0-0 digest_0.6.3 > GenomicFeatures_1.10.2 > [13] gtable_0.1.2 Hmisc_3.10-1 labeling_0.1 > lattice_0.20-13 MASS_7.3-23 munsell_0.4 > [19] parallel_2.15.2 plyr_1.8 proto_0.3-10 > RColorBrewer_1.0-5 RCurl_1.95-3 Rsamtools_1.10.2 > [25] scales_0.2.3 stats4_2.15.2 stringr_0.6.2 > tools_2.15.2 XML_3.95-0.1 zlibbioc_1.4.0 > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT
0
Entering edit mode
To follow up, there also exists an fpkmMatrix() method to reshape the fpkm results into a feature X condition matrix, e.g.: fpkmMatrix(myGenes) Cheers, Loyal On Mar 5, 2013, at 11:17 PM, Valerie Obenchain <vobencha at="" fhcrc.org=""> wrote: > Hi Adrian, > > If we follow the example in the vignette we eventually get to these lines which I think are similar to what you are showing below. > > From vignette: > ... > > data(sampleData) > myGeneIds<-sampleIDs > myGeneIds > myGenes<-getGenes(cuff,myGeneIds) > myGenes > head(fpkm(myGenes)) > h<-csHeatmap(myGenes,cluster='both') > > > To get the data plotted in csHeatmap() you'll want to look inside the the 'myGenes' object. > > > myGenes > CuffGeneSet instance for 20 genes > > Slots: > annotation > fpkm > repFpkm > diff > count > isoforms CuffFeatureSet instance of size 45 > TSS CuffFeatureSet instance of size 23 > CDS CuffFeatureSet instance of size 36 > promoters CuffFeatureSet instance of size 20 > splicing CuffFeatureSet instance of size 23 > relCDS CuffFeatureSet instance of size 20 > > Each of the slots has an accessor and I think fpkm() is what your are looking for. > > > head(fpkm(myGenes)) > gene_id sample_name fpkm conf_hi conf_lo quant_status > 1 XLOC_000069 Fibroblasts 2.05083e-01 8.94501e-01 0.000 OK > 2 XLOC_000069 hESC 1.77686e+02 2.15888e+02 139.484 OK > 3 XLOC_000069 iPS 1.90000e+01 3.88149e+01 0.000 OK > 4 XLOC_000089 Fibroblasts 1.39701e+04 2.19187e+04 6021.450 OK > 5 XLOC_000089 hESC 7.18339e+03 7.92296e+03 6443.810 OK > 6 XLOC_000089 iPS 1.41690e+03 1.96558e+03 868.215 OK > stdev > 1 0.344709 > 2 19.101000 > 3 9.907450 > > > Valerie > > > On 03/01/13 10:05, Adrian Johnson wrote: >> Hi: >> I am trying to plot the most significant genes. I have 3 different >> sample types and 4 replicates each. Could anyone suggest how do I get >> the matrix of fpkm values that was plotted in csHeatmap function. >> >>> diffGeneIDs <- getSig(cuff,level="genes",alpha=0.001) >>> diffGenes<-getGenes(cuff,diffGeneIDs) >>> h<-csHeatmap(diffGenes,cluster='both') >> >> the heatmap gene names are not visible. I want to get the matrix for h >> and plot heatmap using another heatmap function. >> How do I get the matrix for h. >> >> thanks >> Adrian >> >> >> >> >> >> >> >> >>> sessionInfo() >> R version 2.15.2 (2012-10-26) >> Platform: i386-w64-mingw32/i386 (32-bit) >> >> locale: >> [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United >> States.1252 LC_MONETARY=English_United States.1252 >> [4] LC_NUMERIC=C LC_TIME=English_United >> States.1252 >> >> attached base packages: >> [1] grid stats graphics grDevices utils datasets >> methods base >> >> other attached packages: >> [1] cummeRbund_2.0.0 Gviz_1.2.1 rtracklayer_1.18.2 >> GenomicRanges_1.10.7 IRanges_1.16.6 fastcluster_1.1.8 >> reshape2_1.2.2 >> [8] ggplot2_0.9.3 RSQLite_0.11.2 DBI_0.2-5 >> BiocGenerics_0.4.0 >> >> loaded via a namespace (and not attached): >> [1] AnnotationDbi_1.20.4 Biobase_2.18.0 biomaRt_2.14.0 >> Biostrings_2.26.3 biovizBase_1.6.2 bitops_1.0-5 >> [7] BSgenome_1.26.1 cluster_1.14.3 colorspace_1.2-1 >> dichromat_2.0-0 digest_0.6.3 >> GenomicFeatures_1.10.2 >> [13] gtable_0.1.2 Hmisc_3.10-1 labeling_0.1 >> lattice_0.20-13 MASS_7.3-23 munsell_0.4 >> [19] parallel_2.15.2 plyr_1.8 proto_0.3-10 >> RColorBrewer_1.0-5 RCurl_1.95-3 Rsamtools_1.10.2 >> [25] scales_0.2.3 stats4_2.15.2 stringr_0.6.2 >> tools_2.15.2 XML_3.95-0.1 zlibbioc_1.4.0 >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at r-project.org >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD REPLY
0
Entering edit mode
Thank you Valerie and Loyal. That was helpful. Adrian On Tue, Mar 5, 2013 at 11:24 PM, Loyal Goff <lgoff at="" csail.mit.edu=""> wrote: > To follow up, there also exists an fpkmMatrix() method to reshape the fpkm results into a feature X condition matrix, e.g.: > > fpkmMatrix(myGenes) > > Cheers, > Loyal > > On Mar 5, 2013, at 11:17 PM, Valerie Obenchain <vobencha at="" fhcrc.org=""> wrote: > >> Hi Adrian, >> >> If we follow the example in the vignette we eventually get to these lines which I think are similar to what you are showing below. >> >> From vignette: >> ... >> >> data(sampleData) >> myGeneIds<-sampleIDs >> myGeneIds >> myGenes<-getGenes(cuff,myGeneIds) >> myGenes >> head(fpkm(myGenes)) >> h<-csHeatmap(myGenes,cluster='both') >> >> >> To get the data plotted in csHeatmap() you'll want to look inside the the 'myGenes' object. >> >> > myGenes >> CuffGeneSet instance for 20 genes >> >> Slots: >> annotation >> fpkm >> repFpkm >> diff >> count >> isoforms CuffFeatureSet instance of size 45 >> TSS CuffFeatureSet instance of size 23 >> CDS CuffFeatureSet instance of size 36 >> promoters CuffFeatureSet instance of size 20 >> splicing CuffFeatureSet instance of size 23 >> relCDS CuffFeatureSet instance of size 20 >> >> Each of the slots has an accessor and I think fpkm() is what your are looking for. >> >> > head(fpkm(myGenes)) >> gene_id sample_name fpkm conf_hi conf_lo quant_status >> 1 XLOC_000069 Fibroblasts 2.05083e-01 8.94501e-01 0.000 OK >> 2 XLOC_000069 hESC 1.77686e+02 2.15888e+02 139.484 OK >> 3 XLOC_000069 iPS 1.90000e+01 3.88149e+01 0.000 OK >> 4 XLOC_000089 Fibroblasts 1.39701e+04 2.19187e+04 6021.450 OK >> 5 XLOC_000089 hESC 7.18339e+03 7.92296e+03 6443.810 OK >> 6 XLOC_000089 iPS 1.41690e+03 1.96558e+03 868.215 OK >> stdev >> 1 0.344709 >> 2 19.101000 >> 3 9.907450 >> >> >> Valerie >> >> >> On 03/01/13 10:05, Adrian Johnson wrote: >>> Hi: >>> I am trying to plot the most significant genes. I have 3 different >>> sample types and 4 replicates each. Could anyone suggest how do I get >>> the matrix of fpkm values that was plotted in csHeatmap function. >>> >>>> diffGeneIDs <- getSig(cuff,level="genes",alpha=0.001) >>>> diffGenes<-getGenes(cuff,diffGeneIDs) >>>> h<-csHeatmap(diffGenes,cluster='both') >>> >>> the heatmap gene names are not visible. I want to get the matrix for h >>> and plot heatmap using another heatmap function. >>> How do I get the matrix for h. >>> >>> thanks >>> Adrian >>> >>> >>> >>> >>> >>> >>> >>> >>>> sessionInfo() >>> R version 2.15.2 (2012-10-26) >>> Platform: i386-w64-mingw32/i386 (32-bit) >>> >>> locale: >>> [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United >>> States.1252 LC_MONETARY=English_United States.1252 >>> [4] LC_NUMERIC=C LC_TIME=English_United >>> States.1252 >>> >>> attached base packages: >>> [1] grid stats graphics grDevices utils datasets >>> methods base >>> >>> other attached packages: >>> [1] cummeRbund_2.0.0 Gviz_1.2.1 rtracklayer_1.18.2 >>> GenomicRanges_1.10.7 IRanges_1.16.6 fastcluster_1.1.8 >>> reshape2_1.2.2 >>> [8] ggplot2_0.9.3 RSQLite_0.11.2 DBI_0.2-5 >>> BiocGenerics_0.4.0 >>> >>> loaded via a namespace (and not attached): >>> [1] AnnotationDbi_1.20.4 Biobase_2.18.0 biomaRt_2.14.0 >>> Biostrings_2.26.3 biovizBase_1.6.2 bitops_1.0-5 >>> [7] BSgenome_1.26.1 cluster_1.14.3 colorspace_1.2-1 >>> dichromat_2.0-0 digest_0.6.3 >>> GenomicFeatures_1.10.2 >>> [13] gtable_0.1.2 Hmisc_3.10-1 labeling_0.1 >>> lattice_0.20-13 MASS_7.3-23 munsell_0.4 >>> [19] parallel_2.15.2 plyr_1.8 proto_0.3-10 >>> RColorBrewer_1.0-5 RCurl_1.95-3 Rsamtools_1.10.2 >>> [25] scales_0.2.3 stats4_2.15.2 stringr_0.6.2 >>> tools_2.15.2 XML_3.95-0.1 zlibbioc_1.4.0 >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor at r-project.org >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >> >
ADD REPLY

Login before adding your answer.

Traffic: 548 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6