Skip to content

Commit 41f4054

Browse files
author
Jon Palmer
committed
Fix phase field initialization for ncRNA genes without CDS
When parsing genes with mRNA/transcript type but no CDS features (ncRNA), the phase field was not being appended to the results dictionary, causing a length mismatch error in validate_models(). This fix adds results['phase'].append([]) for ncRNA genes to match the pattern used for other gene types, ensuring all required fields have consistent lengths. Fixes 5 failing tests related to parsing genes without CDS features.
1 parent 920c201 commit 41f4054

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

gfftk/gff.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,6 +1934,7 @@ def validate_and_translate_models(
19341934
results["codon_start"].append(None)
19351935
results["partialStart"].append(None)
19361936
results["partialStop"].append(None)
1937+
results["phase"].append([])
19371938
else:
19381939
# Sort CDS and phase together to maintain correspondence
19391940
results["type"].append("mRNA")

0 commit comments

Comments
 (0)