Update app.py
Browse files
app.py
CHANGED
|
@@ -7,10 +7,11 @@ import numpy as np
|
|
| 7 |
from io import StringIO
|
| 8 |
|
| 9 |
# Function to parse GenBank file
|
| 10 |
-
|
|
|
|
|
|
|
| 11 |
stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))
|
| 12 |
record = SeqIO.read(stringio, "genbank")
|
| 13 |
-
record = SeqIO.read(file, "genbank")
|
| 14 |
organism = record.annotations['organism']
|
| 15 |
features = record.features
|
| 16 |
genes, cds = [], []
|
|
|
|
| 7 |
from io import StringIO
|
| 8 |
|
| 9 |
# Function to parse GenBank file
|
| 10 |
+
# Function to parse GenBank file
|
| 11 |
+
def parse_genbank(uploaded_file):
|
| 12 |
+
# Convert binary to text for SeqIO
|
| 13 |
stringio = StringIO(uploaded_file.getvalue().decode("utf-8"))
|
| 14 |
record = SeqIO.read(stringio, "genbank")
|
|
|
|
| 15 |
organism = record.annotations['organism']
|
| 16 |
features = record.features
|
| 17 |
genes, cds = [], []
|