Tutorials

Level-up your code with tutorials covering python, data & science, web and GUIs.

Partial Least Squares Discriminant Analysis (PLS-DA)  data-science

Partial least squares discriminant analysis (PLS-DA) is an adaptation of PLS regression methods to the problem of supervised1 clustering. It has seen extensive use in the analysis of multivariate datasets, such as that derived from NMR-based metabolomics. In this method the groups within the samples are already known (e ... More

1D 1H NMR data processing  science

1D 1H NMR is a common technique applied to metabolomic studies, being well suited to untargeted analysis of complex biofluids. It has been successfully applied to the classification and diagnosis of a number of diseases including [ref]. There are a number of important steps that must be applied prior ... More

Getting Started with Pathomx  data-science

This is quick start-up guide for new users of Pathomx. Following it should give you everything that you need to know to start using Pathomx right away. Once you've been through the basics you might like to see some of the demos to see what Pathomx is capable of ... More

Automatic phase correction of NMR spectra  science

This notebook demonstrates automatic phase correction algorithms implemented for nmrglue. Two standard algorithms are implemented: ACME algorithm by Chen Li et al. Journal of Magnetic Resonance 158 (2002) 164-168 Naive peak minima minimisation The outputs for the two algorithms are shown below. Automatic phase correction can be used through the addition of an autops More

NMRLab 1D NMR processing (MATLAB)  science

This notebook uses a subset of the available processing features in NMRLab (+Metabolab) to process 1D NMR spectra. The output is saved as a CSV file that can be imported into pandas, PLS_Toolbox or any other package for subsequent analysis. To use this workbook you will need an installation of MATLAB More

MetaboHunter 1D NMR Identification (Python Interface) Demo  science

MetaboHunter is a web service for automated assignment of 1D raw, bucketed or peak picked NMR spectra. Identification is performed in comparison to two publicly available databases (HMDB, MMCD) of NMR standard measurements. More information about the algorithm is available in the published paper: Tulpan, D., Leger, S., Belliveau, L., Culf, A., Cuperlovic-Culf, M. (2011). MetaboHunter: semi-automatic identification of 1H-NMR metabolite spectra in complex mixtures More

BioCyc Interface Demo  science

This notebook is a quick demo of a BioCyc Web API I've released for Python. While incomplete the API offers access to most basic attributes for metabolites, proteins, reactions, pathways and organisms in the database. The Python interface comes with an disk-based caching mechanism under ~/.biocyc that greatly reduces the delay (and load) for BioCyc servers. More

Dot Blot Analysis with ImageJ  science

Analyzing a dot blot in ImageJ by background subtraction and measuring the integrated density of each dot. This dot blot image is available in the File/Open Samples menu in ImageJ 1.33s or later. Method This method usually requires background correction of the image, which can be done using ... More

Measuring cell fluorescence using ImageJ  science

Determining the level of cellular fluorescence from fluorescence microscopy images in ImageJ Open ImageJ. Note: ImageJ may be freely downloaded from [here](http://rsbweb.nih.gov/ij/download.html) Select the cell of interest using any of the drawing/selection tools (i.e. rectangle, circle, polygon or freeform) From the ... More

QColorButton: A color-selector tool for PyQt  gui

Below is a short snippet to implement a color-picker attached to a button in Qt. Clicking on the button pops up a dialog (native) to select a color. The color is shown by the color of the button face. A right-click option is included to allow clearing of the color ... More

Pathomx: Example Analysis  science

Short demo of an experimental analysis of metabolomic (NMR) data using Pathomx. Metabolomic test dataset produced from THP-1 cells grown under normal and hypoxic conditions. Spectra (2D 1H JRES) have been pre-processed and quantified using the BML-NMR service. The video shows an example analysis from processed data through to metabolic ... More

cx_Freeze and PySide on Mac  gui

I'd had success using py2app for building Mac binaries for distribution but wanted to give cx_Freeze a go since it's cross platform - allowing builds for Windows, Linux, and more. Unfortunately, attempting to build using cx_Freeze was resulting in errors: libpyside-python2.7.1.1.dylib: No such file or ... More

Pelicans on Webfaction  web

As mentioned in the previous post, I recently migrated this site over to the very clever Pelican. Setting it up was relatively straightforward using a combination of the official docs, this post and linked github repo from Dominic Rodger. That said, there were a few things that I stumbled at and non-obvious decisions that I've documented below. More

Speed up MATLAB on MacOS X  mac

On MacOS X 10.5 there is considerable slow-down in the MATLAB editor and other GUI elements. The issue is related to a change in the default Mac Java 2D rendering engine from Quartz2D (10.4) and Sun2D (10.5). This newer rendering engine improves performance for figure drawing, but ... More

Customize directory colors  bash

You can use the command ls --color (or an alias) to show directories with colours for folders, files, links, etc. However, you may not realise these colours can be easily configured using bashrc and a configuration file. Edit your .bashrc file (in your home directory) to include the following line ... More

Control memcached from the command line  bash

memcached is a general-purpose distributed memory caching system originally developed by Danga Interactive for LiveJournal but now used by many other sites. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such ... More

Page 0 2