Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/x-jiang-bioe/sb2l
Translates the biological models written in SBML into LaTeX code to be compiled and read by human eye
https://github.com/x-jiang-bioe/sb2l
converter latex sbml
Last synced: 2 days ago
JSON representation
Translates the biological models written in SBML into LaTeX code to be compiled and read by human eye
- Host: GitHub
- URL: https://github.com/x-jiang-bioe/sb2l
- Owner: X-Jiang-bioe
- License: mit
- Created: 2019-10-11T22:48:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-11T23:30:12.000Z (about 5 years ago)
- Last Synced: 2025-01-17T13:17:22.355Z (12 days ago)
- Topics: converter, latex, sbml
- Language: Python
- Size: 124 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sb2l
### Description ###
Translates biological models written in SBML into LaTeX code to be compiled and read by human eye
### Dependencies ###
The current version runs 1.3.1 version of `PyLaTeX`
Either `Tellurium` or `python-libsbml` is also required
For PDF creation functionality, either `latexmk` or `pdflatex` needs to be installed on the computer
### Installation ###
`pip install sb2l`
### How to Use ###
The following structure gives a LaTeX string that can be copied to a online compiler like `Overleaf`:
```
import sb2l
latexStr = sb2l.s2string(sbmlStringOrFile)
```
If using with Tellurium or Antimony:
```
import sb2l
latexStr = sb2l.s2string(model_name.getSBML())
```
For making PDF files (The filepath must NOT have a .pdf or .tex suffix)
```
import sb2l
filepath = "/Users/Username/Desktop/theDesiredNameOfFile" #[NOTICE: no ".anything"]
sb2l.s2pdf(sbmlStringOrFile, file_path = filepath);
```
The same structure can be used to generate a .tex file if used with `sb2l.s2latex`To generate the PDF file and open with the default PDF reader
```
import sb2l
filepath = "/Users/Username/Desktop/theDesiredNameOfFile" #[NOTICE: no ".anything"]
sb2l.s2open(sbmlStringOrFile, file_path = filepath);
```
### License ###MIT License
Copyright (c) 2019
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: