• Advanced Courses in Life Sciences

    Header of Statistics at Transmitting Science

Online Course – 2nd Edition

Introduction to Python for Biology

August 17th-21st, 2020

Statistics and Bioinformatics

Statistics and Bioinformatics

REGISTRATION IS CLOSED

Please, SUBSCRIBE to our Newsletter if you want to receive information on new editions.

Introduction to Python for Biology

Course overview

Python is a user-friendly and powerful programming language commonly used in scientific computing, from simple scripting to large projects. This workshop will provide hands-on practice in a biological context for beginners, with very limited prior programming experience. This course is designed to be very applied, and we will explore Python tools of immediate help to the working scientist.

After completing this course, participants will be able to apply Python programming automation to their own research problems and should be equipped to continue their own Python learning. While this course will focus on data analysis using Python, participants will gain language-agnostic principles of programming, like automation with loops and encapsulation with functions, that will serve as best practices for their scientific computing.

Requirements

Graduate or postgraduate degree in Life Sciences and basic knowledge of Statistics. While some Python knowledge is useful, the course will cover basic Python skills necessary to input, clean, and explore data.

All participants must bring their own personal laptop and a good internet connection (Windows, Macintosh, Linux).

Contact

haris.saslis@transmittingscience.com

LOCATION

This course will be delivered online.

Please check the schedule for the live online part, and be aware that it is GMT+1.

DATE

August 17th-21st, 2020

LANGUAGE

English

COURSE LENGTH & ECTS

35 hours online.

This course is equivalent to 2 ECTS (European Credit Transfer System) at the Life Science Zurich Graduate School.

The recognition of ECTS by other institutions depends on each university or school.

PLACES

Places are limited to 14 participants and will be occupied by strict registration order. If the course fills up there will be an assistant instructor to help during the practice time.

Participants who have completed the course will receive a certificate at the end of it.

Nichole Bennett instructor fro Transmitting Science

Nichole Bennett
The University of Texas at Austin
United States of America

Program

Monday

Introduction to Python

  • Overview of Python as a programming language
  • Understand why we use Python for scientific computing
  • Differentiate between tasks that Python is suitable for and not
  • Become familiar with Python syntax and formatting
  • Installing Python
  • Setting up your environment
  • Differentiate between a Python script and a Jupyter Notebook
  • Edit and run simple Python scripts using the command line
  • Use Jupyter Notebooks to create and run both Markdown and Python cells
  • How to read the documentation to get help

Variables and Assignment

  • Assign values to variables
  • Perform calculations with variables
  • Differentiate between different Python variable types
  • Use built-in functions to convert between Python variable types
  • Import a Python library and use the functions it contains.
  • Read tabular data from a file into a program.
  • Select individual values and subsections from data.
  • Perform operations on arrays of data
  • Use comments to annotate code
  • Plot simple graphs from data.

Looping and Repeating Actions

  • Understand what a for loop does
  • Understand what a while loop does and when to use it
  • Write for loops to repeat calculations
  • Trace changes to both the loop variable and other variables as a loop runs

Lists and Dictionaries

  • Create and index a list of values
  • Change the values of a list
  • Add values to an existing list
  • Reorder lists
  • Slice list elements
  • Create and manipulate nested lists
  • Store paired data in dictionaries
  • Iterate over dictionaries

Control Flow

  • Write conditional statements using if, else, and elif branches
  • Use Boolean operations to test conditions
  • Evaluate complex conditionals using and, not, and or

Tuesday

Manipulating Text

  • Dealing with special characters in Python
  • Use Python’s in-built string manipulation tools

Reading Text from a File

  • Opening files for reading text
  • Opening files for writing text
  • Closing files
  • Understanding paths and folders

Libraries

  • Explain what software libraries are and why programmers create and use them
  • Write programs that import and use libraries from Python’s standard library
  • Find and read the documentation for standard libraries both interactively and online

Working with Files in Pandas

  • Use Pandas to load tabular data sets
  • Get basic information about the Pandas DataFrame
  • Select individual values from a Pandas dataframe
  • Select entire or a subset of rows or columns from a dataframe
  • Create dataframes
  • Filter and sort dataframes
  • Handling missing values
  • Split-apply-combine methods with Pandas

File Contents and Manipulation

  • Delete files and folders
  • List folder contents
  • Run external programs
  • Add flexibility to programs by taking user input
  • Use command-line arguments in a program
  • Handle flags and files separately in a command-line program
  • Read data from standard input in a program so that it can be used in a pipeline

Wednesday

Functions

  • Explain the purpose of functions
  • Differentiate between defining functions and calling functions
  • Define functions that take parameters
  • Return values from functions
  • Identify local and global variable scope
  • Test and debug functions
  • Set default values for function parameters
  • Discuss best practices on how to divide programs into small, single-purpose functions

Error-Handling

  • Read a traceback, determine where an error took place, and identify the type of error that took place
  • Describe the situations in which syntax errors, indentation errors, name errors, index errors, and missing file errors occur

Defensive Programming

  • Understand what an assertion is
  • Add assertions to check whether or not a program’s state is correct
  • Add pre- and post-condition assertions to functions
  • Understand test-driven development and use it when creating functions

Debugging

  • Debug code with errors using systematic processes
  • Discuss ways of making code less error-prone and more easily tested

Style

  • Understand the reasoning behind the basic rules of coding style
  • Refactor programs to make them more readable
  • Use Python community coding standards (PEP-8)

Thursday

Plotting in Python

  • Choose appropriate plots for different purposes
  • Understand the Matplotlib library basic plotting formula
  • Understand Matplotlib object hierarchy
  • Create line plots, scatter plots, histograms, box plots, and bar charts using the Matplotlib library
  • Combine multiple plots
  • Use Pandas to do basic plotting on dataframes
  • Use Seaborn to create higher-level Python plots

Friday

Regular Expressions

  • Identify instances when regular expressions will speed up workflow
  • Understand what a regular expression is and how it is used
  • Use the re library methods in Python
  • Search for patterns in strings using regular expression operators
  • Extract matched patterns in strings as groups

Fees

  • Course Fee
  • Early bird (until July 31st, 2020):
  • 430 € *
    (344 € for Ambassador Institutions)
  • Regular (after July 31st, 2020):
  • 550 € *
    (440 € for Ambassador Institutions)
  • This includes course material (VAT included).
    * Participants from companies/industry will have an extra charge of 100 €.

You can check the list of Ambassador Institutions. If you want your institution to become a Transmitting Science Ambassador please contact us at communication@transmittingscience.com

Schedule

Course Schedule
  • Monday to Friday (GMT+1):
    • 1:30pm-3:30pm Q&A session and live coding with the instructor
    • 3:30pm-4:30pm Break
    • 4:30pm-7:00pm Coding exercises (supervised by the instructor)

The rest of the time will be taught with recorded classes and assignments, to be done between the live sessions.

Funding

Discounts are not cumulative and apply only on the Course Fee. We offer the possibility of paying in two instalments (contact the course coordinator).

Former participants will have a 5 % discount on the Course Fee.

20 % discount on the Course Fee is offered for members of some organizations (Ambassador Institutions). If you want to apply to this discount please indicate it in the Registration form (proof will be asked later).

Unemployed scientists living in the country were the course will be held, as well as PhD students based in that country without any grant or scholarship to develop their PhD, could benefit from a 40 % discount on the Course Fee. If you want to ask for this discount, please contact the course coordinator. That would apply for a maximum of 2 places and they will be covered by strict inscription order.