Spaces:
Running
Running
Update cas12.py
Browse files
cas12.py
CHANGED
@@ -136,14 +136,19 @@ def format_prediction_output(targets, model_path):
|
|
136 |
def process_gene(gene_symbol, model_path):
|
137 |
transcripts = fetch_ensembl_transcripts(gene_symbol)
|
138 |
results = []
|
|
|
|
|
|
|
139 |
if transcripts:
|
140 |
for i in range(len(transcripts)):
|
141 |
Exons = transcripts[i]['Exon']
|
|
|
142 |
transcript_id = transcripts[i]['id']
|
143 |
for j in range(len(Exons)):
|
144 |
exon_id = Exons[j]['id']
|
145 |
gene_sequence = fetch_ensembl_sequence(exon_id)
|
146 |
if gene_sequence:
|
|
|
147 |
start = Exons[j]['start']
|
148 |
end = Exons[j]['end']
|
149 |
strand = Exons[j]['strand']
|
@@ -159,7 +164,7 @@ def process_gene(gene_symbol, model_path):
|
|
159 |
else:
|
160 |
print("Failed to retrieve transcripts.")
|
161 |
|
162 |
-
return results,
|
163 |
|
164 |
|
165 |
# def create_genbank_features(formatted_data):
|
|
|
136 |
def process_gene(gene_symbol, model_path):
|
137 |
transcripts = fetch_ensembl_transcripts(gene_symbol)
|
138 |
results = []
|
139 |
+
all_exons = []
|
140 |
+
all_gene_sequences = []
|
141 |
+
|
142 |
if transcripts:
|
143 |
for i in range(len(transcripts)):
|
144 |
Exons = transcripts[i]['Exon']
|
145 |
+
all_exons.append(Exons)
|
146 |
transcript_id = transcripts[i]['id']
|
147 |
for j in range(len(Exons)):
|
148 |
exon_id = Exons[j]['id']
|
149 |
gene_sequence = fetch_ensembl_sequence(exon_id)
|
150 |
if gene_sequence:
|
151 |
+
all_gene_sequences.append(gene_sequence)
|
152 |
start = Exons[j]['start']
|
153 |
end = Exons[j]['end']
|
154 |
strand = Exons[j]['strand']
|
|
|
164 |
else:
|
165 |
print("Failed to retrieve transcripts.")
|
166 |
|
167 |
+
return results, all_gene_sequences, all_exons
|
168 |
|
169 |
|
170 |
# def create_genbank_features(formatted_data):
|