C++ for beginners

In this tutorial, I’m going to provide an introduction to the basics of the programming language C++. I’ll describe how to compile your first program with the gcc compiler on Linux and Mac, although the code should also work on Windows using the Visual Studio compiler. If you’re new to programming, I’d probably recommend getting started …

Read More
How to create random DNA sequences with Python

Python’s random module makes it extremely easy to generate random DNA bases. Now to generate a specific number of random bases, all we have to do is use Python’s range function:

Read More
RStudio panes
R Tutorial

This tutorial is a beginners guide for getting started with R, once you complete it you should have R installed on your computer and be able to import data, perform basic statistical tests and create graphics. Index Getting started Basics Importing Data Tests Graphics Packages Getting Started The first things you will have to do …

Read More
BioPython Tutorial

This tutorial is a brief overview of what you can achieve using the Python BioPython module. Although I’m hoping to write up some more articles on this site for beginners when time permits, this post will assume that you have experience programming in Python and have a bit of an understanding of basic biological concepts …

Read More
Pyral Project

Pyral (Python + Viral) was the name of a project I worked on in Dr Joanne Macdonald’s lab between September 2012 – January 2013 (although I am still providing tech support for the code and helping manage the server to this date). Throughout this time I wrote a lot of Perl and Python code to run …

Read More
Python sys Module

The main use I’ve found for the Python sys module is allowing command-line arguments to be made to a script. Here is an example of how it looks: This script checks that 2 command-line arguments had been passed to the program before assigning the value sys.argv[1] to a variable. We check for two command-line arguments …

Read More
Python os Module

You can use the Python os module to send commands out to the operating system. Through os you can do anything from changing the current working directory through to listing the contents of a directory.

Read More
Useful Linux Commands

Linux is an operating system – similar to Windows or Mac. It is freely available and very popular amongst researchers and programmers. Since many of the scripts you write will be run from the terminal, a list of popular Linux commands can be quite handy: cd Used to change the directory (folder) which you have …

Read More