Skip to content

Commit

Permalink
Bumped to v0.0.6. Fixes #1 and #2 by requiring the newer version of k…
Browse files Browse the repository at this point in the history
…nitr, rmarkdown and knitrBootstrap. Update citations by including rmarkdown. Fix some wording
  • Loading branch information
lcolladotor committed Apr 3, 2014
1 parent c285b24 commit 0b451f5
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 29 deletions.
23 changes: 11 additions & 12 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@ Package: derfinderReport
Type: Package
Title: Generate HTML reports for derfinder
(https://github.com/lcolladotor/derfinder) results
Version: 0.0.5
Date: 2014-03-30
Version: 0.0.6
Date: 2014-04-03
Authors@R: c(person("Leonardo", "Collado-Torres", role = c("aut", "cre"), email
= "lcollado@jhsph.edu"), person("Andrew", "Jaffe", role = "aut", email =
"andrew.jaffe@libd.org"), person("Jeffrey", "Leek", role = c("aut", "ths"),
email = "jtleek@gmail.com"))
Description: Generate HTML reports for results from fast differential
expression analysis of RNA-seq data at base-pair resolution performed by
derfinder
License: Artistic-2.0
LazyData: true
URL: https://github.com/lcolladotor/derfinderReport
biocViews: DifferentialExpression, HighThroughputSequencing, RNAseq, MultipleComparisons, Software
Depends:
R(>= 3.1.0),
derfinder (>= 0.0.46)
Expand All @@ -19,8 +26,8 @@ Imports:
ggbio,
rCharts (>= 0.4.2),
data.table,
knitr,
rmarkdown (>= 0.1.28),
knitr (>= 1.5.25),
rmarkdown (>= 0.1.62),
knitrBootstrap (>= 1.0.0),
knitcitations (>= 0.5.0),
xtable,
Expand All @@ -30,11 +37,3 @@ Suggests:
biovizBase,
TxDb.Hsapiens.UCSC.hg19.knownGene,
Cairo
Description: Generate HTML reports for results from fast differential
expression analysis of RNA-seq data at base-pair resolution performed by
derfinder
License: Artistic-2.0
LazyData: true
URL: https://github.com/lcolladotor/derfinderReport
biocViews: DifferentialExpression, HighThroughputSequencing, RNAseq,
MultipleComparisons, Software
22 changes: 16 additions & 6 deletions R/generateReport.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,17 @@
#' load(file.path("generateReport-example", "chr21", "optionsStats.Rdata"))
#'
#' ## Generate the HTML report
#' generateReport(prefix="generateReport-example", browse=FALSE, nBestRegions=15, makeBestClusters=TRUE, fullCov=list("21"=genomeDataRaw$coverage), optionsStats=optionsStats)
#' report <- generateReport(prefix="generateReport-example", browse=FALSE, nBestRegions=15, makeBestClusters=TRUE, fullCov=list("21"=genomeDataRaw$coverage), optionsStats=optionsStats)
#'
#' \dontrun{
#'
#' if(interactive()) {
#' ## Browse the report
#' browseURL(file.path("generateReport-example", "basicExploration", "basicExploration.html"))
#' browseURL(report)
#' }
#'
#' \dontrun{
#' ## Note that you can run the example using:
#' example("generateReport", "derfinderReport", ask=FALSE)
#' }


Expand Down Expand Up @@ -237,12 +243,16 @@ generateReport <- function(prefix, outdir="basicExploration", output="basicExplo
cite_options(tooltip=TRUE)

## Fix citep
mycitep <- function(x) {
gsub(" </p>", "", citep(x))
mycitep <- function(x, short=NULL) {
res <- gsub(" </p>", "", citep(x))
if(!is.null(short)) {
res <- gsub("></a>", paste0(">", short, "</a>"), res)
}
return(res)
}

## Write bibliography information
write.bibtex(c("knitcitations" = citation("knitcitations"), "derfinder" = citation("derfinder"), "derfinderReport" = citation("derfinderReport"), "knitrBootstrap" = citation("knitrBootstrap"), "ggbio" = citation("ggbio"), "ggplot2" = citation("ggplot2"), "rCharts" = citation("rCharts"), "knitr" = citation("knitr")[3]), file = file.path(prefix, outdir, "references.bib"))
write.bibtex(c("knitcitations" = citation("knitcitations"), "derfinder" = citation("derfinder"), "derfinderReport" = citation("derfinderReport"), "knitrBootstrap" = citation("knitrBootstrap"), "ggbio" = citation("ggbio"), "ggplot2" = citation("ggplot2"), "rCharts" = citation("rCharts"), "knitr" = citation("knitr")[3], "rmarkdown" = citation("rmarkdown")), file = file.path(prefix, outdir, "references.bib"))
bib <- read.bibtex(file.path(prefix, outdir, "references.bib"))

## Load files
Expand Down
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@ Get R 3.1.0 or newer from [CRAN](http://cran.r-project.org/).
## If needed
install.packages("devtools")
## Note that knitr 1.5.25 is currently not available via CRAN
## Following https://github.com/yihui/knitr
install.packages('knitr', repos = c('http://rforge.net', 'http://cran.rstudio.org'),
type = 'source')
## Pre-requisites from CRAN
install.packages(c("knitr", "ggplot2", "gridExtra", "data.table", "knitr", "knitcitations",
"xtable", "RColorBrewer"))
install.packages(c("xtable", "ggplot2", "gridExtra", "data.table", "knitcitations",
"RColorBrewer"))
## You might need to install the Cairo package, but that will depend on the device you use
## for the plots
install.packages("Cairo")
Expand All @@ -28,9 +33,9 @@ source("http://bioconductor.org/biocLite.R")
biocLite(c("IRanges", "GenomicRanges", "biovizBase", "ggbio", "TxDb.Hsapiens.UCSC.hg19.knownGene"))
## GitHub dependencies
library(devtools)
install_github('rstudio/rmarkdown')
install_github('jimhester/knitrBootstrap')
library("devtools")
install_github("rstudio/rmarkdown")
install_github("jimhester/knitrBootstrap")
install_github("rCharts", "ramnathv", ref="dev")
install_github("derfinder", "lcolladotor")
Expand Down
4 changes: 2 additions & 2 deletions inst/basicExploration/basicExploration.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ t1$print("regions", cdn=TRUE)

# Best region clusters

The following plots were made using `ggbio` `r mycitep(bib[["ggbio"]])` which in turn uses `ggplot2` `r mycitep(bib[["ggplot2"]])`. For more details check `plotRegion` in `derfinder` `r mycitep(bib[["derfinder"]])`.
The following plots were made using `ggbio` `r mycitep(bib[["ggbio"]])` which in turn uses `ggplot2` `r mycitep(bib[["ggplot2"]])`. For more details check `plotCluster()` in `derfinder` `r mycitep(bib[["derfinder"]])`.

## Plots

Expand Down Expand Up @@ -423,7 +423,7 @@ t2$print("permutation")

# Bibliography

This report is part of `derfinder` `r mycitep(bib[["derfinder"]])` and was generated using `knitr` `r mycitep(bib[["knitr"]])` and styled via `knitrBootstrap` `r mycitep(bib[["knitrBootstrap"]])`.
This report is part of `derfinder` `r mycitep(bib[["derfinder"]])` and was generated using `knitrBootstrap` `r mycitep(bib[["knitrBootstrap"]])` with `knitr` `r mycitep(bib[["knitr"]])` and `rmarkdown` `r mycitep(bib[["rmarkdown"]], "JJ Allaire et al, 2014")` running behind the scenes.

Citations made with `knitcitations` `r mycitep(bib[["knitcitations"]])`.

Expand Down
12 changes: 9 additions & 3 deletions man/generateReport.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,17 @@ mergeResults(chrnums="21", prefix="generateReport-example", genomicState=genomic
load(file.path("generateReport-example", "chr21", "optionsStats.Rdata"))

## Generate the HTML report
generateReport(prefix="generateReport-example", browse=FALSE, nBestRegions=15, makeBestClusters=TRUE, fullCov=list("21"=genomeDataRaw$coverage), optionsStats=optionsStats)
report <- generateReport(prefix="generateReport-example", browse=FALSE, nBestRegions=15, makeBestClusters=TRUE, fullCov=list("21"=genomeDataRaw$coverage), optionsStats=optionsStats)

\dontrun{

if(interactive()) {
## Browse the report
browseURL(file.path("generateReport-example", "basicExploration", "basicExploration.html"))
browseURL(report)
}

\dontrun{
## Note that you can run the example using:
example("generateReport", "derfinderReport", ask=FALSE)
}
}
\author{
Expand Down

0 comments on commit 0b451f5

Please sign in to comment.