I have the following R code from (BatchQC package)
library(BatchQC)
nbatch <- 3
ncond <- 2
npercond <- 10
data.matrix <- rnaseq_sim(ngenes=50, nbatch=nbatch, ncond=ncond, npercond=
npercond, basemean=10000, ggstep=50, bbstep=2000, ccstep=800,
basedisp=100, bdispstep=-10, swvar=1000, seed=1234)
batch <- rep(1:nbatch, each=ncond*npercond)
condition <- rep(rep(1:ncond, each=npercond), nbatch)
batchQC(data.matrix, batch=batch, condition=condition,
report_file="batchqc_report.html", report_dir=".",
report_option_binary="111111111",
view_report=FALSE, interactive=TRUE, batchqc_output=TRUE)
When run in RStudio console, it produces this:
My question is how can I show that site through my local Shiny Server
/srv/shiny-server/
what do you mean with local shiny server? when you run a preview from R that's local already. if you have a full shiny server install on your machine, just create a folder in sample-apps and then point the browser to the shiny server (usually http://127.0.0.1:3838/sample-apps/youfolder/
I'm not familiar with that BatchQC package, but assuming it's this one on GitHub, I looked at the batchQC
function and saw this code:
appDir <- system.file("shiny", "BatchQC", package = "BatchQC")
if (appDir == "") {
stop("Could not find shiny directory. Try re-installing BatchQC.",
call. = FALSE)
}
shiny::runApp(appDir, display.mode = "normal")
So, I don't know if this will work or not (I wasn't able to install the package myself), but you can try to create an app.R
file in your shiny server with the following lines:
appDir <- system.file("shiny", "BatchQC", package = "BatchQC")
shiny::runApp(appDir)
Can't guarantee it'll work, but try it out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With