Entering edit mode
2.1 years ago
michelafrancesconi8
▴
10
I try to do a matrix for plotting a EnrichHeatmap but with the command normalizeToMatrix I have a matrix with only zero (when I plot the EnrichHeatmap is white) and I don't understand which is the problem because I don't have any error when I do the commands , can someone help me?
tss <- getPromoters(TxDb=txdb, upstream=500, downstream=500)
tss[1:3]
GRanges object with 3 ranges and 0 metadata columns:
seqnames ranges strand
<Rle> <IRanges> <Rle>
[1] chrI 5107333-5108333 +
[2] chrIV 9601195-9602195 -
[3] chrV 9245860-9246860 -
intestine_gr <- makeGRangesFromDataFrame(intestine, keep.extra.columns = TRUE)
intestine_gr[1:3]
GRanges object with 3 ranges and 14 metadata columns:
seqnames ranges strand | V4 V5
<Rle> <IRanges> <Rle> | <character> <numeric>
7015 chrX 9838425 * | peak_C1_H3K4me3_peak.. 5.19002
653 chrI 7602023 * | peak_C1_H3K4me3_peak.. 15.02140
6284 chrX 760757 * | peak_C1_H3K4me3_peak.. 7.93376
mat1 <- normalizeToMatrix(intestine_gr, tss, value_column = "V5", extend = 5000, mean_mode = "w0", w = 50)
> mat1
Normalize intestine_gr to tss:
Upstream 5000 bp (100 windows)
Downstream 5000 bp (100 windows)
Include target regions (44 windows)
61451 target regions
sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)
Matrix products: default
locale:
[1] LC_COLLATE=Italian_Italy.1252 LC_CTYPE=Italian_Italy.1252 LC_MONETARY=Italian_Italy.1252
[4] LC_NUMERIC=C LC_TIME=Italian_Italy.1252
attached base packages:
[1] grid stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] circlize_0.4.15 EnrichedHeatmap_1.24.0
[3] clusterProfiler_4.2.2 Rsamtools_2.10.0
[5] Biostrings_2.62.0 XVector_0.34.0
[7] ChIPQC_1.30.0 DiffBind_3.4.11
[9] ggplot2_3.3.6 edgeR_3.36.0
[11] limma_3.50.3 ComplexHeatmap_2.10.0
[13] DESeq2_1.34.0 SummarizedExperiment_1.24.0
[15] MatrixGenerics_1.6.0 matrixStats_0.62.0
[17] rlang_1.0.6 TxDb.Celegans.UCSC.ce11.ensGene_3.12.0
[19] GenomicFeatures_1.46.5 GenomicRanges_1.46.1
[21] GenomeInfoDb_1.30.1 org.Ce.eg.db_3.14.0
[23] AnnotationDbi_1.56.2 IRanges_2.28.0
[25] S4Vectors_0.32.4 Biobase_2.54.0
[27] BiocGenerics_0.40.0 ChIPseeker_1.30.3
loaded via a namespace (and not attached):
[1] utf8_1.2.2 tidyselect_1.1.2
[3] RSQLite_2.2.17 htmlwidgets_1.5.4
[5] BiocParallel_1.28.3 scatterpie_0.1.8
[7] munsell_0.5.0 codetools_0.2-18
[9] interp_1.1-3 systemPipeR_2.0.8
[11] withr_2.5.0 colorspace_2.0-3
[13] GOSemSim_2.20.0 filelock_1.0.2
[15] knitr_1.40 rstudioapi_0.14
[17] DOSE_3.20.1 bbmle_1.0.25
[19] GenomeInfoDbData_1.2.7 mixsqp_0.3-43
[21] hwriter_1.3.2.1 polyclip_1.10-0
[23] bit64_4.0.5 farver_2.1.1
[25] downloader_0.4 TxDb.Rnorvegicus.UCSC.rn4.ensGene_3.2.2
[27] coda_0.19-4 vctrs_0.4.1
[29] treeio_1.18.1 generics_0.1.3
[31] xfun_0.33 BiocFileCache_2.2.1
[33] R6_2.5.1 doParallel_1.0.17
[35] apeglm_1.16.0 clue_0.3-61
[37] graphlayouts_0.8.1 invgamma_1.1
[39] locfit_1.5-9.6 bitops_1.0-7
[41] cachem_1.0.6 fgsea_1.20.0
[43] gridGraphics_0.5-1 DelayedArray_0.20.0
[45] assertthat_0.2.1 BiocIO_1.4.0
[47] scales_1.2.1 ggraph_2.0.6
[49] enrichplot_1.14.2 gtable_0.3.1
[51] tidygraph_1.2.2 genefilter_1.76.0
[53] GlobalOptions_0.1.2 splines_4.1.3
[55] rtracklayer_1.54.0 lazyeval_0.2.2
[57] yaml_2.3.5 reshape2_1.4.4
[59] TxDb.Dmelanogaster.UCSC.dm3.ensGene_3.2.2 qvalue_2.26.0
[61] tools_4.1.3 ggplotify_0.1.0
[63] ellipsis_0.3.2 gplots_3.1.3
[65] jquerylib_0.1.4 RColorBrewer_1.1-3
[67] Rcpp_1.0.9 plyr_1.8.7
[69] progress_1.2.2 zlibbioc_1.40.0
[71] purrr_0.3.4 RCurl_1.98-1.8
[73] prettyunits_1.1.1 deldir_1.0-6
[75] GetoptLong_1.0.5 viridis_0.6.2
[77] ashr_2.2-54 chipseq_1.44.0
[79] ggrepel_0.9.1 cluster_2.1.2
[81] magrittr_2.0.3 magick_2.7.3
[83] TxDb.Hsapiens.UCSC.hg18.knownGene_3.2.2 data.table_1.14.2
[85] DO.db_2.9 truncnorm_1.0-8
[87] SQUAREM_2021.1 mvtnorm_1.1-3
[89] amap_0.8-18 TxDb.Mmusculus.UCSC.mm9.knownGene_3.2.2
[91] hms_1.1.2 patchwork_1.1.2
[93] evaluate_0.17 xtable_1.8-4
[95] XML_3.99-0.10 emdbook_1.3.12
[97] jpeg_0.1-9 gridExtra_2.3
[99] shape_1.4.6 bdsmatrix_1.3-6
[101] compiler_4.1.3 biomaRt_2.50.3
[103] tibble_3.1.8 KernSmooth_2.23-20
[105] crayon_1.5.2 shadowtext_0.1.2
[107] htmltools_0.5.3 ggfun_0.0.7
[109] tidyr_1.2.1 geneplotter_1.72.0
[111] aplot_0.1.7 DBI_1.1.3
[113] tweenr_2.0.2 dbplyr_2.2.1
[115] MASS_7.3-55 rappdirs_0.3.3
[117] boot_1.3-28 ShortRead_1.52.0
[119] Matrix_1.5-1 cli_3.3.0
[121] parallel_4.1.3 igraph_1.3.4
[123] pkgconfig_2.0.3 TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2
[125] GenomicAlignments_1.30.0 numDeriv_2016.8-1.1
[127] TxDb.Celegans.UCSC.ce6.ensGene_3.2.2 xml2_1.3.3
[129] foreach_1.5.2 ggtree_3.2.1
[131] annotate_1.72.0 bslib_0.4.0
[133] yulab.utils_0.0.5 stringr_1.4.1
[135] digest_0.6.29 rmarkdown_2.17
[137] fastmatch_1.1-3 tidytree_0.4.1
[139] GreyListChIP_1.26.0 restfulr_0.0.15
[141] curl_4.3.2 gtools_3.9.3
[143] rjson_0.2.21 lifecycle_1.0.3
[145] nlme_3.1-155 jsonlite_1.8.0
[147] BSgenome_1.62.0 viridisLite_0.4.1
[149] fansi_1.0.3 pillar_1.8.1
[151] Nozzle.R1_1.1-1.1 lattice_0.20-45
[153] KEGGREST_1.34.0 fastmap_1.1.0
[155] httr_1.4.4 plotrix_3.8-2
[157] survival_3.4-0 GO.db_3.14.0
[159] glue_1.6.2 png_0.1-7
[161] iterators_1.0.14 bit_4.0.4
[163] sass_0.4.2 ggforce_0.3.4
[165] stringi_1.7.6 blob_1.2.3
[167] TxDb.Mmusculus.UCSC.mm10.knownGene_3.10.0 latticeExtra_0.6-30
[169] caTools_1.18.2 memoise_2.0.1
[171] dplyr_1.0.10 irlba_2.3.5.1
[173] ape_5.6-2
I try also with 10kb, 100kb extend but in any case my matrix is with zero. I made the matrix with mean_mode but and with different extend and nothing change. Can someone help me?
Thank you
That actually looks very good, what you did there, so I can't tell you why your matrix consists entirely of 0 values.
However, I would rather map the raw H3K4me3 signal instead of the peaks, because there is not too much point in mapping a signal value of one base pair breadth on a spatial heatmap around a TSS. For a quick test, if that is the problem, try
resize(intestine_gr, width=5000)
or the like and see if you can now spot a visual signal on your heatmap.Thank you for the advice, I try it but the matrix is still empty.. I really don't understand which can be the problem