Here are ways to get SIMD/SSE flags from machines running either Linux or OS X: On Linux (CentOS 7): On Mac OS X 10.12: See: https://stackoverflow.com/a/38345423/19410 for a discussion about how to detect instruction sets.
Category Archives: programming
Getting GitLab CE to work with SSL and intermediate certificates
Our research lab is non-profit, but private GitHub repositories still cost money, so I have been playing with GitLab Community Edition to serve up some private Git repositories from a third-party host on the cheap. Before using GitLab CE, I had set up a Git repository that, for whatever reason, would not allow users to cache credentials […]
Installing emacs 25 under RHEL6
The newer versions of emacs include JavaScript and other user modes useful for modern app development: This process can take upwards of 20-30 minutes. With the git repo state as of 24 March 2015: Via: http://haulynjason.net/weblog/?p=1592
Speedy BED conversion tool: convert2bed
Finishing touches are in place for my convert2bed tool (GitHub site). This utility converts common genomics data formats (BAM, GFF, GTF, PSL, SAM, VCF, WIG) to lexicographically-sorted UCSC BED format. It offers two benefits over alternatives: It runs about 3-10x as fast as bedtools *ToBed equivalents It converts all input fields in as non-lossy a […]
Old school GNU glue
Say we have a bunch of text files each containing a column of non-negative numerical values that we want to log-transform (base-10): for i in `ls *.txt`; do echo $i; awk ‘{system(“calc \”log(“$1″ + 1)\” | sed -e \”s/^[\t~]*//\””);}’ $i > $i.transformed; done Slow, but it seems to work in a pinch.
Platform-independent methods to get number of available cores and/or processors with C/C++
See: http://stackoverflow.com/questions/150355/programmatically-find-the-number-of-cores-on-a-machine
Adding same-sex marriage law data to a d3-cartogram
Shawn Allen wrote a d3.js-based implementation of a 2D cartogram, which sizes US states in an area-proportional manner, where area is based on some interesting statistic, like population. There has been a great deal of progress made in the last year in defending the rights of GLBT Americans to marry and have their partnership rights […]
matrix2png -to- matrix2pdf
For scientific work, I have used matrix2png to make a nice PNG image from a text-formatted matrix of data values. PNG looks great on the web, but it doesn’t translate well to making publication-quality figures. My thought was to take matrix2png and — with the help of Haru (libharu) — turn it into matrix2pdf. Maybe I […]
Regression testing of SHA-1 signatures via command-line
I wrote a data extraction utility which uses PolarSSL to export a Base64-encoded SHA-1 digest of some internal metadata (a string of JSON-formatted data), to help validate archive integrity: $ unstarch –sha1-signature .foo 7HkOxDUBJd2rU/CQ/zigR84MPTc= So far, so good. But now I want to validate that the metadata are being digested correctly through some independent means, […]
A bash shell one-liner to strip the file extension
Here’s a one-liner that converts jarch files to starch format, stripping the input file’s extension so that it can be replaced with a new one: $ for i in `ls *.jarch`; do echo “${i%.*}.starch”; gchr $i | starch – > “${i%.*}.starch”; done