Should scientists learn C++?

Conventional wisdom dictates that compiled languages are slow to develop, can be slow to compile, but are fast to run. Interpreted languages are easy to use and do not require compilation but have sluggish performance. Like most people in scientific computing, the first two languages I learned were C++ and Python; I use Python every day but when, if ever, would I use C++?

Continue reading

Spring 2019 ACS National Meeting (Orlando)

This blog post is jointly written by Lucian, Joe and Susan who recently attended the Spring ACS National Meeting 2019.

Susan, Joe and Lucian at the ACS conference.

The Spring ACS National Meeting was held in sunny Orlando, Florida and was a five day event (29th March – 4th April). The temperature averaged 25°C , which was amazing compared to the UK (sorry) and meant we all got a lovely tan. We all presented our work in the form of talks in the divisions of COMP or CINF but in this blog post we write about our highlights of the conference.

Continue reading

Quick Python tricks

It’s always fun when you stumble across something in your programming toolkit that you had never noticed. Here are three things I’ve recently enjoyed learning.

  • Ternary syntax
    a = int(raw_input())
    is_even = True if a % 0 == 0 else False
  • Enumerate

I’ve been looping over the length of my list, all these years, like a chump. It turns out you can do this:

for index, item in enumerate(some_list):
    # now the index of each item is available as well as the item    
# Don't do do this
for index in range(len(some_list)):
    item = some_list[index]
  • for… else

Every so often, you really need to know that a for loop has run to completion. That’s what for…else is for!

for item in iterable:
if item % 0 == 0:
first_even_number = item
else:
raise ValueError('No even numbers')

More Fun With 3D Printing

Recently the students of the Systems Approaches to Biomedical Science Centre for Doctoral Training took a 2-week module on our favourite subject: structural biology! As part of this, they were given the option to create their very own 3D printed model of a protein.

This year we had some great models created, some of which are shown in the picture above. The proteins are (clockwise from top left):

  • Clathrin (PDB 1XI4) – a really interesting protein that forms cages around vesicles inside the cell. This one was mine; I wrote about clathrin as part of my undergraduate dissertation many years ago…
  • GTPase (PDB 1YZN) – a protein that can bind and hydrolyse guanosine triphosphate (GTP), involved in membrane trafficking
  • TAL effector (PDB 3UGM) – this bacterial protein binds to specific regions of DNA in a host plant to activate the expression of plant genes that aid bacterial infection. The DNA here is in blue, the orange wrapped around it is the protein.
  • Mechanotransduction ion channel (PDB 5VKQ) – converts mechanical stimuli into electrical signals in specialized sensory cells.
  • ATP synthase – this protein machine builds most of the energy storage molecule ATP, which powers our cellular processes.
  • DNA (PDB 5F9I) – a double-helix strand of DNA, 20 base pairs long.

Property based testing in Python with Hypothesis : how to break your own code before someone else does

Traceback (most recent call last):
ZeroDivisionError: integer division or modulo by 0

We’ve all been there. You’ve written your code, tested it out on some toy data and then when you make the move to the real data, there was something you didn’t expect.

Maybe some samples have been truncated to zero. Maybe the input arrays are the wrong shape. Suddenly your code comes crashing down around you, and you’re left thinking: well how could I have known that was going to happen? I can’t test everything

Continue reading

A gentle primer on quantum annealing

If you have done any computational work, you must have spent some time waiting for your program to run. As an undergraduate, I expected computational biology to be all fun and games: idyllic hours passing time while the computer works hard to deliver results… well, very different from the more typical frenetically staring at the computer, wishing the program would run faster. But there is more — there are some problems that are so intrinsically expensive that, even if you had access to all the computers on Earth, it would take more than your lifetime to solve a slightly non-trivial case of them. Some examples are full configuration interaction calculations in quantum chemistry, factorisation of prime numbers, optimal planning, and a long, long, etcetera. Continue reading

A blog post about a blog

I thought I would make this blog post very meta by referring to another blog, written by Lior Pachter, which I think has something for many of us in it: http://liorpachter.wordpress.com (networks people, there’s a pretty scathing take-down of a quite well cited 2013 paper as one of the last posts – there seem to be a couple of posts labelled “network nonsense”!)

In particular I refer you to the list, that Lior Pachter has curated, which includes all variations of *-seq. You’ll see that practically all sequencing protocols take on this nomenclature of catchy descriptor + seq.

You will have heard mention of Ig-seq in talks by antibody people (with all Ig-seq experiments being curated in OAS by Alex). Ig-seq comes under the “Phenotyping” section of Lior’s list.

Continue reading

Not-Proteins in Parliament

Last term I took a break from folding proteins to spend three months working in Westminster at the Parliamentary Office of Science and Technology (POST).

The UK Research and Innovation (UKRI) Policy Internships Scheme gives PhD students the opportunity to spend three months in a range of policy-relevant organisations, from Government departments to the Royal Society. Applications are open to research council funded PhD students (currently including EU students). The scheme includes a three-month stipend extension, and travel/accommodation expenses are covered either by the host partner or the training grant holder.

Continue reading

Journal Club: Investigating Allostery with a lot of Crystals

Keedy et al. 2018: An expanded allosteric network in PTP1B by multitemperature crystallography, fragment screening, and covalent tethering.

Allostery is defined as a conformational/activity change of an active site due to a binding event at a distant (allosteric) site.

The paper I presented in the journal club tried to decipher the underlying mechanics of allostery in PTP1B. It is a protein tyrosine phosphatase (the counter parts of kinases) and a validated drug target. Allosteric binding sites are known but so far neither active site nor allosteric site inhibitors have reached clinical use. Thus, an improved mechanistic understanding could improve drug discovery efforts.

Continue reading