Skip to content

Commit

Permalink
Add biotype (#641)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao authored Apr 5, 2024
1 parent 8a40b03 commit 1092b21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jcvi/formats/gff.py
Original file line number Diff line number Diff line change
Expand Up @@ -3056,7 +3056,6 @@ def bed(args):
source = set(x.strip() for x in opts.source.split(","))
if ensembl_cds:
type = {"CDS"}
source = {"protein_coding"}

gff = Gff(
gffile,
Expand Down Expand Up @@ -3095,6 +3094,8 @@ def bed(args):
continue
bl.seqid = "chr" + bl.seqid
if ensembl_cds:
if g.get_attr("gene_biotype") != "protein_coding":
continue
bl.accn = "{0}.{1}".format(
g.get_attr("transcript_name"), g.get_attr("exon_number")
)
Expand Down

0 comments on commit 1092b21

Please sign in to comment.