Course Overview


Course Integrity

This course is compiled automatically on 2026-02-11
compilation-check

The course is tested and available on MacOS, Windows and Ubuntu Linux



Overview

This course introduces Python and general purpose programming.

The course consists of 3 sections, 1 on basic Python data types and data input/output, a second on conditionals and looping and a third on plotting.

Each section is presented as HTMl presentations or single page document. Exercises and answer sheets are included after all subsections to practice techniques and provide future reference examples.

Course material and exercises are available to view as rendered HTML at https://rockefelleruniversity.github.io/Intro_To_Python/. All material is available to download under GPL v2 license.



Setting up


System Requirements

Install Miniconda

Python is automatically installed in lots of different OS distributions i.e. macOS. We want to use Miniconda environments to help us manage and control the version of python and the packages we install.

You can install Miniconda from the Anaconda website.

https://docs.anaconda.com/free/miniconda/miniconda-install/


Install VS Code

VS Code is a software which provides a nice interface in which we can run python. It in can be installed from the VS Code website.

https://code.visualstudio.com/download

It is also useful to install extensions for the softwarer you intend to use i.e. python and jupyter. To do this open VS Code, go to View > Extensions and serach for the extension you want to add.


Install Python and required Python packages

We can use the installed Miniconda to manage the installs of python and its pacakges. First we will create an environment. You can name this whatever you want. You will run this in terminal or if you are in Windows you can use the Anaconda Prompt.

conda create -n intro_to_python
conda activate intro_to_python

Python packages can be installed from several places. The main two options are conda and pip.

From conda
conda install python==3.12.4
conda install scipy
conda install numpy
conda install seaborn
conda install jupyter
conda install matplotlib
From pip
conda install pip
pip install python==3.12.4
pip install scipy
pip install numpy
pip install seaborn
pip install jupyter
pip install matplotlib

Download the material

Download the material




The Presentations


Introduction to Python, Session 1

This section focuses on Python basics such as simple data types, data IO, plotting and statistics. Session sections:

  • Introduction to Python
  • Data Types
  • Reading and Writing Data

Introduction to Python, Session 2

In session 2, programmatic techniques such as looping and conditional expressions are introduced The session includes longer exercises and shorter slide decks and so more time should be allocated to exercises in this session.

Session sections:

  • Loading libraries
  • Writing Scripts
  • Getting help

Introduction to Python, Session 3

In session 3 we cover the basics of plotting, introducing a variety of plot types and customization options.

Session sections:

  • Matplotlib package to generate a variety of plot types
  • Customization of plots
  • Seaborn library for advanced plotting

Getting help


Course help

For advice, help and comments for the material covered in this course please contact us at the issues page associated to this course.

The link to the help pages can be found here


General Bioinformatics support

If you would like contact us about general bioinformatics advice, support or collaboration, please contact us the Bioinformatics Resource Center at .