This project demonstrates how to convert FASTA files to Finite State Transducers (FSTs). It provides a simple workflow for building the project, converting a FASTA file to an FST, and visualizing the result.
- Download the latest OpenFST release from OpenFST Releases.
- In this example, I used
openfst-1.8.2
.
- Move the downloaded
openfst-1.8.2
folder to your desired directory.
- Copy the
install_openfst.sh
script into theopenfst-1.8.2
directory.
chmod +x install_openfst.sh
./install_openfst.sh
make clean && make
Run the program again:
bin/fasta2fst data/input/small_example.fasta data/output/example.fst
To inspect the content of the generated FST, use the following command. This will print the FST using the provided symbol table:
fstprint --isymbols=data/output/example.fst.syms --osymbols=data/output/example.fst.syms data/output/example.fst
You can generate a PDF visualization of the FST using fstdraw and graphviz. This will create a visual representation of the FST:
fstdraw --isymbols=data/output/example.fst.syms --osymbols=data/output/example.fst.syms data/output/example.fst | \
dot -Tpdf > data/output/example.pdf
open data/output/example.pdf
...
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
- Chris Michael (Project Leader, and Developer)
This is just a personal project created for study / demonstration purpose and to simplify my working life, it may or may not be a good fit for your project(s).
Please ⭐ this repository if you like it or this project helped you!
Feel free to open issues or submit pull-requests to help me improving my work.
Chris M. Perez
Copyright ©2025 FAST to FST.