diff --git a/CHANGELOG.md b/CHANGELOG.md index c8e1b3aa..44224ef2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Adapt cutadapt module to work with single-end and paired-end reads again ([#121](https://github.com/nf-core/crisprseq/pull/121)) +- Create empty \*-QC-indels.csv file if alignments not found. ([#138](https://github.com/nf-core/crisprseq/pull/138)) ## [v2.1.1 - Jamon Salas - patch](https://github.com/nf-core/crisprseq/releases/tag/2.1.1) - [14.12.2023] diff --git a/bin/cigar_parser.R b/bin/cigar_parser.R index 2018d686..cace0d1c 100755 --- a/bin/cigar_parser.R +++ b/bin/cigar_parser.R @@ -1234,4 +1234,10 @@ if (dim(alignment_info)[1] != 0){ colnames(edit_summary_perc)[1] = results_path # Rename the column to add the sample ID edit_summary_perc <- t(edit_summary_perc) # t() will add classes as columns and counts as values, 1 row per sample write.csv(edit_summary_perc,file=paste0(results_path, "_edits.csv")) + indel_filters + prevc_classes_mqc <- c("Wt passing filter", "Wt NOT passing filter", "Indels NOT passing filter", + "Above error & in pick", "NOT above error & in pick", "NOT above error & NOT in pick", "Above error & NOT in pick") + prevc_counts_mqc <- c(0, 0, 0, 0, 0, 0, 0) + indel_filters <- data.frame(sample = unlist(prevc_counts_mqc), row.names = unlist(prevc_classes_mqc)) + write.csv(indel_filters,file=paste0(results_path, "_QC-indels.csv")) }