Skip to content

Commit

Permalink
Fix error due to merging with main
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiara Rasi committed Sep 26, 2024
1 parent 25bd5b4 commit 76f4b0e
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/chanjo2/meta/handle_d4.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import logging
import subprocess
import tempfile
from statistics import mean
Expand All @@ -18,7 +17,6 @@
TranscriptTag,
)

LOG = logging.getLogger(__name__)
CHROM_INDEX = 0
START_INDEX = 1
STOP_INDEX = 2
Expand Down Expand Up @@ -90,10 +88,6 @@ def get_report_sample_interval_coverage(
) -> None:
"""Compute stats to populate a coverage report and coverage overview for one sample."""

if not intervals_coords:
intervals_coords = []
completeness_thresholds = []

# Compute intervals coverage
intervals_coverage: List[float] = get_d4tools_intervals_mean_coverage(
d4_file_path=d4_file_path, intervals=intervals_coords
Expand Down Expand Up @@ -154,9 +148,10 @@ def get_report_sample_interval_coverage(
interval_ids.add(interval.ensembl_id)

for threshold in completeness_thresholds:
completeness_row_dict[f"completeness_{threshold}"] = round(
mean(thresholds_dict[threshold]) * 100, 2
)
if thresholds_dict[threshold]:
completeness_row_dict[f"completeness_{threshold}"] = round(
mean(thresholds_dict[threshold]) * 100, 2
)

report_data["completeness_rows"].append((sample_name, completeness_row_dict))
report_data["incomplete_coverage_rows"] += incomplete_coverages_rows
Expand Down

0 comments on commit 76f4b0e

Please sign in to comment.