Streamlit app to align FASTA sequences, compute k‑mer stats, find &
highlight motifs, build identity matrices, infer phylogenies (FastTree /
IQ-TREE), and auto‑generate a narrative for general‑audience or
technical readers. State is preserved with st.session_state, so
changing k‑mers, motifs, or story mode doesn’t recompute everything.
-
Clone
git clone https://github.com/chalco777/dna_stats_app cd dna_stats_app -
Create environment (conda/mamba) or use pip
mamba env create -f environment.yml mamba activate genomics-dashboard
-
(Recommended) Install external binaries
conda install -c bioconda mafft clustalo fasttree iqtree
-
Run
streamlit run app_en.py
- FASTA upload & header cleanup
- Multiple sequence alignment (MAFFT / Clustal Omega)
- Identity matrix (styled) + CSV export
- Motif search & highlighting
- Conservation profile (gap‑penalized or not)
- Phylogenetic tree (FastTree or IQ-TREE) with interactive viewer (PhylocanvasGL)
- Auto “story” in General‑audience or Technical tone
- Persistent UI state with
st.session_state
├── app_en.py # English version
├── app_es.py # Spanish version
├── requirements.tx
├── environment.yml
├── data/ # optional example FASTA files
├── docs/ # screenshots
Put small demo FASTA files under data/ and upload them via the UI.
(If you add CLI flags to auto-load examples, document them here.)
Python ≥ 3.10
Python libs (see requirements.txt / environment.yml): streamlit,
numpy, pandas, matplotlib, etc.
External tools (optional but needed for full functionality):
- MAFFT
- Clustal Omega
- FastTree
- IQ-TREE 2
Ensure binaries are on your $PATH.
- Parse FASTA, normalize headers.
- Align sequences (MAFFT or Clustal Omega).
- Compute identity matrix & conservation profiles.
- Infer tree (FastTree or IQ-TREE) in a temp dir; render with PhylocanvasGL.
- Generate a narrative summary (general vs technical).
IQ-TREE exit status 2
→ Use --redo or a unique --prefix each run.
“No tree file produced”
→ Check that the model string is valid (e.g., GTR+G), and outputs are
written inside the temp dir.
Alignment empty / crashes
→ Verify FASTA formatting and headers. Ensure ≥2 sequences.
Thread warnings
→ Use -T AUTO for IQ-TREE on small alignments.
If you publish results produced with this app, please cite (add full references):
- Katoh & Standley (2013) – MAFFT
- Sievers et al. (2011) – Clustal Omega
- Price et al. (2010) – FastTree
- Minh et al. (2020) – IQ-TREE 2
- PhylocanvasGL project
- Streamlit
Issues and PRs are welcome.
Open an issue first for major changes; add screenshots/tests when
relevant.
Julio Orellana-Montes
julio.orellana@upch.pe
Adrian Chalco-Gonzalez
adrian.chalco@upch.pe







