Skip to content

Commit

Permalink
Fixed minor issues and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Jurič committed Sep 8, 2023
1 parent e691fa1 commit 0a23282
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 19 deletions.
4 changes: 2 additions & 2 deletions htsinfer/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down
5 changes: 3 additions & 2 deletions htsinfer/get_library_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion htsinfer/get_read_orientation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 1 addition & 14 deletions tests/test_get_library_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0a23282

Please sign in to comment.