Skip to content

Commit

Permalink
fix: correctly infer read stats from second mate (#152)
Browse files Browse the repository at this point in the history
* fix: statistics from second mate #151

* fix: report median as int
  • Loading branch information
balajtimate authored Dec 4, 2023
1 parent 62fbf72 commit 930b741
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions htsinfer/get_library_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ def evaluate(self) -> ResultsStats:
self.fastq_get_stats_read_length(fastq=self.paths[0])
)
# process file 2
LOGGER.info(f"Obtaining statistics for file: {self.paths[0]}")
LOGGER.info(f"Obtaining statistics for file: {self.paths[1]}")
if self.paths[1] is not None:
(stats.file_2.read_length.min,
stats.file_2.read_length.max,
stats.file_2.read_length.mean,
stats.file_2.read_length.median,
stats.file_2.read_length.mode) = (
self.fastq_get_stats_read_length(fastq=self.paths[0])
self.fastq_get_stats_read_length(fastq=self.paths[1])
)

return stats
Expand Down
2 changes: 1 addition & 1 deletion htsinfer/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class ReadLength(BaseModel):
min: Optional[int] = None
max: Optional[int] = None
mean: Optional[float] = None
median: Optional[float] = None
median: Optional[int] = None
mode: Optional[int] = None


Expand Down

0 comments on commit 930b741

Please sign in to comment.