ohlerlab / RiboseQC

Pipeline for Quality Control of Ribo-Seq data, selection of P-site offsets, and codon usage statistics.
15 stars 14 forks source link

Global installation, local run #17

Open Jelinek-J opened 2 years ago

Jelinek-J commented 2 years ago

If I install RiboseQC for all users (via sudo R) and then try to compute as a user (via R), then the computation fails:

$ sudo R
> install.packages("devtools")
> library("devtools")
> install_github(repo = "ohlerlab/RiboseQC")
> q()
$ R
> library("RiboseQC")
> prepare_annotation_files(".", "...2bit", "...gtf", annotation_name="GRCh38", genome_seq="...fa")
> RiboseQC_analysis("...gtf_Rannot", c("..."), read_subset = T, readlength_choice_method = "max_coverage", dest_names = c("..."), rescue_all_rls = F, fast_mode = T, create_report = T, report_file = "output", extended_report = F, pdf_plots = T, stranded = T, normalize_cov = T, write_tmp_files = F)
...
Exporting files --- Done! Fri Nov 12 18:27:05 2021 

Creating html report in output ... Fri Nov 12 18:27:05 2021

processing file: riboseqc_template.Rmd
Error in file(con, "w") : cannot open the connection

It can be temporary bypassed by computing via sudo R too (not secure), or by individual installation via R (inefficient if multiple users wants to use RiboseQC).

karl-az commented 2 years ago

Hi, I got this error. In my case it was triggered installing RiboseQC to a singularity container. I think it comes down to the call to rmarkdown::render here: https://github.com/ohlerlab/RiboseQC/blob/22ad7736a1f914e2e3c794c84807be909e89ccef/R/riboseqc.R#L107-L111

I think it could be solved by setting intermediate_dir

https://github.com/rstudio/rmarkdown/blob/main/R/render.R#L191-L193

When it isn't set, R will try to write to the rmd file location. As it is protected the process fails. Perhaps create an extra folder together with the plots folder?