Skip to content

Commit

Permalink
feat: align mates even when assumed single #160
Browse files Browse the repository at this point in the history
  • Loading branch information
balajtimate committed Jan 19, 2024
1 parent 8fe0cbe commit 10e44bd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions htsinfer/get_library_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,21 @@ def _evaluate_mate_relationship(
self.mapping.library_type.relationship = (
StatesTypeRelationship.split_mates
)
# Infer mate relationship, even when assumed to be single
elif (
self.results.file_1 == StatesType.single and
self.results.file_2 == StatesType.single
) and (
self.library_source.file_1.short_name is not None or
self.library_source.file_2.short_name is not None
):
LOGGER.debug("Determining mate relationship by alignment...")
self.mapping.library_type.relationship \
= StatesTypeRelationship.not_available
self.mapping.library_source = self.library_source
self.mapping.paths = self.path_1, self.path_2
self.mapping.evaluate()
self._align_mates()
elif (
self.library_source.file_1.short_name is not None or
self.library_source.file_2.short_name is not None
Expand Down

0 comments on commit 10e44bd

Please sign in to comment.