7

After many years of programming in Python, C/C++ and other mainstream languages, I am looking for a new language of pleasure, mainly as a part of mental hygiene. Since I really admire the ideas behind Lisp, including the original paper from the 1950's, I would like to learn some Lisp dialect.

Which Lisp dialects are currently suitable for bioinformatics (e.g., for developing simple command-line tools)? I have the following requirements:

  1. Portability across main Unix platforms and reproducibility (this seems to be a huge issue in many Lisp-like languages)
  2. Resulting programs being installable using Bioconda (it should be technically possible at least in future if not now)
  3. Negligible starting time (this disqualifies Clojure, which requires approximately 10 seconds)
Konrad Rudolph
  • 4,845
  • 14
  • 45
Kkk
  • 71
  • 1

2 Answers2

3

I like the idea but I’m not aware of a strong Lisp presence anywhere in bioinformatics. I think a good starting point would be the paper How the strengths of Lisp-family languages facilitate building complex and flexible bioinformatics applications by Khomtchouk &al (and the Hacker News discussion).

Excluding Clojure from consideration will unfortunately close off a great many modern resources (although I fundamentally agree with your technical reason for doing so). Apart from this, Scheme (in particular R7RS) is probably the most-used Lisp dialect, ahead of Common Lisp. Or at least the most actively developed one. As Pierre mentioned, there’s also GNU Guile but, to be honest, despite it being the default for GNU software tools I don’t think it’s frequently used outside GDB.

That said, Clojure’s startup time is not anywhere near 10 seconds on my system. It’s not exactly instantaneous but not much worse than other dynamic languages, despite being backed by the rather sluggish JVM.

Konrad Rudolph
  • 4,845
  • 14
  • 45
1

Which LISP dialects are currently suitable for bioinformatics (e.g., for developing simple command-line tools)? I have the following requirements:

I have recently pushed a PR for samtools (mostly for fun) https://github.com/samtools/samtools/pull/752 that uses the GNU Guile library https://www.gnu.org/software/guile/

./samtools view   -g \
   '(define read-filter (lambda (R) (and (> (hts-read-length R ) 10 ) (integer? (string-contains  (hts-read-seq R) "GCCTTGGCTCTTGTTCC")))))' input.bam
Pierre
  • 1,536
  • 7
  • 11