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 ‘Setting up NCBI wwwblast on Ubuntu 8.04 (Hardy), Apache 2′
So, here is my half-baked idea:
Why not have a special week where new online collaboration tools are promoted to scientists globally ?
Similar to the way local Linux user groups sometimes run “installfests” to install Linux for users, (just to get them over the initial interia), why not have a global “signup-fest” for the core set of online tools useful for scientific collaboration ? In each local area / University / Institute, a few Web2.0 savvy scientists could promote the event and hand-hold new users through the signup process, and help with basic usage and integration of tools. Ideally, lab groups could signup together in the same room, and make an event of it. Or in places with Wifi … a “bring your laptop” signup lunchtime event. I think you get the idea.
Continue reading ‘A “Web2.0 for Scientists Week”: signup-fest ?’
Update: I’m typically using Google Chrome or Chromium these days, so it’s unlikely I’ll update this script in the future. For a similar extension for Chrome, try the EZProxy Redirect extension.
Many University libraries use some server software called Ezproxy to do authentication and arbitrate access to full-text online journal subscriptions. Essentially, Ezproxy uses some URL mangling, rewriting all hyperlinks, to pass traffic via the proxy (rather than using a conventional browser proxy setting). For example, http://www.sciencemag.org/cgi/content/full/313/5785/314 is changed to http://www.sciencemag.org.ezproxy.lib.unimelb.edu.au/cgi/content/full/313/5785/314 . If the user is not logged in to the proxy (ie has no fresh & valid cookie), a login screen is given before being forwarded to the journal site.
This plugin helps mangle URLs to add the proxy domain to outgoing links from various journal sites as well as NCBI PubMed (eg, like .ezproxy.lib.unimelb.edu.au), meaning that the user doesn’t actively have to go to their library site to follow “ezproxy-fied” links. It makes getting full-text articles via the institutional library proxy a more seamless experience (assuming that your library subscribes to the journal).
The plugin contains a list of journal and publisher sites at which it is active, plus some “special case” code for making sure only fulltext links outgoing from NCBI PubMed are handled. You can add your own journal sites as needed.
The user needs to edit the variable proxyname to make the script use their institutions EZproxy … I can’t really help you with that part, since I only know that my workplace (The University of Melbourne) uses .ezproxy.lib.unimelb.edu.au .. beyond that, you are on your own
!
I’ve uploaded the Library Ezproxy Forwarder script to Userscripts.org

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.
Continue reading ‘Software review: producing two dimensional diagrams of membrane proteins’