Skip to content

Commit

Permalink
better comment, add type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
jethror1 committed Jul 6, 2021
1 parent 4d667b6 commit 5cb31a3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions bin/coverage_report_single.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,10 @@ def summary_gene_plot(self, cov_summary):
class styleTables():
"""Functions for styling tables for displaying in report"""

def __init__(self, cov_stats, cov_summary, threshold, threshold_cols, vals):
def __init__(
self, cov_stats: pd.DataFrame, cov_summary: pd.DataFrame,
threshold: str, threshold_cols: list, vals: list
) -> None:
self.cov_stats = cov_stats
self.cov_summary = cov_summary
self.threshold = threshold
Expand All @@ -461,10 +464,6 @@ def style_sub_threshold(self):
"""
Styling of sub threshold stats df for displaying in report
Args:
- cov_stats (df): df of per exon coverage stats
- threshold (str): low coverage threshold value
- threshold_cols (list): threshold values for coverage
Returns:
- sub_threshold_stats (list): list of sub threshold coverage stats
- low_exon_columns (list): list of column headers for report
Expand Down Expand Up @@ -528,7 +527,7 @@ def style_sub_threshold(self):
# add index as column to have numbered rows in report
sub_threshold_stats.insert(0, ' ', sub_threshold_stats.index)

# list of threshold columns + mean
# threshold_cols -> list of strings, add mean to loop over for rounding
round_cols = ['Mean'] + self.threshold_cols

# limit to 2dp using math.floor, use of round() with
Expand Down

0 comments on commit 5cb31a3

Please sign in to comment.