If replicates were taken on different dates, several rows with the exact same sgRNA_index, log2FC, condition and time are fed into the function determine_corr in calculate_fitness.R (line 311). Hence, the correlation matrix cannot be computed correctly and the function fails.
Quick-and-dirty fix: add lines
DESeq_result_table$date <- NULL
DESeq_result_table <- unique(DESeq_result_table)
in calculate_fitness.R, line 300ff
Command used and terminal output
Calculating sgRNA efficiency and correlation.
Error in `dplyr::mutate()`:
ℹ In argument: `sgRNA_correlation = determine_corr(sgRNA_index,
log2FoldChange, condition, time)`.
ℹ In group 1: `sgRNA_target = "AT103"`.
Caused by error in `stats::cor()`:
! 'x' must be numeric
Backtrace:
▆
1. ├─... %>% ...
2. ├─dplyr::mutate(...)
3. ├─dplyr:::mutate.data.frame(...)
4. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
Description of the bug
If replicates were taken on different dates, several rows with the exact same sgRNA_index, log2FC, condition and time are fed into the function determine_corr in calculate_fitness.R (line 311). Hence, the correlation matrix cannot be computed correctly and the function fails.
Quick-and-dirty fix: add lines DESeq_result_table$date <- NULL DESeq_result_table <- unique(DESeq_result_table) in calculate_fitness.R, line 300ff
Command used and terminal output
Relevant files
No response
System information
No response