Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samtools: Stats: fix "Percent Mapped" plot when samtools was run with read filtering #1972

Merged
merged 5 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
- Fix a bug happening when both `region` and `global` coverage histograms for a sample are available (i.e. when mosdepth was run with `--by`, see [mosdepth docs](https://github.com/brentp/mosdepth#usage)). In this case, data was effectively merged. Instead, summarise it separately and add a separate report section for the region-based coverage data.
- **RSeQC**
- Fix "max() arg is an empty sequence" error ([#1985](https://github.com/ewels/MultiQC/issues/1985))
- **Samtools**
- Stats: fix "Percent Mapped" plot when samtools was run with read filtering ([#1971](https://github.com/ewels/MultiQC/issues/1971))

## [MultiQC v1.15](https://github.com/ewels/MultiQC/releases/tag/v1.15) - 2023-08-04

Expand Down
2 changes: 1 addition & 1 deletion multiqc/modules/samtools/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def alignment_section(self, samples_data):
bedgraph_data = {}
for sample_id, data in samples_data.items():
expected_total = data["raw_total_sequences"]
read_sum = data["reads_mapped"] + data["reads_unmapped"]
read_sum = data["reads_mapped"] + data["reads_unmapped"] + data["filtered_sequences"]
if read_sum == expected_total:
bedgraph_data[sample_id] = data
else:
Expand Down