Saturday, September 13, 2014

Zamenhof's 1917 Declaration of Homaranism

In my previous post I wrote a little bit about the life of L.L. Zamenhof, and why even though he was certainly idealistic, I don't think it is fair or accurate to characterize him as "naive". In this post I present an English translation of Zamenhof's 1917 Declaration of Homaranism (Deklaracio pri Homaranismo) (pgs. 235-242 of "Mi Estas Homo", an Esperanto anthology of Zamenhof's letters and philosophical writings). I think it is unlikely that anyone will ever establish a Homaranist organization, nevertheless, the problems that Zamenhof was trying to use Homaranism to solve are as serious today as they were in his day. So whether one agrees with the principles and methodology of Homaranism or not, I think Zamenhof's ideas on the causes and solutions to human conflict are valuable at least as food for thought for modern discussions of these same topics.

L.L. Zamenhof was not naive


Ludwik Lazarus Zamenhof, creator of the Esperanto language, dedicated his life to the idea of ending inter-ethnic conflict. To speakers of Esperanto (or at least to me), he's a hero. First and foremost, he's a hero to Esperanto speakers in the same way that George Lucas is to Star Wars fans, and J.S. Bach is to people who enjoy pipe organ music: he created magnificent works of art (the language, along with his translations and original writings) that continue to bring us a lot of joy. It's not an exaggeration to say that the reason Esperanto succeeded in becoming a language spoken by tens of thousands of people (or whatever the number is) all over the world was Zamenhof's stubbornness and tenacity in promoting the language and creating, from the ground up, a literature for the language. Unlike the creators of other artificial languages, Zamenhof created not only a grammar and dictionary, but powerfully demonstrated that the language was suitable even for great works of literature by translating, among many other works, examples of Shakespeare and Charles Dickens and eventually even the entire Old Testament of the Bible. Zamenhof's early works and translations were able to serve as stylistic examples to other authors and translators, and the body of Esperanto literature snowballed, and became self sustaining.


Monday, August 18, 2014

Eating really cheap: a 50 cent meal, and why I think Soylent will never be a food for the poor (although it may help them indirectly)

Two of my major interests in life are eating delicious food and spending as little money as possible. So when I read about the Soylent project, which aims to produce an ultra-cheap food powder that meets all of a person's nutrition needs I was very much interested (about the ultra-cheap part and the nutritional needs meeting part, not so much about the tasteless powder part). My philosophy about food is much different than that of Soylent creator Rob Rhinehart, who states on his blog "In my own life I resented the time, money, and effort the purchase, preparation, consumption, and clean-up of food was consuming." Personally, I see the time I spend cooking as an adventure: an opportunity to learn and experiment. I rarely cook from recipes (although I do keep a notebook), and pretty much never eat the same thing twice. I see cooking as a kind of huge multivariable optimization problem with a complicated (and changing) objective function and no global optimum, but lots of local optima all over the place. I want to make food that is delicious, nutritious, cheap, and not monotonous, and I have fun trying to do that.

Wednesday, August 13, 2014

Chemspider python scripting

In the past, I've shown how to script Chemdraw and ChemAxon for the purposes of converting chemical information among different file formats. In this post I'll show how to achieve (vaguely) similar results using the ChemSpider web API. ChemSpider is nice because (unlike SciFinder) it is free, they don't mind if you reuse their data, and they don't mind if you access their website with scripts. Using ChemSpider has the advantage that it is a huge database and provides cross-references to other databases, it has images, mol files, and lots of other data about each compound.


Tuesday, July 29, 2014

Using SwissProt and ExPASy ENZYME to generate putative EC annotations for sequence data

There was a question on Biostars about how to make EC assignments based on sequence. I gave one of the answers, suggesting a few possible solutions. One of my solutions was to Blast against ExPASy ENZYME and base the annotations on the best hit from there. In this post I explain how to do that, and supply the necessary Python code.
[Note: PRIAM is another tool that assigns EC numbers to sequences based on the data in the ENZYME database. Instead of individual blast hits, it uses profiles built from multiple sequence alignments of peptides known to catalyze a given reaction. It's also a lot quicker to use than the method outlined here, so it's probably worth checking out first]


Sunday, July 27, 2014

Wikipedia (cat)

Here's a silly poem I wrote a few years ago. It comes with its own silly introduction. I think this is pretty much the apex of my poetical achievement, so if you're not a fan of it... well, it just goes downhill from here folks... Also, I'd love to see this turned into a music video, so if anyone with musical or artistic talent would like to collaborate on that, let me know and maybe we can make something really cool.

srj_chembiolib a set of scripts for doing Bioinformaticky type stuff

This post is to announce srj_chembiolib which in an uncreatively named set of scripts I've written to perform various bioinformatics (and hopefully eventually some cheminformatic) tasks that would otherwise be a pain in the rear to accomplish. Most of the scripts work both as libraries that can be imported into other scripts, and as stand alone command line scripts. Some depend on external libraries such as BioPython. Documentation is mostly found in block comments at the top of the script files. Where possible, for example with the scripts that manipulate fasta files, I've tried to make it so that multiple programs can be chained together with pipes on the command line to accomplish more complex tasks. I hope they're useful for someone.

Here's an overview of some (but not all!) of the scripts in the package:

blast_xml_to_outfmt6.py: Converts Blast+ xml output to '-outfmt 6' style output (a tab separated form). Allows for some additional features not available in the standard outfmt 6, such as printing a line for query sequences that had no hits.

subset_fasta.py: Give it a fasta file and a list of strings, and it will give you a fasta file containing only those sequences whose names contain something from the list of strings as a substring.

 extract_massbank.py: A class to read and store data from MassBank format text files, such as those used by MassBank, ReSpect, and Spektraris (my favorite database...).

extract_top_blast_hits.py: Reads a blast xml file and outputs the names of the top hits for each query sequence. There's an option for making a file listing the sequences the queries where the top hit matched in the reverse direction, which is useful, for example with Blastx, to determine whether a nucleotide sequence represents the coding strand, or the non-coding strand.