Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 2.75 KB

README.md

File metadata and controls

46 lines (35 loc) · 2.75 KB

basic_python

Course material for the python beginner's course at the MPIMM Bremen

Course held by Niek Stortenbeker and Anna Mankowski on March 19th and 20th 2019.
Navigate to the day-1 or day-2 folder to find the materials of each day.

exercises for the first day

useful resources

good learning tools for python

good python packages and modules

  • numpy for simple descriptive statistics
  • pandas for working with dataframes (like in R, or excel sheets). Very useful for all sorts of data analysis.
  • arrow for working with dates
  • re for regular expressions (a powerfull mini language for matching strings based on rules)
  • pathlib for working with directories
  • subprocess for excecuting command line programs from python
  • biopython for bioinformatic tools
  • matplotlib for plotting
  • snakemake to make a smart command line programs workflow
  • click basically a better argparse

editers or integrated development environments

  • vim: simple command line editor
  • atom: very nice text editor with syntax highlighting and other goodies
  • PyCharm: an good integrated development environment. Basically this is a very smart text editor. (that might be a little more difficult to start using).

ideas for changing the rename_fasta.py script

If you are looking for small projects to improve your python skills, here are a few examples:

  • ignore case (use for instance .lower())
  • print a warning when a name from the sample_names.csv is not used
  • make the script rename all fasta files in a specified directory automatically (use pathlib!)
  • only write the sequences that are in the table, ignore the other sequences (change the if statements)
  • change the name in a way that the original name stays preserved (e.g. CBC2017_2738-Sample1)