From 709847ab86bff9440a4357ddf20d63714657ceef Mon Sep 17 00:00:00 2001 From: Lubomir Chorbadjiev Date: Wed, 4 Mar 2020 08:09:05 +0200 Subject: [PATCH] fixing warning messages --- sgains/utils.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sgains/utils.py b/sgains/utils.py index 0d2e992..7bb704b 100644 --- a/sgains/utils.py +++ b/sgains/utils.py @@ -47,10 +47,12 @@ def __repr__(self): f"F{self.flag}:Q{self.mapq}, POS: {self.chrom}:{self.start}" def acceptable(self): - if self.cigar != f'{self.length}M': - print("mapping: not exact match:", self, self.cigar) - - return self.flag == 0 and self.mapq > 30 + result = self.flag == 0 and self.mapq > 30 + if result: + if self.cigar != f'{self.length}M': + print("mapping: not exact match:", self, self.cigar) + return True + return False class MappableRegion(object):