This course is compiled automatically on 2026-02-11
The course is tested and available on MacOS, Windows and
Ubuntu Linux
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.
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/
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.
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.
conda install python==3.12.4
conda install scipy
conda install numpy
conda install seaborn
conda install jupyter
conda install matplotlib
conda install pip
pip install python==3.12.4
pip install scipy
pip install numpy
pip install seaborn
pip install jupyter
pip install matplotlib
This section focuses on Python basics such as simple data types, data IO, plotting and statistics. Session sections:
The html slide presentation can be found at this link Slide
The single page html presentation can be found at this link Single Page
The code use in the presentations can be found at R code
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:
The html slide presentation can be found at this link Slide
The single page html presentation can be found at this link Single Page
The code use in the presentations can be found at R code
In session 3 we cover the basics of plotting, introducing a variety of plot types and customization options.
Session sections:
The html slide presentation can be found at this link Slide
The single page html presentation can be found at this link Single Page
The code use in the presentations can be found at R code
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
If you would like contact us about general bioinformatics advice, support or collaboration, please contact us the Bioinformatics Resource Center at brc@rockefeller.edu.