NetworkX — Get all Paths from all sources to sinks

Posted on Wed 04 November 2015 in Tech

Often when I'm working with graphs and a set of masses in a spectrum I need to be able to iterate over all paths for all sources and sinks in that graph. Especially if I'm looking to compare multiple ideal spectrums against a given spectrum. Here's some code that will …


Continue reading

Generate Binary Tree From String

Posted on Tue 27 October 2015 in tech

Recently while implementing the Small Parsimony Problem I had the need to generate a binary tree from a string in Python.

The pseudo-code in the question implicitly assumes you have some functionality that will generate a DNA sequence like CAAATCCC into a binary tree, then run SmallParsimony on it. I …


Continue reading

SugarCRM — Conditional Actions

Posted on Thu 15 October 2015 in Tech

Say you need to hide certain actions in Sugar depending on the status of a field, I've come across a great snippet of code from an awesome comment by Felix Nilam on the SugarCRM forums and wanted to show you a brief snippet of how it could work.

Make sure …


Continue reading

Bioinformatics/Rosalind — Skeleton Generator

Posted on Sun 27 September 2015 in Tech

Working through part 4 of my Cousera Bioinformatics specialisation, I decided to write a generator that creates a standardised approach to structure, write and test your algorithmic code. It also works for Rosalind problems.

Explanations are in the README. If you have any issues or are confused by anything, feel …


Continue reading