In [ ]:
from IPython.core.display import HTML

def _set_css_style(css_file_path):
   """
   Read the custom CSS file and load it into Jupyter.
   Pass the file path to the CSS file.
   """

   styles = open(css_file_path, "r").read()
   s = '<style>%s</style>' % styles     
   return HTML(s)

_set_css_style('rise.css')

MSCBIO 2025: Introduction to bioinformatics programming in Python¶

Instructors: Shikhar Uttam, John Barton, Mert Gur
TA: Rezwan Hosseini

Course goals¶

  • Introduce computational methods for storing and analyzing (biological) data
  • Cover principles of coding, data storage, and data analysis
  • Survey several methods/data types for different biological problems
  • Prepare to use Python independently for research

Why Python?¶

  • Python is a very high-level language -- easy to use, but sometimes slower than lower-level languages
  • Currently the most popular language worldwide
  • Highly developed, with packages for almost all common tasks
  • Large community for answering questions and solving problems

Logistics¶

Important information will be on the course website, mscbio2025-2025.github.io

Syllabus, homework, etc. will be on the website

Class structure¶

Before class

  • Reading assignment (usually)

During class

  • Lecture
  • Activities and exercises

After class

  • Homework and projects

Homework information¶

Weekly homework through GitHub Classroom

Typically assigned on Tuesday, due next Tuesday at 11:59 pm

Homework submissions will be graded automatically -- submit as many times as you like before the deadline

Feel free to collaborate on assignments, but try to come up with your own solutions

Class policies¶

The most important goal is to learn! Most lectures will include active exercises as well as overview of material

Avoid AI for assignments: we want to grow your skills and understanding

This will help you to use AI assistance wisely in research

Grades: 70% homework, 30% team final project

Installing Python¶

We're recommending Miniforge since it is lightweight and easy to use across platforms

https://conda-forge.org/miniforge/

About package managers¶

  • Simplifies installation of scientific packages with compiled C/Fortran code (NumPy, SciPy, Pandas...)
  • Solves dependency versions for you
  • Keeps course software isolated from the OS and from other classes/projects

Virtual environments, "Sandboxes for Python"¶

  • Think of each environment as a self‑contained folder with its own Python interpreter and packages
  • You can switch between environments without conflicts (conda activate myproj)
  • Easy to export/share with for reproducibility

For Windows users¶

Enable and install WSL (admin PowerShell)

wsl --install # reboots once, installs Ubuntu 22.04 LTS by default

WSL allows Windows users to use Linux-style shell commands -- essential for working on a computing cluster

After installing, open Ubuntu and set a username/password

Python installation steps¶

  1. Download the Miniforge installer matching your platform here https://conda-forge.org/miniforge/#latest-release:
    • macOS‑arm64 (Miniforge3-MacOSX-arm64.sh)
    • macOS‑x86_64 (Miniforge3-MacOSX-x86_64.sh)
    • Linux‑x86_64 (Miniforge3-Linux-x86_64.sh)
    • Windows (PowerShell script Miniforge3-Windows-x86_64.exe)
  2. Run the installer (accept defaults)
  3. Restart terminal (or run source ~/.bashrc / open new PowerShell)
  4. Verify with conda info
In [ ]:
%%bash
conda --version 
conda info | head -n 15

Common issues and fixes¶

  • conda: command not found → Terminal not initialised; run the shell init snippet printed by installer
  • Windows PowerShell execution policy → Run Set-ExecutionPolicy RemoteSigned as Administrator once

Python environment setup¶

  1. Download our Python environment at https://mscbio2025-2025.github.io/files/environment.yml
  2. Create a new folder for course files in your home directory
mkdir -p ~/bioinformatics
cd ~/bioinformatics # more on these commands next time! 
  1. Move environment.yml from your downloads folder to ~/bioinformatics
mv ~/Downloads/environment.yml .  # macOS/Linux default
mv /mnt/c/Users/<your windows username>/Downloads/environment.yml . # Windows default (WSL)
  1. Create the course environment
conda env create -f environment.yml   # may take 1‑3 min with libmamba
conda activate bioinfo                # name defined inside the YAML
In [ ]:
## Quick Python check inside Jupyter or terminal
import sys, pandas, numpy, matplotlib
print(sys.version)
print('pandas', pandas.__version__)
print('numpy', numpy.__version__)

Resources¶

  • Miniforge project page: https://github.com/conda-forge/miniforge
  • Conda cheat sheet: https://docs.conda.io/projects/conda/en/latest/user-guide/cheatsheet.html

Next time¶

  • File system organization
  • Using the command line (bash)