From 0a232822922a006fd97ee9d6e94d44db733eca5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Juri=C4=8D?= <499542@mail.muni.cz> Date: Fri, 8 Sep 2023 12:34:49 +0200 Subject: [PATCH] Fixed minor issues and tests --- htsinfer/cli.py | 4 ++-- htsinfer/get_library_type.py | 5 +++-- htsinfer/get_read_orientation.py | 1 - tests/test_get_library_type.py | 15 +-------------- 4 files changed, 6 insertions(+), 19 deletions(-) diff --git a/htsinfer/cli.py b/htsinfer/cli.py index 99cb9ad6..e0735ce3 100644 --- a/htsinfer/cli.py +++ b/htsinfer/cli.py @@ -222,7 +222,7 @@ def __call__( "upper limit on the difference in the reference " "sequence coordinates between the two mates to be " "considered as coming from a single fragment " - "(Used only when sequence identifiers do not match) " + "(used only when sequence identifiers do not match) " ) ) parser.add_argument( @@ -234,7 +234,7 @@ def __call__( help=( "minimum fraction of mates that can be mapped to compatible loci " "and are considered concordant pairs / all mates" - "(Used only when sequence identifiers do not match)" + "(used only when sequence identifiers do not match)" ) ) parser.add_argument( diff --git a/htsinfer/get_library_type.py b/htsinfer/get_library_type.py index c341d4f8..ba8d64da 100644 --- a/htsinfer/get_library_type.py +++ b/htsinfer/get_library_type.py @@ -124,8 +124,9 @@ def _evaluate_mate_relationship( self.results.relationship = ( StatesTypeRelationship.split_mates ) - self.mapping.library_type.relationship \ - = StatesTypeRelationship.split_mates + self.mapping.library_type.relationship = ( + StatesTypeRelationship.split_mates + ) else: self.mapping.library_type.relationship \ = StatesTypeRelationship.not_available diff --git a/htsinfer/get_read_orientation.py b/htsinfer/get_read_orientation.py index cacd141f..d76b0922 100644 --- a/htsinfer/get_read_orientation.py +++ b/htsinfer/get_read_orientation.py @@ -101,7 +101,6 @@ def process_alignments( if star_dirs[0].name == "file_1": results.file_1 = self.process_single(sam=paths[0]) elif len(star_dirs) == 2: - print("Getting there") results.file_1 = self.process_single(sam=paths[0]) results.file_2 = self.process_single(sam=paths[1]) return results diff --git a/tests/test_get_library_type.py b/tests/test_get_library_type.py index 7651d165..65fd76eb 100644 --- a/tests/test_get_library_type.py +++ b/tests/test_get_library_type.py @@ -124,20 +124,7 @@ def test_evaluate_mate_relationship_not_mates(self): mapping=MAPPING) test_instance.results.file_1 = StatesType.first_mate test_instance.results.file_2 = StatesType.second_mate - test_instance._evaluate_mate_relationship( - ids_1=["A", "B", "C"], - ids_2=["C", "B", "A"], - ) - assert ( - test_instance.results.relationship == - StatesTypeRelationship.not_mates - ) - test_instance.results.file_1 = StatesType.single - test_instance.results.file_2 = StatesType.first_mate - test_instance._evaluate_mate_relationship( - ids_1=["A", "B", "C"], - ids_2=["A", "B", "C"], - ) + test_instance.evaluate() assert ( test_instance.results.relationship == StatesTypeRelationship.not_mates