Skip to content

Commit

Permalink
Add extra check messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmig committed Apr 16, 2024
1 parent c4f546e commit 5ec0076
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions workflow/scripts/report/NV_description.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5ec0076

Please sign in to comment.