Skip to content

TOPIC: Python

biovcn edited this page May 6, 2020 · 20 revisions

Python

Suggested prerequisites for this topic

If the user is interested in natively installing python on their computer, please see https://www.python.org/downloads/

Otherwise, see: Introduction to using Jupiter notebooks via MyBinder.org

Overview

Python is rapidly becoming the preferred coding language of data scientists and bioinformaticians because it is easy to interpret and debug. Python’s built in data structures also allows for more concise codes compared to languages like Java and C++. Plus, it has been more broadly applicable than other languages such as R that is traditionally targeted at statistical computing and graphics. It is not surprising that many bioinformatics pipelines have Python components and numerous bioinformatics tools/tool compilations are python-based. By becoming fluent in Python, a user with raw genomics, field measurements, or structural data can do everything from raw data processing to processed data cleanup/ sorting, statistics, machine learning, data visualization and sharing the results via a Python-based web framework. Additionally, one can use Python skills to program drones and sensors to collect data from a large range of experimental sources.

The goal of this module is to give the participant experience using Python in ways relevant to bioinformatics through collaborating on a project. For participants that are not experienced in Python, we recommend working through the provided tutorials covering the basics (syntax, data structures, basic sorting and searching, data import/export) before moving on to the project-based learning exercises.

This topic will cover:

Basic:

  • Python syntax and data structures
  • Data sorting and manipulation
  • Functions- by the user and from widely used libraries

Advanced:

  • Python Pandas dataframes
  • Directory/batch file methods
  • Statistics/Data reduction
  • Biopython

Lessons

Lessons can be found at the following repository


Lesson 1 -- Introduction to Python

Introductory material

Date posted: 14 April 2020 Author(s): Dr. Ashley B. Cohen
Instructor(s): Dr. Ashley B. Cohen

  • Exploring the features of Binder
  • Running a simple script
  • Typing python commands in a terminal environment

Video presentation

Interactive material

Date posted: 14 April 2020 Author(s): Dr. Ashley B. Cohen
Instructor(s): Dr. Ashley B. Cohen

Content | Video presentation | Binder

Lesson 2 -- Tech

Introductory material

Date posted: 30 April 2020 Author(s): Dr. Ben Tully
Instructor(s): Dr. Ben Tully

  • Set and determine the datatype of a variable using python methods
  • Apply some of the built-in python string functions to manipulate the way that text is displayed in print statements

Content | Video presentation

Interactive material

Date posted: 30 April 2020 Author(s): Dr. Ben Tully
Instructor(s): Dr. Ben Tully

Content | Binder

Lesson 3 -- Syntax

TBD

Lesson 4 -- Data Structures

TBD

Lesson 5 -- Loop Structures and user input/output

TBD

Extended Resources and Publications

Tools:

Basic:

Advanced: