Skip to content

Commit bc1297f

Browse files
committed
remove summary metrics
1 parent f620452 commit bc1297f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

RiboMetric/metrics.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,8 @@ def fourier_transform(
919919
amplitudes = np.abs(fourier_transform) ** 2
920920
total_power = np.sum(amplitudes)
921921
triplet_power = amplitudes[idx_3nt]
922-
fourier_scores[read_len] = 1 - (triplet_power / total_power)
922+
fourier_scores[read_len] = 1 - (triplet_power / total_power) if total_power != 0 else 0
923+
923924

924925
if len(global_counts) < 2:
925926
fourier_scores["global"] = 0

0 commit comments

Comments
 (0)