Spaces:
Running
Running
Update cas9att.py (#11)
Browse files- Update cas9att.py (8227c5421df0ce2cd0f679aa6ac2ce140c145990)
Co-authored-by: Qingyang Liu <LfOreVEr@users.noreply.huggingface.co>
- cas9att.py +6 -1
cas9att.py
CHANGED
@@ -224,8 +224,13 @@ def process_gene(gene_symbol, model_path):
|
|
224 |
else:
|
225 |
print("Failed to retrieve transcripts.")
|
226 |
|
|
|
|
|
|
|
|
|
|
|
227 |
# Sort results based on prediction score (assuming score is at the 8th index)
|
228 |
-
sorted_results = sorted(
|
229 |
|
230 |
# Return the sorted output, combined gene sequences, and all exons
|
231 |
return sorted_results, all_gene_sequences, all_exons
|
|
|
224 |
else:
|
225 |
print("Failed to retrieve transcripts.")
|
226 |
|
227 |
+
output = []
|
228 |
+
for result in results:
|
229 |
+
for item in result:
|
230 |
+
output.append(item)
|
231 |
+
|
232 |
# Sort results based on prediction score (assuming score is at the 8th index)
|
233 |
+
sorted_results = sorted(output, key=lambda x: x[8], reverse=True)
|
234 |
|
235 |
# Return the sorted output, combined gene sequences, and all exons
|
236 |
return sorted_results, all_gene_sequences, all_exons
|