January 5, 2011, 11:12 am
csplit does this quite neatly:
csplit -z myfile.fas '/>/' '{*}'
Default output filename is xxNN (where NN is a integer). you can use something other than xx by specifying a prefix with –prefix=PREFIX.
Note, this command assumes that the contig title don’t contain a > except for at the start of the line. You can probably do something like ‘\n>’ or ‘^>’ to insure it must occur at the start of the line.
January 3, 2011, 9:37 pm
Amuse and amaze your friends with the ability to type accented characters on a standard UK mac keyboard!
Simply press alt+U followed by the letter of your choice, for example O ööööööööööö see how much that rocks? Of course you do.
January 3, 2011, 9:35 pm
The chuck on my Dermel broke (while I was using it to fix a Linux laptop!!). I was curious to know what went wrong inside so I hackered it open. Picutres here:
That “round thing” that pushes this grippers somehow got dislodged I guess the grippers were pushed out far enough to allow a gap which it fell out into… isn’t that interesting!!! !
January 3, 2011, 9:32 pm
This a post migrated from my old blog at Linuxjunk:
If you ever go work at Sanger and you’re a UNIX/mutt/pine user get them to put you on the UNIX mail server not the Exchange server, once they’ve set you up on one they’ll never change it… If you’re on exchange it’ll be a world of pain and mutt will take 30mins to open your mailbox over IMAP (fact).
However, if you do find yourself on an exchange server you can use fetchmail to grab your mail and filter it in to a mailbox using procmail. Here’s the fetchmail config I use at Sanger, put this in .fetchmailrc:
set postmaster YOURUSERNAME
poll exchsrv2 with proto imap user "YOURUSERNAME" there with password "YOURPASSWORD" is "YOURUSERNAME" here keep options stripcr
mda "procmail -f %F"
This is my .procmailrc it also forwards to an external address as well as delivering to a local mailbox:
set postmaster YOURUSERNAME
SHELL=/bin/sh
DEFAULT=/var/mail/YOURUSERNAME
LOGFILE=/Users/YOURUSERNAME/procmail.log
MAILDIR=$HOME/mail
DEFAULT=$MAILDIR/inbox
PMDIR=$HOME/Procmail
INCLUDERC=$PMDIR/rc.subscriptions
:0c # That's colon, zero, lowercase cee
! [email protected] # That's exclamation mark, address to forward to
You’ll need to configure postfix or whatever (I’m on a Mac) to relay mail via the local SMTP server as well. For postfix/max stick this in main.cf:
relayhost = mail.internal.sanger.ac.uk