diff --git a/htsinfer/get_library_source.py b/htsinfer/get_library_source.py index 15a8c83..ae3e484 100644 --- a/htsinfer/get_library_source.py +++ b/htsinfer/get_library_source.py @@ -211,7 +211,7 @@ def run_kallisto_quantification( Raises: KallistoProblem: Kallisto quantification failed. """ - LOGGER.debug(f"Running Kallisto quantification for: {fastq}") + LOGGER.info(f"Running Kallisto quantification for: {fastq}") with tempfile.TemporaryDirectory( prefix="kallisto_", diff --git a/htsinfer/get_library_stats.py b/htsinfer/get_library_stats.py index 6413586..30c004c 100644 --- a/htsinfer/get_library_stats.py +++ b/htsinfer/get_library_stats.py @@ -88,7 +88,8 @@ def fastq_get_stats_read_length(fastq: Path) -> Tuple[ FileProblem: Could not process FASTQ file. """ LOGGER.debug( - f"Extracting read length statistics in: {fastq}") + f"Extracting read length statistics in: {fastq}" + ) min_len: int = 1000000 max_len: int = 0 total_lengths: int = 0 diff --git a/htsinfer/get_library_type.py b/htsinfer/get_library_type.py index 8e4166b..4a2b0ff 100644 --- a/htsinfer/get_library_type.py +++ b/htsinfer/get_library_type.py @@ -135,7 +135,7 @@ def _evaluate_mate_relationship( 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...") + LOGGER.info("Determining mate relationship by alignment...") self.mapping.library_type.relationship \ = StatesTypeRelationship.not_available self.mapping.library_source = self.library_source @@ -146,7 +146,7 @@ def _evaluate_mate_relationship( 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...") + LOGGER.info("Determining mate relationship by alignment...") self.mapping.library_type.relationship \ = StatesTypeRelationship.not_available self.mapping.library_source = self.library_source @@ -155,7 +155,7 @@ def _evaluate_mate_relationship( self._align_mates() else: self.results.relationship = StatesTypeRelationship.not_available - LOGGER.debug( + LOGGER.info( "Sequence IDs and library source are not determined, " "mate relationship cannot be inferred." ) @@ -220,9 +220,9 @@ def _align_mates(self): aligned_mate1 = len(list(filter(None, mate1))) aligned_mate2 = len(list(filter(None, mate2))) - LOGGER.debug(f"Number of aligned reads file 1: {aligned_mate1}") - LOGGER.debug(f"Number of aligned reads file 2: {aligned_mate2}") - LOGGER.debug(f"Number of concordant reads: {concordant}") + LOGGER.info(f"Number of aligned reads file 1: {aligned_mate1}") + LOGGER.info(f"Number of aligned reads file 2: {aligned_mate2}") + LOGGER.info(f"Number of concordant reads: {concordant}") self._update_relationship_type( concordant, min(aligned_mate1, aligned_mate2) @@ -351,7 +351,7 @@ def evaluate(self) -> None: with open(self.path, encoding="utf-8") as _f: # type: ignore # Get sequence identifier format from first record - LOGGER.debug( + LOGGER.info( "Determining identifier and library type from first " "record..." ) @@ -375,13 +375,13 @@ def evaluate(self) -> None: raise FileProblem(f"File is empty: {self.path}") from exc if self.seq_id_format is not None: - LOGGER.debug( + LOGGER.info( "Sequence identifier format: " f"{self.seq_id_format.name}" ) else: self.result = StatesType.not_available - LOGGER.debug( + LOGGER.info( "Could not determine sequence identifier format." ) diff --git a/htsinfer/get_read_orientation.py b/htsinfer/get_read_orientation.py index d5bac0f..d1f63ca 100644 --- a/htsinfer/get_read_orientation.py +++ b/htsinfer/get_read_orientation.py @@ -81,7 +81,7 @@ def evaluate(self) -> ResultsOrientation: self.library_source.file_1.short_name is not None or self.library_source.file_2.short_name is not None ): - LOGGER.debug("Determining read relationship by alignment...") + LOGGER.info("Determining read relationship by alignment...") self.mapping.evaluate() return self.process_alignments(star_dirs=self.mapping.star_dirs) @@ -155,7 +155,7 @@ def process_single( f"Failed to open SAM file: '{sam}'" ) from exc - LOGGER.debug("Deciding read orientation...") + LOGGER.info("Deciding read orientation...") reads = len(states) fractions = [ self.get_frequencies(*state) for state in states.values() @@ -182,12 +182,12 @@ def process_single( reads, fractions_all_states, orientation, paired=False ) - LOGGER.debug( + LOGGER.info( f"Required number of mapped reads: {self.min_mapped_reads}" ) - LOGGER.debug(f"Number of mapped reads: {orient_df.iloc[0, 0]}") - LOGGER.debug(f"Fraction of SF: {orient_df.iloc[0, 1]}") - LOGGER.debug(f"Fraction of SR: {orient_df.iloc[0, 2]}") + LOGGER.info(f"Number of mapped reads: {orient_df.iloc[0, 0]}") + LOGGER.info(f"Fraction of SF: {round(orient_df.iloc[0, 1], 3)}") + LOGGER.info(f"Fraction of SR: {round(orient_df.iloc[0, 2], 3)}") LOGGER.debug(f"Orientation: {orient_df.iloc[0, 3]}") self.write_orientation_to_json(orient_df, self.paths[0].name) @@ -268,7 +268,7 @@ def process_paired( # pylint: disable=R0912,R0915 ) from exc # deciding read orientation - LOGGER.debug("Deciding read orientation...") + LOGGER.info("Deciding read orientation...") reads = len(states) fractions = [ self.get_frequencies(*state) for state in states.values() @@ -309,12 +309,12 @@ def process_paired( # pylint: disable=R0912,R0915 reads, fractions_all_states, orientation, paired=True, file_index=2 ) - LOGGER.debug( + LOGGER.info( f"Required number of mapped reads: {self.min_mapped_reads}" ) - LOGGER.debug(f"Number of mapped reads: {orient_df_1.iloc[0, 0]}") - LOGGER.debug(f"Fraction of ISF: {orient_df_1.iloc[0, 1]}") - LOGGER.debug(f"Fraction of ISR: {orient_df_1.iloc[0, 2]}") + LOGGER.info(f"Number of mapped reads: {orient_df_1.iloc[0, 0]}") + LOGGER.info(f"Fraction of ISF: {round(orient_df_1.iloc[0, 1], 3)}") + LOGGER.info(f"Fraction of ISR: {round(orient_df_1.iloc[0, 2], 3)}") LOGGER.debug(f"Orientation file 1: {orient_df_1.iloc[0, 3]}") LOGGER.debug(f"Orientation file 2: {orient_df_2.iloc[0, 3]}") LOGGER.debug( diff --git a/htsinfer/mapping.py b/htsinfer/mapping.py index 52780f3..e3b1893 100644 --- a/htsinfer/mapping.py +++ b/htsinfer/mapping.py @@ -355,7 +355,7 @@ def generate_star_alignments(commands: Dict[Path, List[str]]) -> None: Raises: StarProblem: Generating alignments failed. """ - LOGGER.debug("Aligning reads with STAR...") + LOGGER.info("Aligning reads with STAR...") # execute commands for out_dir, cmd in commands.items():