Skip to content

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.

License

Notifications You must be signed in to change notification settings

chrismichaelps/fasta-to-fst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fasta to FST

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.

Follow these steps to install OpenFST on macOS M1.

1. Download OpenFST

  • Download the latest OpenFST release from OpenFST Releases.
  • In this example, I used openfst-1.8.2.

2. Prepare for Installation

  • Move the downloaded openfst-1.8.2 folder to your desired directory.

3. Install OpenFST

  1. Copy the install_openfst.sh script into the openfst-1.8.2 directory.
chmod +x install_openfst.sh
./install_openfst.sh

Rebuild the Project

make clean && make

Convert FASTA to FST

Run the program again:

bin/fasta2fst data/input/small_example.fasta data/output/example.fst

Print the 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

Visualize the 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

...

🤝 Contributing

  • 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

👥 Credits


💢 Troubleshootings

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).


❤️ Show your support

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.

Buy Me A Coffee


🤖 Author

Chris M. Perez

You can follow me on github · twitter


Copyright ©2025 FAST to FST.

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published