yashm commited on
Commit
674c0a1
·
verified ·
1 Parent(s): cc367d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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