Skip to content

Commit

Permalink
Fix issue with no excluded samples
Browse files Browse the repository at this point in the history
  • Loading branch information
lukfor committed Dec 20, 2023
1 parent 5e8c40f commit c9e1c10
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions reports/report.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ contamination <- read.delim(params$haplocheck)
haplogroups <- read.delim(params$haplogroups)
statistics <- read.delim(params$statistics)
pipeline_params <- read.delim(params$pipeline_parameters)
excluded_samples <- read.delim(params$excluded_samples, header = FALSE)
excluded_samples <- try(read.delim(params$excluded_samples, header = FALSE, ))
if(inherits(excluded_samples, "try-error")) {
excluded_samples = data.frame(V1=c())
}
mapping <- read.delim(params$mapping)
mapping <- mapping %>%
Expand Down Expand Up @@ -149,12 +154,16 @@ Row
### Mean Coverage per sample

```{r echo=FALSE, results='asis'}
colors <- c("darkgreen", "red")
names(colors) <- c("PASSED", "FAILED")
ggplotly(
ggplot(statistics) +
geom_col(aes(x=Sample_Label, y=MeanCoverage, fill=qc), alpha=0.7) +
theme(axis.text.x=element_text(angle=+90)) +
geom_hline(yintercept=MIN_MEAN_DEPTH, color="black", linetype="dashed") +
scale_fill_manual(values=c("red", "darkgreen")) +
scale_fill_manual(values=colors) +
xlab("Samples") +
ylab("Mean Coverage") +
labs(fill = "")
Expand All @@ -169,7 +178,7 @@ ggplotly(
geom_col(aes(x=Sample_Label, y=MeanBaseQuality, fill=qc), alpha=0.7) +
theme(axis.text.x=element_text(angle=+90)) +
geom_hline(yintercept=MIN_MEAN_BASE_QUALITY, color="black", linetype="dashed") +
scale_fill_manual(values=c("red", "darkgreen")) +
scale_fill_manual(values=colors) +
xlab("Samples") +
ylab("Mean Base Quality") +
labs(fill = "")
Expand Down

0 comments on commit c9e1c10

Please sign in to comment.