Skip to content

Commit

Permalink
Support "transcript_type" in validate_gtf.py
Browse files Browse the repository at this point in the history
Made so that if ref gtf uses "transcript_type" as feature it is renamed to "transcript_biotype".
  • Loading branch information
Nicolaï Hoffmann committed Nov 6, 2024
1 parent f83068a commit a9352c6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bin/validate_gtf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,15 @@
record["gene_biotype"] = g_biotype

#######################################################
if not "transcript_biotype" in record:
if "transcript_biotype" in record:
t_biotype = record["transcript_biotype"]
elif "transcript_type" in record:
record.attributes["transcript_biotype"] = record.attributes["transcript_type"]
del record.attributes["transcript_type"]
t_biotype = record["transcript_biotype"]
else:
record["transcript_biotype"] = g_biotype
t_biotype = record["transcript_biotype"]
t_biotype = record["transcript_biotype"]

# Check for RefSeq transcript_biotype format
if t_biotype == "mRNA":
Expand Down

0 comments on commit a9352c6

Please sign in to comment.