Skip to content

Commit 9476bba

Browse files
committed
Fix issue where insert size metrics failed on a sample without adapters
1 parent 16fceb4 commit 9476bba

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ Changelog
77
.. This document is user facing. Please word the changes in such a way
88
.. that users understand how the changes affect the new version.
99
10+
version 0.9.1
11+
-----------------
12+
+ Fix an issue where the insert size metrics module would crash when no
13+
adapters where present.
14+
1015
version 0.9.0
1116
-----------------
1217
+ MultiQC support since MultiQC version 1.22

src/sequali/report_modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,7 @@ def select_relevant_adapters(adapter_list: Sequence[Tuple[str, int]]):
18281828
"""
18291829
# Sort list on count
18301830
sorted_list = sorted(adapter_list, reverse=True, key=lambda x: (x[1]))
1831-
new_list = []
1831+
new_list = [("", 0) for _ in range(INSERT_SIZE_MAX_ADAPTER_STORE_SIZE)]
18321832
lengths_to_get = set(range(1, INSERT_SIZE_MAX_ADAPTER_STORE_SIZE + 1))
18331833
for adapter, count in sorted_list:
18341834
if len(adapter) in lengths_to_get:

0 commit comments

Comments
 (0)