Skip to content

Commit 9031f99

Browse files
Update malariagen_data/anoph/genome_features.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 2934805 commit 9031f99

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

malariagen_data/anoph/genome_features.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,8 @@ def canonical_transcript(
430430
df_exons = df_exons[df_exons["type"] == "exon"].sort_values("start")
431431

432432
if len(df_exons) > 0:
433-
# Calculate total transcribed length
434-
exon_lengths = (df_exons["end"] - df_exons["start"]).sum()
433+
# Calculate total transcribed length (1-based inclusive coordinates)
434+
exon_lengths = (df_exons["end"] - df_exons["start"] + 1).sum()
435435
transcript_lengths[transcript_id] = exon_lengths
436436
debug(f" {transcript_id}: {len(df_exons)} exons, {exon_lengths} bp")
437437

0 commit comments

Comments
 (0)