Skip to content

Commit

Permalink
Merge pull request #1623 from MatthiasZepper/issue1622_skewer_ZeroDiv…
Browse files Browse the repository at this point in the history
…isionError

Issue1622: ZeroDivisionError in Skewer
  • Loading branch information
ewels committed Feb 7, 2022
2 parents 7117ab7 + 809fc49 commit 6788483
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
- Fixed bug in the `junction_saturation` submodule ([#1582](https://github.com/ewels/MultiQC/issues/1582))
- Fixed bug where empty files caused `tin` submodule to crash ([#1604](https://github.com/ewels/MultiQC/issues/1604))
- Fix bug in `read_distribution` for samples with zero tags ([#1571](https://github.com/ewels/MultiQC/issues/1571))
- **Skewer**
- Fix `ZeroDivisionError` if no available reads are found ([#1622](https://github.com/ewels/MultiQC/issues/1622))
- **Somalier**
- Plot scaled X depth instead of mean for _Sex_ plot ([#1546](https://github.com/ewels/MultiQC/issues/1546))
- **VEP**
Expand Down Expand Up @@ -791,7 +793,7 @@ Some of these updates are thanks to the efforts of people who attended the [NASP

#### Bug Fixes

- Fix path*filters for top_modules/module_order configuration only selecting if \_all* globs match. It now filters searches that match _any_ glob.
- Fix path filters for `top_modules/module_order` configuration only selecting if _all_ globs match. It now filters searches that match _any_ glob.
- Empty sample names from cleaning are now no longer allowed
- Stop prepend_dirs set in the config from getting clobbered by an unpassed CLI option ([@tsnowlan](https://github.com/tsnowlan))
- Modules running multiple times now have multiple sets of columns in the General Statistics table again, instead of overwriting one another.
Expand Down
12 changes: 9 additions & 3 deletions multiqc/modules/skewer/skewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ def add_skewer_data(self, s_name, data, f):
for k in stats:
self.skewer_data[s_name][k] = int(data[k])

self.skewer_data[s_name]["pct_avail"] = 100.0 * float(data["r_avail"]) / float(data["r_processed"])
self.skewer_data[s_name]["pct_trimmed"] = 100.0 * float(data["r_trimmed"]) / float(data["r_avail"])
self.skewer_data[s_name]["pct_untrimmed"] = 100.0 * float(data["r_untrimmed"]) / float(data["r_avail"])
self.skewer_data[s_name]["pct_avail"] = (
100.0 * float(data["r_avail"]) / float(data["r_processed"]) if float(data["r_processed"]) else None
)
self.skewer_data[s_name]["pct_trimmed"] = (
100.0 * float(data["r_trimmed"]) / float(data["r_avail"]) if float(data["r_avail"]) else None
)
self.skewer_data[s_name]["pct_untrimmed"] = (
100.0 * float(data["r_untrimmed"]) / float(data["r_avail"]) if float(data["r_avail"]) else None
)

0 comments on commit 6788483

Please sign in to comment.