From 7dc1791332284e52ccf8e6c2a2b4a3911d068f68 Mon Sep 17 00:00:00 2001 From: Jakub Vasicek Date: Wed, 15 May 2024 18:06:02 +0200 Subject: [PATCH] option: keep only MANE select transcripts --- src/get_reference_ENST.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/get_reference_ENST.py b/src/get_reference_ENST.py index 361998e..aa4f677 100644 --- a/src/get_reference_ENST.py +++ b/src/get_reference_ENST.py @@ -36,7 +36,8 @@ chr = prot['description'].split(':',3)[2] if chr in CHROMOSOMES: - if ('MANE_Select' in annotations_db[trID].attributes['tag']): + transcript_feature = annotations_db[trID] + if (('tag' in transcript_feature.attributes) and ('MANE_Select' in transcript_feature.attributes['tag'])): result_data.append([chr,trID]) result_df = pd.DataFrame(data=result_data, columns=['chromosome', 'transcriptID'])