Update app.py
Browse files
app.py
CHANGED
|
@@ -4,9 +4,12 @@ import pandas as pd
|
|
| 4 |
from Bio import SeqIO
|
| 5 |
import altair as alt
|
| 6 |
import numpy as np
|
|
|
|
| 7 |
|
| 8 |
# Function to parse GenBank file
|
| 9 |
def parse_genbank(file):
|
|
|
|
|
|
|
| 10 |
record = SeqIO.read(file, "genbank")
|
| 11 |
organism = record.annotations['organism']
|
| 12 |
features = record.features
|
|
|
|
| 4 |
from Bio import SeqIO
|
| 5 |
import altair as alt
|
| 6 |
import numpy as np
|
| 7 |
+
from io import StringIO
|
| 8 |
|
| 9 |
# Function to parse GenBank file
|
| 10 |
def parse_genbank(file):
|
| 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
|