diff --git a/htsinfer/get_read_orientation.py b/htsinfer/get_read_orientation.py index c7dd1ff..a9ccd36 100644 --- a/htsinfer/get_read_orientation.py +++ b/htsinfer/get_read_orientation.py @@ -77,7 +77,7 @@ def evaluate(self) -> ResultsOrientation: if not self.mapping.mapped \ and self.library_source.file_1.short_name is not None \ - and self.library_source.file_2.short_name is not None: + or self.library_source.file_2.short_name is not None: self.mapping.evaluate() else: LOGGER.warning( diff --git a/tests/test_get_library_type.py b/tests/test_get_library_type.py index 8555694..738840a 100644 --- a/tests/test_get_library_type.py +++ b/tests/test_get_library_type.py @@ -13,7 +13,9 @@ GetFastqType, ) from htsinfer.models import ( + ResultsSource, ResultsType, + Source, SeqIdFormats, StatesType, StatesTypeRelationship, @@ -147,6 +149,10 @@ def test_evaluate_mate_relationship_not_available(self, tmpdir): CONFIG.args.path_1_processed = FILE_IDS_NOT_MATCH_1 CONFIG.args.path_2_processed = FILE_MATE_2 CONFIG.args.t_file_processed = FILE_TRANSCRIPTS + CONFIG.results.library_source = ResultsSource( + file_1=Source(short_name="hsapiens", taxon_id=9606), + file_2=Source(short_name="hsapiens", taxon_id=9606), + ) CONFIG.args.tmp_dir = tmpdir MAPPING.paths = (FILE_IDS_NOT_MATCH_1, FILE_MATE_2) MAPPING.transcripts_file = FILE_TRANSCRIPTS @@ -167,6 +173,10 @@ def test_evaluate_split_mates_not_matching_ids(self, tmpdir): """ CONFIG.args.path_1_processed = FILE_IDS_NOT_MATCH_1 CONFIG.args.path_2_processed = FILE_IDS_NOT_MATCH_2 + CONFIG.results.library_source = ResultsSource( + file_1=Source(short_name="hsapiens", taxon_id=9606), + file_2=Source(short_name="hsapiens", taxon_id=9606), + ) CONFIG.args.tmp_dir = tmpdir MAPPING.paths = (FILE_IDS_NOT_MATCH_1, FILE_IDS_NOT_MATCH_2) MAPPING.tmp_dir = tmpdir