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

Error with report_heatmap_table.input #178

Open
deminatanja opened this issue Dec 20, 2022 · 2 comments
Open

Error with report_heatmap_table.input #178

deminatanja opened this issue Dec 20, 2022 · 2 comments
Assignees

Comments

@deminatanja
Copy link

Hi,
The run occasionally ends with being unable to use report_heatmap_table.input for making the final report, because report_heatmap_table.input contains a line "reached / virfinder " instead of something like "NODE_X 1 tool-name". Got the error a few times with different datasets.
BR,
Tatiana

@mult1fractal
Copy link
Collaborator

hi
I'm currently on holiday. I will check the issue when I'm back in January

Could you please provide the file with the error? without it I cannot see/identify what the problem is

Thanks!

@mult1fractal mult1fractal self-assigned this Dec 21, 2022
@deminatanja
Copy link
Author

Hi!

Thanks a lot! Have nice holidays!

The example of an error log is attached.

slurm-13998112.txt

It ends with

processing file: final_report.Rmd
  Quitting from lines 152-184 (final_report.Rmd) 
  Error in FUN(X[[i]], ...) : 
    only defined on a data frame with all numeric-alike variables
  Calls: <Anonymous> ... styleColorBar -> Summary.data.frame -> lapply -> FUN
  Execution halted

Work dir:
  /scratch/project_2006548/What_the_Phage/workflow-phages-username/36/553df25b195db99545426caae568a3

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`
```
And file final_report.Rmd lines 152-184:
 ```
suppressMessages(library(DT))
suppressMessages(library(dplyr))
suppressMessages(library(tidyr))
 
input_file_heatmap <- "contigs_m12205_report_heatmap_table.input"
sample_name <- "contigs_m12205"
 
dt = read.table(file = input_file_heatmap, sep = '\t', header = TRUE)
 
wide <- spread(dt, toolname, p_value)
 
col_count = ncol(wide)-1
wide3 = wide %>% 
    replace(is.na(.), 0) %>%
    mutate(sum_normed = rowSums(across(where(is.numeric)))/col_count) %>%   # norm sum of pvalue of tooles
    mutate_if(is.numeric,
            round,
            digits = 3)
## pre sort table
wide3 <- wide3 %>% 
 # desc orders from largest to smallest
  arrange(desc(sum_normed))
 
datatable(wide3, rownames = TRUE , class = 'hover', extensions  = 'Buttons', filter = "top", options = list(
    dom = 'Bfrtip', buttons = c('copy', 'csv', 'excel', 'pdf', 'colvis'))) %>% formatStyle(names(wide3),
  background = styleColorBar(range(wide3[,-1]), 'lightblue'),
  backgroundSize = '98% 88%',
  backgroundRepeat = 'no-repeat',
  backgroundPosition = 'center')
 
##columnDefs = list(list(visible=FALSE, targets=col_count+1) ## hides last column

The issue seems to be that the contigs_m12205_report_heatmap_table.input file has the following text on line - 393908:

"reached /       virfinder "

all other lines (except headr) have something like the following:

"NODE_9438_length_7263_cov_0_881867      1       virsorter-virome"

I was trying to modify the file and resume the pipeline, but there has been some problems with resuming it when running other datasets in parallel, so I think I stopped at that point. So I can't say if modifying the file ultimately helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants