dhcp, resolv.conf and dhclient

I have a (RHEL 6) VM that needs a DHCP IP. I’ve added search options into resolv.conf manually but every time dhcp renews its lease, these are overwritten. I also want it to request a specific IP address. Turns out dhclient config files are handy:

1. Don’t use NetworkManager:

chkconfig NetworkManager off
service NetworkManager stop

Set NM_CONTROLLED=no in ifcfg-eth0

2. Edit (create if it doesn’t exist) the file: /etc/dhcp/dhclient-eth0.conf (or whatever interface you’re configuring) to contain something like:

send dhcp-requested-address XXX.XXX.XXX.XXX;
prepend domain-search "foo.bar.com","bar.com";

3. Test new config

ifdown eth0
ifup eth0

dhclient.conf and dhcp-options man pages for more.

Computational Biology Primers

Useful list of Nature Biotech and PLOS Comp Bio primer articles: http://www.liacs.nl/~hoogeboo/mcb/nature_primer.html

genome co-ords

Because I keep forgetting these and having to check:

Ensembl co-ords are 1-based, fully closed: The range [1,5] means positions 1,2,3,4,5.

UCSC data co-ords are 0-based, half-open: The range [0,5) means positions 1,2,3,4,5

Confusingly, their genome browser uses 1-based, fully closed (ie they add 1 to the internally stored start (but not end) position of any interval before displaying it in the browser).

Also see this useful biostar cheatsheet: http://www.biostars.org/p/84686/

Lua compile errors

Attempting to install Lua on the cluster (Centos 5).
make linux gives various “libreadline.so: undefined reference” errors.
Just add -lncurses to the “linux:” line in src/Makefile

WP comprehensive google maps plugin jquery version error

I just updated wordpress and got an unlikely sounding error about my jquery being too old for the comprehensive google maps plugin. It isn’t, it’s just the test in the plugin doesn’t work properly: http://wordpress.org/support/topic/jquerey-error-after-wordpress-36-update


ls training/ | sort -R | head -n45 | xargs -I file mv training/file test/

R warnings as errors

Apparently you can change the way R handles warnings with the “warn” option, which is quite handy for debugging.

It can have the following values:

< 0 : warnings are ignored
0 : warnings are stored and printed after top-level function has completed
1 : warnings are printed as they occur
2 : warnings are turned into errors

To get and set the value: