From 5ec00764af36f7c25de805d30455a5d09502772d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81lvarez=20Herrera?= Date: Tue, 16 Apr 2024 18:21:33 +0200 Subject: [PATCH] Add extra check messages --- workflow/scripts/report/NV_description.R | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/workflow/scripts/report/NV_description.R b/workflow/scripts/report/NV_description.R index 4a9d99e..3688910 100644 --- a/workflow/scripts/report/NV_description.R +++ b/workflow/scripts/report/NV_description.R @@ -160,6 +160,7 @@ npc <- read_csv(snakemake@params[["nsp"]]) %>% ## SUMMARY FIGURE FOR WHOLE GENOME log_info("Plotting summary figure for whole genome") +log_info("Checking table size") if (nrow(vcf) == 0) { log_warn("Whole-genome VCF has no rows") vcf <- empty_vcf @@ -314,13 +315,14 @@ window_plot_spike <- window %>% x = "" ) +log_info("Checking table size") if (nrow(vcf_spike) == 0) { - log_warn("Spike VCF has no rows") - log_warn(vcf_spike$REGION) + log_warn("Spike VCF has no rows!") vcf_spike <- empty_vcf - log_warn(vcf_spike$NV_class) } +log_info(vcf_spike$NV_class) + variants_spike <- vcf_spike %>% ggplot() + aes( @@ -385,6 +387,7 @@ figur_SNP_table <- vcf_snp %>% ) %>% ungroup() +log_info("Checking table size") if (nrow(figur_SNP_table) == 0) { log_warn("Filtered SNP table has no rows") figur_SNP_table <- empty_vcf