Spaces:
Sleeping
Sleeping
Update app.py
Browse files1234542 unmodified lines4849505152535455565758import osimport shutilfrom pathlib import Pathimport pandas as pd42 unmodified linesreturn safe or "sample_genome"st.title("Bacterial Genome Annotation Workbench")st.write("Upload a bacterial genome FASTA file, run Prokka annotation, and review genome statistics and annotation summary.")uploaded = st.file_uploader("Upload bacterial genome FASTA",type=["fasta", "fa", "fna", "fas"],12345642 unmodified lines495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293import osimport shutilimport subprocessfrom pathlib import Pathimport pandas as pd42 unmodified linesreturn safe or "sample_genome"def get_prokka_version() -> str:try:result = subprocess.run(["prokka", "--version"],capture_output=True,text=True,check=False,)text = (result.stdout or result.stderr).strip()return text if text else "Unable to determine Prokka version."except Exception as exc:return f"Unable to determine Prokka version: {exc}"def get_prokka_db_info() -> str:try:result = subprocess.run(["prokka", "--listdb"],capture_output=True,text=True,check=False,)text = ((result.stdout or "") + "\n" + (result.stderr or "")).strip()return text if text else "No Prokka database information was returned."except Exception as exc:return f"Unable to retrieve Prokka database information: {exc}"st.title("Bacterial Genome Annotation Workbench")st.write("Upload a bacterial genome FASTA file, run Prokka annotation, and review genome statistics and annotation summary.")with st.expander("Prokka environment check", expanded=False):st.write("Prokka version:")st.code(get_prokka_version())st.write("Prokka database:")st.code(get_prokka_db_info())uploaded = st.file_uploader("Upload bacterial genome FASTA",type=["fasta", "fa", "fna", "fas"],
app.py+35