edinburgh-genome-foundry / codon-usage-tables Goto Github PK
View Code? Open in Web Editor NEW:bar_chart: Codon usage tables in code-friendly format + Python bindings
License: Creative Commons Zero v1.0 Universal
:bar_chart: Codon usage tables in code-friendly format + Python bindings
License: Creative Commons Zero v1.0 Universal
I've used pandas df.to_csv() to write out a custom codon table
codon_table.csv
reading this table gives an error when reading the last line. adding the length check ( if len(line)>3:
) solves this problem.
def csv_string_to_codons_dict(csv_string):
"""Transform a CSV string of a codon table to a dict."""
result = {}
for line in csv_string.split("\n")[1:]:
if len(line)>3: # new check
aa, codon, freq = line.split(",")
if aa not in result:
result[aa] = {}
result[aa][codon] = float(freq)
return result
Can we get this into a Python package and/or put it on PyPI?
When installing via pip pip install python_codon_tables
the following error is produced
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/_f/5kqpr8kx5zl9qjtkzzkb31xw0000gn/T/pip-install-a0_5fa8a/python-codon-tables/setup.py", line 16, in <module>
with open(os.path.join('data', 'version.txt'), 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'data/version.txt'
Seems that the issue is that the data
directory is one up from the packaged directory.
Please include a license file for the repository and the PyPI package python-codon-tables
. On PyPI it only mentions about a Public Domain license, but I don't see a physical license document.
https://www.kazusa.or.jp/codon/ is down (been down for a few days now). Wondering if you've got any thoughts for implementing a failover?
(PS Hello Zulko and EGF, we love the stuff you're working on!)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.