LabKey – manage shared lists of reagents, oligos, strains

LabKey is a very friendly system for lab scale, or larger, sharing of common data. In our own hands, LabKey replaced a series of spreadsheets giving a much better way to edit and view things; mostly lists of reagents. The software can be obtained from:

https://www.labkey.org/

Nelson EK, Piehler B, Eckels J, Rauch A, Bellew M, Hussey P, Ramsay S, Nathe C, Lum K, Krouse K, Stearns D, Connolly B, Skillman T, Igra M. LabKey Server: An open source platform for scientific data integration, analysis and collaboration. BMC Bioinformatics 2011 Mar 9; 12(1): 71.

http://www.biomedcentral.com/1471-2105/12/71

LabKey works on on an Apache tomcat java server and it’s mostly Java on server side with some JavaScript enhanced pages on the user side. A working relational database server is also required. Not perfect but better than shared Excel files.

The installation we use is on a Windows machine with VirtualBox on which a Ubuntu 12.04 is installed. Installation was not painless but I followed the steps detailed in the python file: install-labkey.py. I had some problems with showing the Apache server to the outside world from within the virtual machine. A short description of how to install a Ubuntu machine on a Mac is here:
http://aboutfoto.bitbucket.org/rggobi_macosx.html

I just found a few notes on steps taken to configure a working LabKey on Linux (Ubuntu). These are useful especially if you are doing the install in a VirtualBox machine:

sudo apt-get install build-essential 
#installs compilers
>sudo usermod -G vboxsf -a yourusername 
#adds a user to the group -vboxsf to allow sharing of a folder
#install the server and database system (adjust numbers to actual versions)
>sudo apt-get install sendmail tomcat6 postgresql xvfb graphviz r-base
>cd /usr/local/
>sudo cp -R ~/Downloads/jre1.7.0_21 ./
>sudo ln -s /usr/local/jre1.7.0_21/ /usr/local/java
#configure the database user
>sudo -s -u postgres
>createuser -P
>sudo service tomcat6 stop
#help labkey user get access to the configuration in the tomcat server folder
>sudo chown -R tomcat6:tomcat6 labkey/
#make logs position a little bit easier to find.
>sudo ln -s /var/log/tomcat6/ /usr/share/tomcat6/logs

I’ve updated the LabKey server to the latest version (14.2, as of July 2014). While I thought it would be easy, I ended up by upgrading:
– Java (to 1.7 OpenJDK and Sun – I don’t really know which one is used – the system reports Oracle but the tomcat7 user has apparently a mind on its own),

– PostgreSQL (to 9.3 from 9.1 and kept the database safe using a script from postgres-contrib, pg_update, and indications from this blog post). The update failed if launched from the home directory. Worked if started from the /var directory because the script wants to write a log file and needs write permissions.
– Tomcat from 6 to 7 (relatively painless). Works very nicely as a service and can be stopped started at will with >sudo tomcat7 start (or stop or restart).
With the update, I changed also the way I remotely backup the data from the labkey database. Getting json files is good, but a pg_dump is much better. The only problem was that I did not know how to talk to the database – two configuration files needed to be changed to allow remote connection (postgresql.conf and pg_hba.config, as explained here.) In addition, another port forwarding needs to be added to the VirtualBox configuration.
The new LabKey version is improved compared to the older one. I feel more confident now about upgrading the thing.

ApE, a plasmid editor, installation on Linux (Debian)

ApE is the most useful DNA editor I know of. Although installation on Windows and Mac OS X is easy through pre-packaged binaries, Linux installation may be a little bit more complex. Don’t be discouraged – nice people, with the help from the ApE author himself, discovered all that is there to know about how to do it properly. Some useful information comes from the Ape wiki:

Information from http://pastebin.com/fJNjcW1G about how to install Ape on Linux (you might get some error results from wget, standard browser pointing to the address should work better):

# download latest windows version/package
 #
 >wget http://biologylabs.utah.edu/jorgensen/wayned/ape/Download/Windows/ApE_win_current.zip
 >unzip ApE_win_current.zip
 
 # download & setup tclkit (http://equi4.com/tclkit/index.html)
 #
 >wget http://www.equi4.com/pub/tk/8.5.1/tclkit-linux-x86.gz
 >gunzip tclkit-linux-x86.gz 

 #make the binary executable:
 >chmod +x tclkit-linux-x86
 
 # download SDX (Starkit Developer eXtension)
 # http://equi4.com/starkit/sdx.html
 wget http://equi4.com/pub/sk/sdx.kit
 
 # unwrap & run ApE
 #
 ./tclkit-linux-x86 sdx.kit unwrap ApE.exe
 ./tclkit-linux-x86 ApE.vfs/main.tcl

A recent version of the Tclkit can be recovered from:
https://code.google.com/p/tclkit/downloads/detail?name=tclkit-8.5.9-linux-ix86.gz

Two i386 libraries were required for ApE  to work on a Debian install (wheezy, 7.7, 64 bit version):

>su - root
>apt-get install libxss1:i386
>apt-get install libxft2:i386

The old Ape version for Linux works with base Tcl/Tk, but lacks some of the nice features of the ApE 2 series.
Newer versions require some extensions from the tclkit.

Don’t forget to chmod +x the tclkit binary

Proof that it works:

ApE screen shot
ApE screen shot

🙂    🙂

IMPORTANT

EDIT: The 2.0.7 version is in fact available and works directly with wish. Once unzipped, just ‘cd’ to the ‘ApE Linux’ directory and from there > wish AppMain.tcl  . This even works under Mac OS X Mavericks with Tcl/Tk 8.5.9!

Inkscape and system fonts on MacOS X

For the last year, one of the biggest trouble with using Inkscape on MacOS X was that some of the system fonts were not available in the drawings, especially Helvetica. I’m just pasting information found on the InkscapeForum with the solution:

Re: Font trouble in 0.48 on Mac

by Ufdah » Sat Oct 13, 2012 11:13 am

I registered on the forum just so that I could answer your question because I was having the same issue and I know how frustrating it is…
Right click on the Inkscape.app and “Show Package Contents”
From there go to: ‘Inkscape.app/Contents/Resources/etc/fonts/’
Using TextEdit.app (or another nice text editor), open ‘fonts.conf’ and edit:
<!--<dir>/System/Library/Fonts</dir>-->
Remove the comments so that it looks like this:
<dir>/System/Library/Fonts</dir>
This allows Inkscape to use all the installed system fonts in the FontBook app…
I would add that it is a good idea to keep a copy of the fonts.conf file, just in case.

Benefits of Android rooting

lockscreen
Customized lock-screen on Xperia V

I first heard about “rooting” an Android phone about 4 years ago but did not quite understand the benefits of spending hours with the complex procedure that was involved. For those of you unfamiliar with the term, “rooting” means getting the possibility of changing the system of an Android phone or tablet in any way, including the ability to remove system files and to find the device dead on the next boot. Rooting is equivalent with becoming the “admin” of your phone. Once rooted, there is no special user name or password. Additional apps, like SuperSU, are used to block unauthorized access to the system.

My own motivation to “root” a phone was mostly anchored in the belief that I could throw away a large number of applications that belong to the “system” and could not be uninstalled. I can confidently say now that I found two major benefits to rooting, apart the risky cleaning up of manufacturer installed apps: extreme customization and extended battery life.

Just a few words about boot loader and root, since the terms are frequently associated. An unlocked boot loader allows the installation of a system that is different from the original Android – a bit like a different Linux distribution. Such a system is found under the form of a custom ROM and Cyanogen Mod is one of the most well known custom ROMs. On Sony Xperia phones, a relatively straightforward procedure allows unlocking the boot loader. However, rooting does not require an unlocked boot loader and an unlocked boot loader does not automatically give root access to the file system of the phone or tablet.

How root opens endless customization options ?

Xposed modules
Xposed modules

The answer lies in a fantastic software that warps and bends Android to the user’s (mostly programmer’s) will. Having “root” access, allows the installation of the Xposed framework, which orchestrates its modules to do “things” to Android user interface (and more). The various modules can be installed from within the “Downloads” section of the Xposed Installer app.

GEM Xperia Xposed – allows many improvements to be added to the stock Android launcher on, you guessed, Xperia phones. Another Xperia specific module is Xperia Flip Settings, that allows the use of the original Android quick settings display instead of the customized one from Sony.

Xposes Preference Injector adds the different modules to the “Parameters” of Android, a very convenient integration of Xposed into the system.

Unicon (read un-icon) – allows customization of the icons used for the interface, without the need to install a custom launcher.

The most impressive module I’ve tried and happily use is GravityBox (JB) – the JellyBean version. It allows an impressive and ever growing number of customization to the interface, from the appearance of the quick settings:

quick_accessto the inclusion of a menu button in the navigation bar (a very convenient way to access menus in the absence of hardware buttons). GravityBox does plenty of other things, like, for example, changing the colors and positioning of status bar icons, making a L-type transparent navigation bar, etc:xperia_launcherAll in all, for people like me, squeezing the pixels to our liking for endless hours, the Xposed framework is a great and ever improving app.

How does rooting save battery life ? Llama and Greenify !

Having custom options for the interface is great, but saving battery from unnecessary electricity draining is much more important. I tried to use the “Stamina” mode of the phone. It stops some services and data connections while the screen is off. However, some services continue to wake the CPU and eat battery alive… Enter Llama and Greenify. Greenify, in its root version, allows the switch of of background applications that one chooses. Greenified apps loose the ability to continuously poke the processor or network sevices. Altogether, when the screen is off, the phone sleeps withoug draining much current.

Another important element in the battery saving battle is Llama (for location aware management of Android, I think). Llama can learn the radio antennas that are closest to my home, and allow some events to be programmen either when I come home or when I get out. My Llama, for example puts off the PIN security lock screen when at home and puts it back on when on the street (just in case the telephone is stollen or lost). Most importantly, Llama can switch off any active WiFi or data connection when the screen is locked. Thus, such connexions are only active when I need them. From 14 hours of battery life for the notoriously bad (for this) Xperia V, Greenify and Llama got me to this type of situation (about 2 days, with light usage):

battery_usageRooting is not without risks but, with the Xposed framework, great tweaks become possible on modern Android systems (Jelly Bean and up). For the Xperia V, the tweaked stock launcher is a very capable one and I don’t feel any need to change for another launcher.

MRC Compose – better handling of recipient addresses by Thunderbird mail

Ever since I began using Thunderbird as my regular mail client, ten years ago, I was annoyed by the way the window to compose a new mail was organized. To add a new recipient, one had, and still has, to click over several lines of text input. It is not practical, does not save screen space and does not allow very simple things like pasting a list of comma-separated e-mail addresses in the “To:” field.

This annoying interface problem is solved by MRC Compose, a fantastic addon for Thunderbird. The compose window looks now like this:

MRC_compose_screenshotThe interface is in French, sorry, but it shows how you can add as many recipients as you like in a single entry field. The cogwheel on the left allows adding other fields (Cc, Bcc, Fw, Reply) to be added. To have some of the fields persistent, the Preferences of the addon allow that.

Altogether, an excellent addon that does one thing really well.

PS The theme used for the screenshot is Silvermel.

PPS. Another great extension, useful if you send Word files from a Mac to people who do not use Thunderbird is no application/applefile.

UPDATE: The MRC Compose and the Conversations add-ons are the ones that I constantly use on Thunderbird. Long live open-source Thunderbird!

Android apps list for busy people

Comments on several Android applications that transform a smartphone in an entertainment and work tool. Updated in December 2016.

Lightning Launcher and apps
Lightning Launcher and apps (1 screen and a half)

I hate pages with titles like: the ten best music players for Android! Best is a “superlative” and should be used for a single app, not ten, even if I will contradict myself in the e-book reader section of this guide. I’m relatively new to the Android platform since it has only been two years that I first struggled with the interface of a phone with the modern, at that time, Gingerbread, or 2.3 version. Earlier exposure to Android, on an Archos tablet, was really getting me into the prehistory of the operating system (version 1.5). I have also experienced the earlier, almost smart, interfaces provided by Nokia in the form of the modest Symbian S40 (Nokia 6600 slide) and the very capable S60 (Nokia N97 mini).

What did I learn from two years of intensive use of Android apps on a Sony Ericsson Xperia Pro device?

First: there are too many apps available on the PlayStore and, unfortunately, their quality varies wildly. Testing all of them is impossible, so I stayed with those having reasonable marks from a large number of users. The number of open source apps is relatively small, which takes us back to the ’90s when small programs were most often of the freeware or shareware type. Let’s hope developers will come to reason if they hope to give birth to long term projects. Most freeware/shareware that I know of have been replaced over time with open source equivalents. Or changed to different business models, like Opera software did with their browser.

The following apps are useful and either open source or free of advertising (I really appreciate developers that accept donations for their work or state clearly in the app description if it is ad supported). They are classified by type of activity in which the apps play a role.

Basic or fundamental utilities

messagease

MessagEase keyboard: the only virtual keyboard that allows the typing without looking and with no need for a dictionary. The letters are formed on a 9 cell matrix by typing or swiping in one direction or another.I type faster now with MessagEase than with the physical keyboard of the Xperia Pro. As proof, I had actually typed most of this guide on my phone with MessagEase. This keyboard needs some training, which can be quite enjoyable when playing the MessagEase game. Once you reach 20 wpm in the game, you will find that going back to traditional virtual keyboards is next to impossible. Accessing capital letters requires some special gestures, circle the main letters or do a double swipe on others. Numbers are also entered directly from the main keyboard or on can switch to a phonepad like layout. Countless ways of customization are available, one of the most useful being that one can keep visible a series of characters that are most useful (“%”, “-“, for example). One can add to the main screen the most used characters or hide some of the least used ones, adjust the size and colors and back and forward delete characters or words.

An alternative, that I recently described in another blog post, is MultiLingO, that allows infinite customization of the keyboard, including a copy of most of the functionality of MessagEase (edit Dec 2016)

googlegest

GestureSearch by Google: absolutely fantastic way to find contacts or apps on the phone by simply drawing the first few letters. Should be installed by default on all smartphones.

Edit 2016 – Not using it much any more. Draweroid is enough to find the apps quickly. It has also the advantage of usability with any launcher.

xplore

X-plore: a great dual pane file manager that gets things done®. It also incorporates efficient viewers for pictures, videos or text files and operates well with compressed archives. The different operation are done on a selection of files or folders through a row of icons for copy or move, share, create new folder, create zip. Fullfills all my file manager needs on Android (I confess on using Krusader on the PC).

Update 2016: I like and use in paralllel another dual-pane file manager, called Total Commander. Works very well.

simplecalendar

J4velin apps: these are extremely impressive and useful apps from the same developer: Notification toggle and Simple Calendar widget. The widget is scrollable and easy to customize and just extremely useful. Simple Calendar allows very nice customization options for text color, background and font size. Beautiful.

Update 2016: I still use Notification toggle, but replaced Simple Calendar with the widget that comes with aCalendar+. The situation is better nowadays, with Google Agenda also providing a reasonable widget.

atomlauncher

Atom launcher and its widgets. For quite a long time I was a fan of Lightning Launcher, then reverted to the Sony original one and re-reverted to a lightweight launcher called Nemus. What was impressive with Nemus was the gain in battery life from one day to one and a half. Nemus has not been updated in a while, so I searched for the team that developed it. I thus found Atom, presumably an evolution of Nemus, a launcher that has a few nice features: a calendar widget that shows the current month or the previous and next ones, an app drawer in which you can hide all the apps that you don’t use but cannot uninstall (thus unnecessary poluting the list) and other small features that ease the user’s life.

Update 2016: Lightning Launcher has only a paid version, which is annoying for people who would like to try it out. Surprisingly, the ZenUI launcher from Asus is very good, but my current preference goes to the exceptional TSF Launcher 3D. Smooth, easy to customize to any liking, the TSF Launcher replaced all the others for my use.

Lightning Launcher was in the end the best choice for the type of customization I prefer – extreme. Very convenient, it allows me to have just one single screen with all the information I need and easy access to my most important apps and contacts. Actually, the screen is longer than the physical screen, so it should me more accuractely described as a 1.3 screens long.

notepad

Notepad by plattom: There are many notepad application in smartphoneworld but none is such well thought as this one. It does only text but it does it extremely well. You don’t need to save any note you take, it is saved automatically. Notes backup is very easy either as text or as an sqlite file. The search function works very well and the aesthetics of the app is perfect. Note sharing is also very straightforward. Altogether, Notepad strikes the perfect balance between being simple, nice and having the whole set of features you would expect from such an app.

Update 2016: Two updates in the last 2 years. For some time I used ColorNote, a great note-taking alternative to Notepad. One day, I wanted to export all the notes in a single text file and understood that it is not possible. Thus, since that day, I changed for a great open-source alternative called OmniNotes.

quickpic

QuickPic: small, fast and extremely useful picture and video viewer. It can be configured to ignore some folders and look for pictures in others.

Update 2016: I’m using a lot Piktures, as an alternative.

phoneschedule

PhoneSchedule: helps keep the battery for up to two days under moderate use by switching off WiFi and data access automatically. One can program many different phone actions at a given time of the day or the week. Well done scheduler with minimal memory footprint.

acalendar

Jorte and aCalendar/aCalendar+: I was a long term user of Jorte despite the awful French translation (‘Fixer’, par exemple, used instead of ‘Enregistrer’) and the rather strange nature of the Jorte Store – where you can buy colorful, hello kitty like pictures and icon sets. Recently, the ‘add event’ plus sign disappeared from the agenda view and I switched to aCalendar+. While I liked the possibility of adding icons to events and using various colors and fonts for calendar display in Jorte, these are only minor features missing from aCalendar. The most important dialog, to add an event, is well done in aCalendar and swiping to week, month or day view works well. In both cases, free, feature limited version of these calendar applications exist.

Reading DRM-free books and news

As my phone is also my ebook reader (or the other way around), I’m using several readers at the same time, each one with its own strengths and weaknesses. A special mention goes to CoolReader and FBReader, two readers that are not only free but also open source. Other great book reading applications are: ALReader, ZXReader and Google PlayBooks.

I refuse to read books with DRM protection and I’m very glad that some publishers, like O’Reilly (for technical ones) or Baen (for science-fiction) are providing uncrippled files for their ebooks. So, most of the readers reviewed here are not suitable for DRM protected files. Fortunately, tools exist to remove the protection, if so you wish but, in most of the cases, you will need a working Windows or MacOSX environment.

The best reader for complex epub files is the one from Google. However, getting to read your own books with this reader is pretty convoluted: first you need to upload your files to Google Drive. Next, you import the file back to Play Books and pay attention to make the book available offline. This will allow book reading without a network connection. For some reason, the offline reading does not work all the time and sometimes the application keeps a black screen until Internet connection comes up. Aside some epub files that are beautifully rendered by Play Books, there is no other major reason to use it.

coolreader

CoolReader has been for some time my main and only book reader. Since the main features are the same with other good ebook readers, I will only write here some of the annoyances when using one or the other of the apps presented here. For CoolReader, complex epub files may be hard to handle. It is buggy on very old Androids. Apart that, it is a really cool e-book reader.

fbreader

FBReader is a fast reader that I’m not using often during the night since its backlight control does not go down enough on my phone. Works very well on old Android (v 1.5). Like CoolReader, the developers are very active in making it better and better.

zxreader

ZXreader is a minimalist reader that has a Symbian S60 ascendance. Very pleasant and fast, it has also the smaller size in terms of sd card occupied space. No reason not to use it apart its close source origin. Some users complained about the character set that has sometime to be manually reset to UTF-8. Not a major problem, though.

alreader

AlReader is the most customizable of the five mentioned. One funny feature that puts it apart is the ability to change the appearance of the first letter of each paragraph. In addition, the ability to add weight to the font used for reading is a big plus. Looks beautiful and works flawlessly.

documentviewer

Document Viewer is not for epub but for pdf files. Fast and reliable.

aarddictionar

Most of these readers can be used with offline dictionaries and a nice one is Aard. I’m using it with a local copy of the WordNet dictionary.

feedex

Pulse: news aggregator – I was using Taptu but the arrogant answer of a person from Taptu’s team to my suggestion that long articles should have an option to be read page by page, like it is always the case with ebooks, made me change. In the last year I almost exclusively used FeedEx, a fantastic open-source RSS reader. Simple, beautiful, fast.

Music and sound

fplay

Mort Player – a very nice music player that uses the folder strucutre to let you explore and play the music you want the way you want. It also offers an equalizer and, most importantly a Quit menu entry. Replaced by the more recent and minimalistic FPlayer. Open source and a great developer.

voicerecord

Voice Record for good quality recordings that can be easily encoded as mp3s by the app itself.

DaTuner or DaTuner Pro for sound analysis and guitar tuning, for example.

vlcNothing beats VLC for playing audio and video files “in style”.

Edit 2016: Also, VLC can play many kinds of streamable content, including online radio stations, as long as you know their address.

Communication and navigation

operamini

Opera Mini – the only browser working great on low speed networks. Sometimes, I need to change to the default Web Browser for complex pages.

mapfactor

GPS navigation: MapFactor Navigator and Google Maps and Nokia. I used to use the older Nokia for GPS navigation and it worked and still works great. Google Maps is good to have and, in the absence of a network connection, Navigator’s offline capabilities is a plus. Sometimes the open maps are mors deailed than what Google provides.

solmail profimailgo

Yahoomail, Gmail and the integrated Mail client are kind of standard. I appreciate YMail for its ability to send any kind of attached file (Gmail and Mail were restricted to images). SolMail and ProfiMailGo (restricted to a single account) are excellent mail clients for IMAP or POP3 protocols.

Local utilities: RATP was essential if you take the bus in Paris. Gave time schedules in real time and plans for all the public transports around Paris. The major revision during May 2014 made it useless on my phone because it require services that I cannot install (Google Play things). Abandoned.

Other useful apps

mathdroid

Mathdroid for a complex scientific calculator that understands expressions like log2(26). Simpler, and with a nice interface is Calc Etc.

Search Light – for finding your path in the dark.

swissarmyknife

Swiss army knife – of useful utilities including a very useful multiple timer, compass, calculator and unit converter.

aweatherlife

A weather Life – for a clean weather forecast widget and app.

estopwatch

Egg Timer – for easy count-down with alarm and eStopWatch for measuring elapsed time (very small utilities that do one thing but do it well).

wualaWuala – the Android client for the corresponding cloud storage offer. Really useful if you are a little bit paranoid about your data being read by someone else. Encryption at device level ensures some data privacy and minimizes the possibility of private data becoming public. Wuala is no longer a free option. Great replacement is SpiderOak and a generally useful and generous free cloud space can be found in Hubic’s offer.

advancedclockwidgetAdvanced Clock Widget and its Pro version offer a configurable clock with supplementary information. Great working and does not drain battery.