diff --git a/scripts/compare_results/fullTable_heatmap_external_metrics.R b/scripts/compare_results/fullTable_heatmap_external_metrics.R index 65c5e6e491191a936d236cd8e81e1f23e935580b..b984ffcdb7fcb69ca58b14a2656725ed52eca30f 100644 --- a/scripts/compare_results/fullTable_heatmap_external_metrics.R +++ b/scripts/compare_results/fullTable_heatmap_external_metrics.R @@ -9,8 +9,6 @@ fullTableOfStats$Gaps_per_Gb <- ((fullTableOfStats$Gaps / fullTableOfStats$Total fullTableOfStats$Gaps_per_Gb <- as.integer(fullTableOfStats$Gaps_per_Gb) -#customPurple='#c699e8' -#customGreen='#8fc773' customPurple='#99c1f1' customGreen='#8ff0a4' @@ -25,57 +23,13 @@ sink(file = snakemake@output[[1]]) format_table(selectionOfStats_colouredHeatmap, - align =c("l","c","c","c","c", "c", "c", "c", "c"), - list(Gaps_per_Gb = formatter("span", - style = ~style(display = "block", - padding = "0 4px", - `border-radius` = "3px", - `background-color` = ifelse(between(Gaps_per_Gb,1001, 10000), "#F9F06B", - ifelse(between(Gaps_per_Gb,201 , 1000), customGreen, - ifelse(Gaps_per_Gb <= 200, customPurple, "#F66151"))))), - Scaf_N50 = formatter("span", - style = ~style(display = "block", - padding = "0 4px", - `border-radius` = "3px", - `background-color` = ifelse(between(Scaf_N50,0.1, 9.99999), "#F9F06B", - ifelse(between(Scaf_N50,10, 99.99999), customGreen, - ifelse(Scaf_N50 >= 100, customPurple, "#F66151"))))), - Scaf_L50 = formatter("span", - style = ~style(display = "block", - padding = "0 4px", - `border-radius` = "3px", - `background-color` = ifelse(between(Scaf_L50,0.1, 9.99999), "#F9F06B", - ifelse(between(Scaf_L50,10, 99.99999), customGreen, - ifelse(Scaf_L50 >= 100, customPurple, "#F66151"))))), - Cont_N50 = formatter("span", - style = ~style(display = "block", - padding = "0 4px", - `border-radius` = "3px", - `background-color` = ifelse(between(Cont_N50,0.01, 0.99999), "#F9F06B", - ifelse(between(Cont_N50,1, 9.999999), customGreen, - ifelse(Cont_N50 >= 10, customPurple, "#F66151"))))), - Kmer_Compl = formatter("span", - style = ~style(display = "block", - padding = "0 4px", - `border-radius` = "3px", - `background-color` = ifelse(between(Kmer_Compl,80, 89.9999), "#F9F06B", - ifelse(between(Kmer_Compl,90, 94.99999), customGreen, - ifelse(Kmer_Compl >= 95, customPurple, "#F66151"))))), - qv = formatter("span", - style = ~style(display = "block", - padding = "0 4px", - `border-radius` = "3px", - `background-color` = ifelse(between(qv,35, 39.9999999999), "#F9F06B", - ifelse(between(qv,40, 49.999999999), customGreen, - ifelse(qv >= 50, customPurple, "#F66151"))))), - - `Comp_Single_BUSCOs_%` = formatter("span", - style = ~style(display = "block", - padding = "0 4px", - `border-radius` = "3px", - `background-color` = ifelse(between(`Comp_Single_BUSCOs_%`,80, 89.9999), "#F9F06B", - ifelse(between(`Comp_Single_BUSCOs_%`,90, 94.99999), customGreen, - ifelse(`Comp_Single_BUSCOs_%` >= 95, customPurple, "#F66151"))))))) + align = c("l", "c", "c", "c", "c", "c", "c", "c", "c"), + list(Gaps_per_Gb = formatter("span", style = ~style(display = "block", padding = "0 4px", `border-radius` = "3px", `background-color` = ifelse(between(Gaps_per_Gb, 1001, 10000), "#F9F06B", ifelse(between(Gaps_per_Gb, 201, 1000), customGreen, ifelse(Gaps_per_Gb <= 200, customPurple, "#F66151"))))), + Scaf_N50 = formatter("span", style = ~style(display = "block", padding = "0 4px", `border-radius` = "3px", `background-color` = ifelse(Scaf_N50 < 100000, "#F66151", ifelse(Scaf_N50 < 10000000, "#F9F06B", ifelse(Scaf_N50 < 100000000, customGreen, customPurple))))), + Cont_N50 = formatter("span", style = ~style(display = "block", padding = "0 4px", `border-radius` = "3px", `background-color` = ifelse(Cont_N50 < 10000, "#F66151", ifelse(Cont_N50 < 1000000, "#F9F06B", ifelse(Cont_N50 < 10000000, customGreen, customPurple))))), + Kmer_Compl = formatter("span", style = ~style(display = "block", padding = "0 4px", `border-radius` = "3px", `background-color` = ifelse(between(Kmer_Compl, 80, 89.9999), "#F9F06B", ifelse(between(Kmer_Compl, 90, 94.99999), customGreen, ifelse(Kmer_Compl >= 95, customPurple, "#F66151"))))), + qv = formatter("span", style = ~style(display = "block", padding = "0 4px", `border-radius` = "3px", `background-color` = ifelse(between(qv, 35, 39.9999999999), "#F9F06B", ifelse(between(qv, 40, 49.999999999), customGreen, ifelse(qv >= 50, customPurple, "#F66151"))))), + `Comp_Single_BUSCOs_%` = formatter("span", style = ~style(display = "block", padding = "0 4px", `border-radius` = "3px", `background-color` = ifelse(between(`Comp_Single_BUSCOs_%`, 80, 89.9999), "#F9F06B", ifelse(between(`Comp_Single_BUSCOs_%`, 90, 94.99999), customGreen, ifelse(`Comp_Single_BUSCOs_%` >= 95, customPurple, "#F66151"))))))) cat('<br>') cat("\n") @@ -140,5 +94,3 @@ format_table(legendTable, ifelse(`Comp_Single_BUSCOs_%` == '80% - 90%',"#F9F06B", ifelse(`Comp_Single_BUSCOs_%` == '90% - 95%',customGreen, customPurple))))))) sink(file = NULL) - -