You may already be familiar with YubNub; it describes itself as “the social command line for the web”. Most commands consist of two (or more) words … one for the search engine, the other for the query.
For example, typing:
gg open science on friendfeed
into the YubNub search box searches Google for “open science on friendfeed“, via YubNub.
I thought I’d highlight a few life science- and bioinformatics-related YubNub commands I find myself using quite often in my day-to-day work. Some are commands I created, others someone else created. This is the beauty of YubNub … often someone has already made the ‘obvious’ command … it’s worth just trying to search with a command you expect to exist, since it often does.
Sometimes it’s nice to quickly check how many sequences are in a FASTA format sequence file.
It barely warrants it’s own blog post, but here we go anyhow: my one-liner shell script for counting the number of sequences in a FASTA “flat-file database”, based on the presence of the “>” header symbol.
#!/bin/sh # ~/bin/countseqs # Counts the number of sequences in a FASTA format file grep">" $1 | wc -l
Dead easy huh ? I put this in ~/bin/countseqs, make it executable (chmod +x ~/bin/countseqs) and use it in lots of situations, as a quick sanity check.
(oh, btw, this is not public domain and u can’t use it for commercial gain without paying me a license fee. academic users can fax me something for a free license. k thx bye).
Couldn’t help myself … everyone else is doing it 🙂
Recently I needed to install NCBI wwwblast on my local workstation to enable some software that needed to interface with BLAST via the web service. It was straightforward to install, but I took some notes, because there were a few changes required with respect to the official wwwblast documentation at NCBI. These instructions are for Ubuntu 8.04, but probably will work with many recent flavours of Debian. Continue reading →
I recently needed to make a simple, two dimensional figure of a beta-barrel membrane protein. I went hunting for programs that might take a sequence and/or structure and produce a pretty looking diagram to save me constructing everything by hand. Here are two I found and tried.
Suggest/autocomplete for journal title field, using the journal title lists provided by PubMed.
A “Verify” button. Allows a ResolveRef URL to be constructed with the web form and verified as working and valid without actually forwarding the user to the article.
Some bugfixes (handled the case where there is no DOI in the PubMed record, handled network timeouts to PubMed)
Disqus comments box for feedback
In the interest of just getting something working quickly, I implemented the suggest feature in the laziest, possibly most RAM and CPU hungry way possible (the “JQuery Suggest” code queries the web app with substrings as you type each character. At the server side, the app uses a regex to scan a ~1.5 Mb list of journal titles held in RAM). I’ve already noticed a few “This request used a high amount of CPU” warnings in the logs, with the threat “High CPU requests have a small quota, and if you exceed this quota, your app will be temporarily disabled“. If my nasty hack starts heating up Google’s datacentre too much, I might have to disable the ‘suggest’ feature until I can implement it “properly”.