diff --git a/libhts/libhts.py b/libhts/libhts.py index fa2deb73132cbb6cf8bf3736bad8b79a402588bf..5b4e1b03193b10f9797cc1120ee65cfd3fa97c48 100644 --- a/libhts/libhts.py +++ b/libhts/libhts.py @@ -275,8 +275,11 @@ def aligner2min_mapq(aligner, wildcards): What minimal MAPQ value should a read have to be considered uniquely mapped? See <https://sequencing.qcfail.com/articles/mapq-values-are-really-useful-but-their-implementation-is-a-mess/>. """ - mapped_type = wildcards.mapped_type - if mapped_type.startswith("unique_"): + try: + mapping_type = wildcards.mapping_type + except AttributeError: + mapping_type = wildcards.mapped_type + if mapping_type.startswith("unique_"): if aligner == "hisat2": return "-Q 60" elif aligner == "bowtie2":