Skip to content
Snippets Groups Projects
Commit 492654cb authored by Cyril  NERIN's avatar Cyril NERIN
Browse files

FEAT #83

parent 693f6840
No related branches found
No related tags found
No related merge requests found
......@@ -375,6 +375,7 @@ def add_gene_annotation(
gene_start = []
gene_end = []
gene_direction = []
gene_biotype = []
# lists containing exon data
exon_id_label = []
......@@ -414,6 +415,23 @@ def add_gene_annotation(
decode_id_4 = decode_id_3[0].split("=")
decode_id_5 = decode_id_4[1].split(":")
gene_GeneID.append(decode_id_5[1])
decode_id_6 = decode_id_1[5].split("=")
if decode_id_6[0] == "gene_biotype":
The_biotype = decode_id_6[1].rstrip('\r\n')
gene_biotype.append(The_biotype)
else:
decode_id_7 = decode_id_1[6].split("=")
if decode_id_7[0] == "gene_biotype":
The_biotype = decode_id_7[1].rstrip('\r\n')
gene_biotype.append(The_biotype)
else:
decode_id_8 = decode_id_1[7].split("=")
if decode_id_8[0] == "gene_biotype":
The_biotype = decode_id_8[1].rstrip('\r\n')
gene_biotype.append(The_biotype)
else:
The_biotype = "unknown"
gene_biotype.append(The_biotype)
elif elements[2] == "exon":
TMP__exon_chr.append(chr)
......@@ -447,6 +465,7 @@ def add_gene_annotation(
"start": gene_start,
"end": gene_end,
"direction": gene_direction,
"biotype": gene_biotype,
}
)
df_exon = DataFrame(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment