sunbeam-labs / sbx_report

Generates a final report, with figures, from a Sunbeam run
3 stars 1 forks source link

Error in rule final_report (in .Rmd script) #14

Closed zoey-rw closed 4 years ago

zoey-rw commented 4 years ago

Hi, I'm getting an error when running the final_report rule. I suspect that it may be the same problem mentioned in this issue: https://github.com/rstudio/rmarkdown/issues/818

In which case, changing the width/height values may fix it. Otherwise, it may be a problem with cairo/R version dependencies.

Quitting from lines 452-457 (tmp9jj10glp.final_report.Rmd) 
Error in (function (filename = "Rplot%03d.png", width = 480, height = 480,  : 
  unable to start device 'png'
Calls: <Anonymous> ... block_exec -> chunk_device -> do.call -> <Anonymous>
In addition: Warning messages:
1: `funs()` is deprecated as of dplyr 0.8.0.
Please use a list of either functions or lambdas: 

  # Simple named list: 
  list(mean = mean, median = median)

  # Auto named with `tibble::lst()`: 
  tibble::lst(mean, median)

  # Using lambdas
  list(~ mean(., trim = .2), ~ median(., na.rm = TRUE))
This warning is displayed once every 8 hours.
Call `lifecycle::last_warnings()` to see where this warning was generated. 
2: In (function (filename = "Rplot%03d.png", width = 480, height = 480,  :
  cairo error 'invalid value (typically too big) for the size of the input (surface, pattern, etc.)'
Execution halted
[Wed Oct 14 10:54:11 2020]
Error in rule final_report:
    jobid: 0
    output: /projectnb2/talbot-lab-data/zrwerbin/metagenomes_raw/test_pipeline/sunbeam_output/reports/final_report.html
    conda-env: /projectnb2/talbot-lab-data/zrwerbin/metagenomes_raw/test_pipeline/sunbeam_output/.snakemake/conda/270753fe

RuleException:
CalledProcessError in line 11 of /projectnb2/talbot-lab-data/zrwerbin/metagenomes_raw/test_pipeline/sunbeam/extensions/sbx_report/sbx_report.rules:
Command 'source /share/pkg.7/miniconda/4.7.5/install/bin/activate '/projectnb2/talbot-lab-data/zrwerbin/metagenomes_raw/test_pipeline/sunbeam_output/.snakemake/conda/270753fe'; set -euo pipefail;  Rscript --vanilla -e 'rmarkdown::render("/projectnb2/talbot-lab-data/zrwerbin/metagenomes_raw/test_pipeline/sunbeam_output/.snakemake/scripts/tmp9jj10glp.final_report.Rmd", output_file="/projectnb2/talbot-lab-data/zrwerbin/metagenomes_raw/test_pipeline/sunbeam_output/reports/final_report.html", quiet=TRUE, knit_root_dir = "/projectnb2/talbot-lab-data/zrwerbin/metagenomes_raw/test_pipeline/sunbeam_output", params = list(rmd="/projectnb2/talbot-lab-data/zrwerbin/metagenomes_raw/test_pipeline/sunbeam_output/.snakemake/scripts/tmp9jj10glp.final_report.Rmd"))'' returned non-zero exit status 1.
  File "/projectnb2/talbot-lab-data/zrwerbin/metagenomes_raw/test_pipeline/sunbeam/extensions/sbx_report/sbx_report.rules", line 11, in __rule_final_report
  File "/projectnb/talbot-lab-data/zrwerbin/.conda/envs/sunbeam/lib/python3.6/concurrent/futures/thread.py", line 56, in run
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: /projectnb2/talbot-lab-data/zrwerbin/metagenomes_raw/test_pipeline/.snakemake/log/2020-10-14T105344.414425.snakemake.log
zoey-rw commented 4 years ago

Realized this error is the same as reported in https://github.com/sunbeam-labs/sbx_report/issues/9. Fixed by changing output type to SVG in local .Rmd file.