Git Product home page Git Product logo

regionreport's Introduction

regionReport

Lifecycle: stable Bioc release status Bioc devel status Bioc downloads rank Bioc support Bioc history Bioc last commit Bioc dependencies R build status GitHub issues GitHub pulls

Generate HTML reports for a set of regions such as those from derfinder results or any other pipeline that defines a set of genomic regions.

Check the documentation for derfinderReport() for an example on how to create the necessary input files and generating the HTML report for derfinder results. Or use:

example("derfinderReport", "regionReport", ask = FALSE)

Similarly, check renderReport() for an example of a general report, or use:

example("renderReport", "regionReport", ask = FALSE)

For DESeq2 or edgeR results check DESeq2Report() and edgeReport().

Documentation

For more information about derfinderPlot check the vignettes through Bioconductor or at the documentation website.

Installation instructions

Get the latest stable R release from CRAN. Then install regionReport from Bioconductor using the following code:

if (!requireNamespace("BiocManager", quietly = TRUE)) {
    install.packages("BiocManager")
}

BiocManager::install("regionReport")

Citation

Below is the citation output from using citation('regionReport') in R. Please run this yourself to check for any updates on how to cite regionReport.

print(citation("regionReport"), bibtex = TRUE)
#> To cite package 'regionReport' in publications use:
#> 
#>   Collado-Torres L, Jaffe AE, Leek JT (2016). "regionReport:
#>   Interactive reports for region-level and feature-level genomic
#>   analyses [version2; referees: 2 approved, 1 approved with
#>   reservations]." _F1000Research_, *4*, 105.
#>   doi:10.12688/f1000research.6379.2
#>   <https://doi.org/10.12688/f1000research.6379.2>,
#>   <http://f1000research.com/articles/4-105/v2>.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Article{,
#>     author = {Leonardo Collado-Torres and Andrew E. Jaffe and Jeffrey T. Leek},
#>     title = {regionReport: Interactive reports for region-level and feature-level genomic analyses [version2; referees: 2 approved, 1 approved with reservations]},
#>     journal = {F1000Research},
#>     year = {2016},
#>     doi = {10.12688/f1000research.6379.2},
#>     url = {http://f1000research.com/articles/4-105/v2},
#>     volume = {4},
#>     pages = {105},
#>   }
#> 
#>   Collado-Torres L, Nellore A, Frazee AC, Wilks C, Love MI, Langmead B,
#>   Irizarry RA, Leek JT, Jaffe AE (2017). "Flexible expressed region
#>   analysis for RNA-seq with derfinder." _Nucl. Acids Res._.
#>   doi:10.1093/nar/gkw852 <https://doi.org/10.1093/nar/gkw852>,
#>   <http://nar.oxfordjournals.org/content/early/2016/09/29/nar.gkw852>.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Article{,
#>     title = {Flexible expressed region analysis for RNA-seq with derfinder},
#>     author = {Leonardo Collado-Torres and Abhinav Nellore and Alyssa C. Frazee and Christopher Wilks and Michael I. Love and Ben Langmead and Rafael A. Irizarry and Jeffrey T. Leek and Andrew E. Jaffe},
#>     year = {2017},
#>     journal = {Nucl. Acids Res.},
#>     doi = {10.1093/nar/gkw852},
#>     url = {http://nar.oxfordjournals.org/content/early/2016/09/29/nar.gkw852},
#>   }
#> 
#>   Collado-Torres L, Jaffe AE, Leek JT (2017). _regionReport: Generate
#>   HTML or PDF reports for a set of genomic regions or DESeq2/edgeR
#>   results_. doi:10.18129/B9.bioc.regionReport
#>   <https://doi.org/10.18129/B9.bioc.regionReport>,
#>   https://github.com/leekgroup/regionReport - R package version 1.35.0,
#>   <http://www.bioconductor.org/packages/regionReport>.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {regionReport: Generate HTML or PDF reports for a set of genomic regions or DESeq2/edgeR results},
#>     author = {Leonardo Collado-Torres and Andrew E. Jaffe and Jeffrey T. Leek},
#>     year = {2017},
#>     url = {http://www.bioconductor.org/packages/regionReport},
#>     note = {https://github.com/leekgroup/regionReport - R package version 1.35.0},
#>     doi = {10.18129/B9.bioc.regionReport},
#>   }

Please note that the regionReport was only made possible thanks to many other R and bioinformatics software authors, which are cited either in the vignettes and/or the paper(s) describing this package.

Code of Conduct

Please note that the regionReport project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Development tools

For more details, check the dev directory.

This package was developed using biocthis.

regionreport's People

Contributors

dtenenba avatar hpages avatar jwokaty avatar lcolladotor avatar nturaga avatar vobencha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

regionreport's Issues

Error in mergeNamedAtomicVectors

I am using regionReport to create a report from my defined regions in the cattle genome (no annotation provided):

report <- renderReport(regions, "Example bumphunter", pvalueVars = NULL, 
    densityVars = c("Area" = "area", "Value" = "value", "Cluster Length" = "clusterL"
    ), significantVar = NULL, output = "report", outdir = "report", device = "png")

I got an error in the annotation part regarding sequence lengths. I checked my regions, and there are regions with 1 base, so I am assuming this can be the issue.

No annotationPackage supplied. Trying org.Hs.eg.db.
Getting TSS and TSE.
Getting CSS and CSE.
Getting exons.
Annotating genes.
Quitting from lines 187-196 (DMR_report.Rmd) 
Error in mergeNamedAtomicVectors(seqlengths(x), seqlengths(y), what = c("sequence",  : 
  sequences chr8, chr2, chr3, chr18, chr19, chr11, chr10, chr17, chr14, chr4, chrX, chr9, chr21, chr1, chr13, chr5, chr6, chr16, chr7, chr12, chr15, chr20, chr22 have incompatible seqlengths:
  - in 'x': 113319770, 136231102, 121005158, 65820629, 63449741, 106982474, 103308737, 73167244, 82403003, 120000601, 139009144, 105454467, 69862954, 158534110, 83472345, 120089316, 117806340, 81013979, 110682743, 87216183, 85007780, 71974595, 60773035
  - in 'y': 146364022, 243199373, 198022430, 78077248, 59128983, 135006516, 135534747, 81195210, 107349540, 191154276, 155270560, 141213431, 48129895, 249250621, 115169878, 180915260, 171115067, 90354753, 159138663, 133851895, 102531392, 63025520, 51304566

#input file used

regions
GRanges object with 9013 ranges and 5 metadata columns:
         seqnames            ranges strand |     value      area   cluster         L  clusterL
            <Rle>         <IRanges>  <Rle> | <numeric> <numeric> <numeric> <numeric> <integer>
     [1]     chr8          75774711      * |  2.949010   2.94901     15171         1         4
     [2]     chr2 51908666-51908808      * |  0.612535   2.45014      7016     27734         4
     [3]     chr3 45240960-45241205      * | -0.448404   3.58723     11459     29451         8
     [4]    chr18 18018893-18019002      * |  0.669870   1.33974      5206     15759         2
     [5]     chr3 52425936-52426038      * | -0.817302   1.63460     11511      6018         2
     ...      ...               ...    ... .       ...       ...       ...       ...       ...
  [9009]    chr22          50902400      * | -0.100129  0.100129      8774         1         1
  [9010]    chr24          22850168      * | -0.100121  0.100121      9363         1         8
  [9011]     chr4          27093075      * | -0.100118  0.100118     12293         1         2
  [9012]    chr11          41409299      * | -0.100041  0.100041      1774         1         3
  [9013]     chr2          73146781      * | -0.100036  0.100036      7167         1         3
  -------

Thank you

[BUG] Error when generating a DESeq2 HTML report passing a ggplot2 theme

Hello,

First, thanks a lot for this wonderful package!
I am getting an error when generating an HTML report passing a ggplot2 theme to the DESeq2Report function. The source code (regionReport/R/DESeq2Report.R) shows that the error is due to the verification in line 175. Should the function ggplot2::is.theme() be used instead of is() in this line?

I'll appreciate you taking a look into this issue.

Best,
Hector

Detailed info

All the Bioconductor packages (including regionReport) were installed via BiocManager::install() using R (v4.3.1) installed via Homebrew.

Minimally reproducible example

library('pasilla')
#> Loading required package: DEXSeq
#> Loading required package: BiocParallel
#> Loading required package: Biobase
#> Loading required package: BiocGenerics
#> 
#> Attaching package: 'BiocGenerics'
#> The following objects are masked from 'package:stats':
#> 
#>     IQR, mad, sd, var, xtabs
#> The following objects are masked from 'package:base':
#> 
#>     anyDuplicated, aperm, append, as.data.frame, basename, cbind,
#>     colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find,
#>     get, grep, grepl, intersect, is.unsorted, lapply, Map, mapply,
#>     match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
#>     Position, rank, rbind, Reduce, rownames, sapply, setdiff, sort,
#>     table, tapply, union, unique, unsplit, which.max, which.min
#> Welcome to Bioconductor
#> 
#>     Vignettes contain introductory material; view with
#>     'browseVignettes()'. To cite Bioconductor, see
#>     'citation("Biobase")', and for packages 'citation("pkgname")'.
#> Loading required package: SummarizedExperiment
#> Loading required package: MatrixGenerics
#> Loading required package: matrixStats
#> 
#> Attaching package: 'matrixStats'
#> The following objects are masked from 'package:Biobase':
#> 
#>     anyMissing, rowMedians
#> 
#> Attaching package: 'MatrixGenerics'
#> The following objects are masked from 'package:matrixStats':
#> 
#>     colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
#>     colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
#>     colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
#>     colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
#>     colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
#>     colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
#>     colWeightedMeans, colWeightedMedians, colWeightedSds,
#>     colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
#>     rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
#>     rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
#>     rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
#>     rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
#>     rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
#>     rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
#>     rowWeightedSds, rowWeightedVars
#> The following object is masked from 'package:Biobase':
#> 
#>     rowMedians
#> Loading required package: GenomicRanges
#> Loading required package: stats4
#> Loading required package: S4Vectors
#> 
#> Attaching package: 'S4Vectors'
#> The following object is masked from 'package:utils':
#> 
#>     findMatches
#> The following objects are masked from 'package:base':
#> 
#>     expand.grid, I, unname
#> Loading required package: IRanges
#> Loading required package: GenomeInfoDb
#> Loading required package: DESeq2
#> Loading required package: AnnotationDbi
#> Loading required package: RColorBrewer
library('DESeq2')
library('ggplot2')
library('regionReport')

data("pasillaDEXSeqDataSet")

countData <- counts(dxd)
colData <- colData(dxd)[, c('condition', 'type')]

# Create DESeqDataSet object from the pasilla package
dds <- DESeqDataSetFromMatrix(countData = countData,
                              colData = colData,
                              design = ~ condition)

# Perform the differential expression analysis
dds <- DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing
#> -- replacing outliers and refitting for 1 genes
#> -- DESeq argument 'minReplicatesForReplace' = 7 
#> -- original counts are preserved in counts(dds)
#> estimating dispersions
#> fitting model and testing
dir.create('DESeq2-example', showWarnings = FALSE, recursive = TRUE)

# Create the HTML report
report <- DESeq2Report(dds, project = 'DESeq2 HTML report',
                       intgroup = c('condition', 'type'), outdir = 'DESeq2-example',
                       output = 'index', theme = theme_bw())
#> Error in is(theme, c("theme", "gg")): length(class2) == 1L is not TRUE

R session info

sessionInfo()
#> R version 4.3.1 (2023-06-16)
#> Platform: x86_64-apple-darwin22.4.0 (64-bit)
#> Running under: macOS Ventura 13.4.1
#> 
#> Matrix products: default
#> BLAS:   /usr/local/Cellar/openblas/0.3.23/lib/libopenblasp-r0.3.23.dylib 
#> LAPACK: /usr/local/Cellar/r/4.3.1/lib/R/lib/libRlapack.dylib;  LAPACK version 3.11.0
#> 
#> locale:
#> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
#> 
#> time zone: America/Chicago
#> tzcode source: internal
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> loaded via a namespace (and not attached):
#>  [1] digest_0.6.33     fastmap_1.1.1     xfun_0.39         glue_1.6.2       
#>  [5] knitr_1.43        htmltools_0.5.5   rmarkdown_2.23    lifecycle_1.0.3  
#>  [9] cli_3.6.1         reprex_2.0.2      withr_2.5.0       compiler_4.3.1   
#> [13] rstudioapi_0.15.0 tools_4.3.1       evaluate_0.21     yaml_2.3.7       
#> [17] rlang_1.1.1       fs_1.6.2

Error

Hi,

When running regionReport with the DESeq2Report function, I get the below error:

Error in curl::curl_fetch_memory(url, handle = handle) : 
  Failed to connect to data.crossref.org port 80: No route to host

I think it's something related to the proxy or unavailability of the server.

Although the error seems to come from the dependency package curl, is there a way to fix or bypass this in regionReport?

How?

Error when using knitrBootstrap version 0.9.0

example('renderReport', 'regionReport', ask=FALSE)

fails when using knitrBootstrap version 0.9.0. That's because knitrBootstrap::knit_bootstrap() returns NULL instead of the character vector with the name of the resulting HTML file. This problem is easily solvable, but first I need to make sure the bioc-git-svn bridge is working properly now that the repo lives in leekgroup. I also have to push the fix to the release branch.

Thanks to Peter Andrews for the bug report.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.