Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HiCUP output if Tidyverse, Plotly and/or Pandoc not installed #48

Open
StevenWingett opened this issue Mar 1, 2021 · 7 comments
Open
Labels
necessary improvement Not a bug, but the code needs improving in some way

Comments

@StevenWingett
Copy link
Owner

HiCUP does not give nice output if HTML summary reports are not generated owing to lack of Tidyverse, Plotly and/or Pandoc. Make this more elegant.

@StevenWingett StevenWingett added the necessary improvement Not a bug, but the code needs improving in some way label Mar 1, 2021
@cement-head
Copy link

Hi Steve,

Might be an error, might be just my install, got an error at the very end when running HiCUP 0.8.3 - seems the HTML version of the report wasn't generated. Attached is a screenshot of the output files, as well as a copy of the config file.  R is installed and the <tidyverse> & <plotly> packages are installed locally.  Running fully updated Ubuntu 18.04 LTS. Did I have to "start" R (via R Studio Server) and select (LOAD in the R environment, maybe?) the TIDYVERSE and PLOTLY packages manually ?

ERROR (from terminal)


$ perl hicup --config hicup_woodfrog.conf
Starting HiCUP pipeline (v0.8.3)
PLEASE NOTE: FROM VERSION 8, HICUP REQUIRES THE R PACKAGES TIDYVERSE AND PLOTLY INSTALLED
SEE DOCUMENTATION FOR MORE DETAILS
Detecting R automatically
Found R at '/usr/bin/R'
Reading genome digest file '/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Digest_woodfrog_Sau3AI_None_09-09-39_24-05-2022.txt.gz' to determine Hi-C restriction enzyme
Truncating with HiCUP Truncater v0.8.3
Truncating sequences at occurrence of sequences '[GATCGATC]'
Truncating sequences
Truncating /home/cbfgws6/Documents/HiC/Rsylv_ATCATGCG-AACAGTCC_L004_R1_001.fastq
Truncating /home/cbfgws6/Documents/HiC/Rsylv_ATCATGCG-AACAGTCC_L004_R2_001.fastq
Truncating complete
Mapping with HiCUP Mapper v0.8.3
Using aligner 'bowtie2'
Mapping /home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R1_001.trunc.fastq.gz
Mapping /home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R2_001.trunc.fastq.gz
Mapping complete
Pairing files with HiCUP Mapper v0.8.3
Pairing Rsylv_ATCATGCG-AACAGTCC_L004_R1_001.map.sam and Rsylv_ATCATGCG-AACAGTCC_L004_R2_001.map.sam
Pairing complete
Filtering with HiCUP Filter v0.8.3
Processing digest file /home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Digest_woodfrog_Sau3AI_None_09-09-39_24-05-2022.txt.gz
Sonication protocol followed - Restriction_Enzyme1:Sau3AI [^GATC]
Filtering /home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R1_2_001.pair.bam
Filtering complete
Removing duplicates with HiCUP Deduplicator v0.8.3
De-duplicating /home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R1_2_001.filt.bam
De-duplication complete
Creating combined HiCUP summary report
Reading folder '/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf'
Writing to: /home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/
1 complete summary results groups identified in folder
Created combined summary reports
Could not generate HiCUP HTML summary report with run command 'R -e "rmarkdown::render('/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/r_scripts/hicup_reporter.rmd', params=list(summary_file='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R1_2_001.hicup.bam.HiCUP_summary_report_tzTerrfGtH_15-53-50_24-05-2022.txt', ditag_lengths_file='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R1_2_001.ditag_size_distribution_report.txt'), intermediates_dir='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/', output_file='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R1_2_001.hicup.bam.HiCUP_summary_report_tzTerrfGtH_15-53-50_24-05-2022.html')" > /dev/null 2>&1'
Created HTML summary reports
HiCUP processing complete.

Screenshot from 2022-05-26 10-56-56
hicup_woodfrog.conf.txt

@StevenWingett
Copy link
Owner Author

Hi,

Sorry to learn you are experiencing problems with HiCUP. It seems as though everything is complete, except the generation of the final summary report.

Just wondering, is Pandoc installed on your system?

Please try running the following command in the relevant folder. Is an error message written to the screen?

R -e "rmarkdown::render('/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/r_scripts/hicup_reporter.rmd', params=list(summary_file='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R1_2_001.hicup.bam.HiCUP_summary_report_tzTerrfGtH_15-53-50_24-05-2022.txt', ditag_lengths_file='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R1_2_001.ditag_size_distribution_report.txt'), intermediates_dir='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/', output_file='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R1_2_001.hicup.bam.HiCUP_summary_report_tzTerrfGtH_15-53-50_24-05-2022.html')"

Thanks,
Steven

@cement-head
Copy link

cement-head commented May 26, 2022

Okay, well don't I feel stupid. Installed the Ubuntu package pandoc (as deb) on the system, and package pander in R, re-ran command. Got this:

$ R -e "rmarkdown::render('/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/r_scripts/hicup_reporter.rmd', params=list(summary_file='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R1_2_001.hicup.bam.HiCUP_summary_report_tzTerrfGtH_15-53-50_24-05-2022.txt', ditag_lengths_file='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R1_2_001.ditag_size_distribution_report.txt'), intermediates_dir='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/', output_file='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R1_2_001.hicup.bam.HiCUP_summary_report_tzTerrfGtH_15-53-50_24-05-2022.html')"

R version 3.4.4 (2018-03-15) -- "Someone to Lean On"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> rmarkdown::render('/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/r_scripts/hicup_reporter.rmd', params=list(summary_file='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R1_2_001.hicup.bam.HiCUP_summary_report_tzTerrfGtH_15-53-50_24-05-2022.txt', ditag_lengths_file='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R1_2_001.ditag_size_distribution_report.txt'), intermediates_dir='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/', output_file='/home/cbfgws6/Programs/HiCUP/HiCUP-0.8.3/wf/Rsylv_ATCATGCG-AACAGTCC_L004_R1_2_001.hicup.bam.HiCUP_summary_report_tzTerrfGtH_15-53-50_24-05-2022.html')


processing file: hicup_reporter.rmd
  |..                                                                    |   3%
  ordinary text without R code

  |.....                                                                 |   7%
label: setup (with options) 
List of 1
 $ include: logi FALSE

  |.......                                                               |  10%
  ordinary text without R code

  |..........                                                            |  14%
label: import_data (with options) 
List of 1
 $ echo: logi FALSE

Rows: 1 Columns: 39
── Column specification ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Delimiter: "\t"
chr  (1): File
dbl (38): Total_Reads_1, Total_Reads_2, Not_Truncated_Reads_1, Not_Truncated...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
  |............                                                          |  17%
  ordinary text without R code

  |..............                                                        |  21%
label: truncation_mapping (with options) 
List of 1
 $ echo: logi FALSE

Joining, by = "Category"
Joining, by = "Category"
  |.................                                                     |  24%
  ordinary text without R code

  |...................                                                   |  28%
label: truncation_frequency (with options) 
List of 1
 $ echo: logi FALSE

  |......................                                                |  31%
  ordinary text without R code

  |........................                                              |  34%
label: truncation_length (with options) 
List of 1
 $ echo: logi FALSE

  |...........................                                           |  38%
  ordinary text without R code

  |.............................                                         |  41%
label: mapping_efficieny (with options) 
List of 1
 $ echo: logi FALSE

  |...............................                                       |  45%
  ordinary text without R code

  |..................................                                    |  48%
label: truncation_plot (with options) 
List of 1
 $ echo: logi FALSE

Quitting from lines 104-105 (hicup_reporter.rmd) 
Error in `check_required_aesthetics()`:
! geom_bar requires the following missing aesthetics: x and y
Backtrace:
 1. plotly::ggplotly(trunc_map_plot, tooltip = "Count")
 2. plotly:::ggplotly.ggplot(trunc_map_plot, tooltip = "Count")
 3. plotly::gg2list(...)
 4. plotly by_layer(function(l, d) l$compute_geom_1(d))
 5. plotly f(l = layers[[i]], d = data[[i]])
 6. l$compute_geom_1(d)
 7. ggplot2 f(..., self = self)
 8. ggplot2:::check_required_aesthetics(...)

Execution halted

@StevenWingett
Copy link
Owner Author

Ok. Just checking, do you have Pandoc installed?

If that is installed then I'm not sure of the problem. You could send me your text summary files and I'll try and run the reporter script on my system.

All the best,
Steven

@StevenWingett
Copy link
Owner Author

Ah ok, re-read your message. So Pandoc is installed. Well, if you send me the summary text files I could try and run/debug this.

@7insong
Copy link

7insong commented Feb 26, 2024

I encountered a similar issue when generating the HTML file at the end. I suggest that you disable this command ($command .= '> /dev/null 2>&1';) in the 'hicup_reporter' script to identify what went wrong with your process. In my situation, it indicated that my pandoc version is outdated and requires 3.1.12 or higher.

@StevenWingett
Copy link
Owner Author

Fair point, I'll redirect the output to a log file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
necessary improvement Not a bug, but the code needs improving in some way
Projects
None yet
Development

No branches or pull requests

3 participants