Category Archives: Uncategorized

ShinyFlan: a replacement for FALCOR (Fluctuation AnaLysis CalculatOR)

FALCOR was for a long time the easiest way to analyse fluctuation test data. Some time ago, the site hosting the FALCOR Java applet went offline.

Enter ShinyFlan, an alternative to FALCOR that uses the R package flan via a Shiny web interface. ShinyFlan was created by Adrian Mazoyer.

Associated with our Journal of Visualized Experiments paper on fluctuation tests, The University of Manchester currently hosts ShinyFlan here:
http://shinyflan.its.manchester.ac.uk/

How to make ggplot look like base R graphics

After being steadfastly against anything in R beyond base, I’ve recently been indoctrinated into the tidyverse way of doing things. In particular, ggplot and extensions has made making complicated plots a lot easier than using base graphics (especially ggpubr’s ggarrange() function for labelling panels, which I used to do with mtext()). However, I’ve never been a huge fan of the ggplot aesthetic, being trained from a young age to eschew “chart junk“, like grid lines and unnecessary backgrounds. It’s fairly easy to do, with a few modifications of ggplot’s theme_bw(). Include this code before your ggplot commands:

Continue reading

DIKmZ8OXoAEOONG

I visited the one and only microbe museum-, Micropia in Amsterdam in August, following the ESEB meeting in Groningen.  Highly recommend for anyone with an interest in microbes or science in general.  Very interactive.

BibTeX database from PDFs via DOI

This somewhat-ridiculous BASH one-liner will create a BibTeX database file (.bib) from a bunch of PDFs via the Crossref API for DOIs, providing the PDF has a DOI on the first page.  As DOI was introduced in 2000, this will probably not work on vintage PDFs.

 for pdfs in *.pdf; do pdftotext -f 1 -l 1 "$pdfs" - |tr -d "\n" | grep -oE "(doi|DOI):\s?[A-Za-z0-9./-\(\)-]+[0-9]" | tr '[:upper:]' '[:lower:]' | sed -r 's;doi:\s?;http://api.crossref.org/works/;g' | sed -r 's;$;/transform/application/x-bibtex;g' | xargs curl -fsS 2>/dev/null | sed -e '$a\'; done > allpdf.bib

Experimental evolution with the Singer ROTOR HDA

Setting up a large selection experiment on antibiotic fitness landscapes. I’ve decided to use the Singer ROTOR HDA for consistency and repeatability. The Singer ROTOR HDA uses a pre-sterilized pad system (called RePads) to transfer bacteria between solid or liquid medium. RePads are available in 96, 384, 1536 or 6144 formats. Read more about the Singer ROTOR HDA.

Vented versus non-vented Petri dishes

Vented Petri dishes have a small lip on the top edge of the dish that allows the lid to sit a little up from the bottom, allowing for some air flow.  Non-vented Petri dishes allow the lid to sit more or less flat on the bottom.  I was wondering what the best applications are for triple, single and non-vented Petri dishes, and found this guide from Thomas Scientific (link is dead).

  • Triple vented: aids gaseous exchange. Ideally suited for short term work
  • Single vented: limits gaseous exchange, minimizes evaporation and dehydration. Ideally suited for long term work
  • Non-vented: most suitable for anaerobic and long term work

Edit 28-02-2019 there’s an even better summary from Tritech Research:

Some of our dish models are available in both “vented” and “non-vented” styles. Standard Petri Dishes are always vented, so if the don’t say vented or non-vented, you should assume they are vented. “Vented” means that the lid is slightly elevated above the base. This allows for good, plentiful air exchange. This is useful when you want to encourage evaporation, for example, when you want to use poured plates as soon as possible, and the plates themselves, or a liquid seeding solution, needs to dry beforehand. The basic design of the dish tends to maintain sterility because particles would have to go up and over the dish’s wall to get inside, and this is rare in normal airflow.

With “non-vented” dishes, the lid fits quite flatly on the base. While it is not a hermetic seal, the space between dish and lid is extremely small. This results in even less potential for external contamination and a significantly reduced evaporation rate. For example a 60mm vented Petri Dish containing 10ml of agar medium typically dries out in 2-3 weeks; whereas, a similar 60mm non-vented dish typically lasts 2-3 months. Most C. elegans labs, except those in very humid climates, prefer the non-vented dishes. Non-vented dishes provide sufficient air exchange for the worms to breathe while greatly increasing the life of the dish.

150-x-20mm-petri-dish

Non-vented Petri dish

10pcs-55mm-x-15-mm-polystyrene-bacteria-culture-font-b-dish-b-font-disposable-sterilized-font

Vented Petri dish

JMP report file .jrp file to csv

Here’s a quick and dirty Perl script to get a data table out of a .jrp file from JMP.  Not guaranteed to work for all files, as I’ve only tested it on one (so modification may be necessary).

#! /usr/bin/perl -w

use strict;
use Getopt::Long;
my $jmp_file;
my $colhead;
my $values;
my $row;
my @records;
my $ndata; 
GetOptions ('jmp=s' => \$jmp_file) or die("Error in arguments\n");

open (JMP,"<$jmp_file") || die "cannot open JMP input file $jmp_file";
while(<JMP>){
chomp;
if($_=~/New Column\(\s\"(.+?)\",.+$/){ # Get column names
 $colhead=$1;
}
if($_=~/Set Values\(\s[\[\{](.+?)[\]\}] \) \),/){ # Get row values
$values=$1;
my @row = split ", ", $values;
unshift @row, $colhead;
$ndata= scalar @row;
push @records, \@row;
}
}

# Rotate table 90 degrees (rows-to-columns)
my $nrecords=scalar @records;
for(my $i=0;$i<$ndata; $i++){
for(my $j=0;$j<$nrecords;$j++){
print "$records[$j][$i]";
print "," if $j<($nrecords-1) 
}
print "\n";
}