Skip to content

Latest commit

 

History

History
139 lines (104 loc) · 7.1 KB

Python_BSc_2019.md

File metadata and controls

139 lines (104 loc) · 7.1 KB

.Intro_Python

Welcome to the introduction to Python (Apr/May 2019)

Here you can find the info and links needed for the course This is a Python 3.7 course

We encourage you to install Python and Jupyter on your own laptop before the course.

Installing Jupyter locally
Jupyter notebooks is a user interface which makes writing and commenting on Python code more convenient.
It can be installed together with Python via the Anaconda platform:
https://www.anaconda.com/download/

Installation guide A manual "how to install Python and Jupyter via Anaconda" can be found here:
https://drive.google.com/open?id=1bLcnv8z8sdm5aFzWb-GlpXKBMZ9c7vUj

After installation make a work folder in the "Documents" folder for easy access to the Jupyter notebooks


Assignment files

Assignment notebook: https://drive.google.com/open?id=1IfWC_hz2nCAZLwErTLl4NwdITWTB4nsg
Additional assignment files:
DNA Tools: https://drive.google.com/open?id=1tFxyO9bZm8dZ6VtDmuL4OFaFckJF85m4
Mouse Fasta file: https://drive.google.com/open?id=1CDWwfpLS3tGYCo7Uw9FHmBrJwOuYT0Gy
Data in .py: https://drive.google.com/open?id=1OzgTFC359rikrjyTQ8Eu6XFS_AlMPwsY
available Thursday May 9th at 12:00


Python information

Cheatsheet Python: https://drive.google.com/open?id=1N71Ez322zHfIrwD02q3_kHW6O3eteYEI
Cheatsheet Regex: https://drive.google.com/open?id=1keFxUIZf3lDt3d800UcktDuSv0m48wip
Cheatsheet Matplotlib: https://drive.google.com/open?id=1mrHarxxyZjIxZ5XRGJ-DfvjL1JstMup5

Python documentation: https://docs.python.org/3.7/
Google: https://www.google.com/
Stackoverflow: https://stackoverflow.com/

Schedule

Day Date Time Place Topic
1 Tu 23/04 09:00 - 15:00 HVDB - 2.70/2.71 Jupyter, Variables, Loops
2 Th 24/04 09:00 - 15:00 HVDB - 2.70/2.71 Lists, Dictionaries
3 Mo 29/04 13:15 - 17:00 AZU - CLZ-1/2 Functions, Modules
4 Tu 30/04 09:00 - 15:00 AZU - CLZ-1/2 Plotting, Regex
5 Th 02/05 09:00 - 15:00 HVDB - 2.70/2.71 File handling
6 Mo 06/05 13:15 - 17:00 AZU - CLZ-1/2 Self-study
7 Tu 07/05 09:00 - 15:00 AZU - CLZ-1/2 Recap, questions
8 Th 09/05 11:45 - 15:00 AZU - CLZ-1/2 Assignment

*Lunch breaks are between 12:30 and 13:15 on day 1, 2, 4, 5 and 7

Practicals and presentations

Day 1: Jupyter, Variables, Loops
Intro: https://drive.google.com/open?id=1gKj277eSuSR9n5pDQs2IS7S4CFIsrc-3
PDF: https://drive.google.com/open?id=1ena-pHr0q_WIndTdjUzdPWFdruxjU9cJ
WCPD notebook: https://drive.google.com/open?id=1yfe3rLz2HgKsjpKsIc3O-XHmR_IygUL9
dna_counts.py: https://drive.google.com/open?id=1tnUZduFRfLzuOCv6Y7zG1R2nFAGE6jZr
dna_sequences.txt: https://drive.google.com/open?id=1TaHvS-bJN5C8J04he3PFfboACQCWVcrR
Jupyter notebook: https://drive.google.com/open?id=1o6E1GZQ2fdtbOvKuU5eywN5dgjRJ61-S
Jupyter notebook incl Loops (incase your version did not include the loop exercises:
https://drive.google.com/open?id=16vnN8TEXU-T7oNPwvpZZOJh2SiyvTKZc
Answers: https://drive.google.com/open?id=1YCVCoNAHetQF03xu88lSZPqaUraTENZC

Day 2: Lists, Dictionaries
PDF: https://drive.google.com/open?id=11lzmCWAXPCoKsHYVuddIzA-sTQ6IcjNx
Jupyter notebook Lists: https://drive.google.com/open?id=1LAWGhsqcUpRUm2eBvbVnv2ANdHjMqMWR
Jupyter notebook Dictonaries: https://drive.google.com/open?id=1Kt4LUmhkhNUR9fnDc04vcE4h0heoc85h
Answers Lists: https://drive.google.com/open?id=1BjYTn2KmnvtWtRwK65vgAhTYy98iG0sM
Answers Dictonaries: https://drive.google.com/open?id=1VADR6tI95zOx5py23kxd1BkOCPcbx5TM

Day 3: Functions, Modules
PDF: https://drive.google.com/open?id=1wuadY-QdH9kAIqGzzUE7ZKyYOCsoLr-w
Jupyter notebook Functions and Modules: https://drive.google.com/open?id=1Ece9s4AKKtKQYRau4dvbujHLxFBcUeWJ
DNA tools: https://drive.google.com/open?id=1HcqdzJo6kYfBkFZdWrhzmDUMC86dpNLU
Answers Functions and Modules: https://drive.google.com/open?id=1cRTGSSbLz_eNvaNHlw2aMk5VWYclMpbN \

Day 4: Plotting, Regular expression
PDF Plotting: https://drive.google.com/open?id=1QiB1UTum36LByygOixGjOv-e_qy1YI9P
PDF Regex: https://drive.google.com/open?id=1L-P1hAs2J04KnbvXDyx_TMpIHpGsVfNz
Jupyter notebook Plotting: https://drive.google.com/open?id=1-CoH8aR7eVrHktDfnNOUrvdHGhOQHdT6
Jupyter notebook Regex: https://drive.google.com/open?id=1HWauDjdLn0U5wnX_daBYjAkcZQjoUsqo
Answers Plotting: https://drive.google.com/open?id=1t_qkOiSOp1I7C5MLfky1laUyUATYk5bf
Answers Regex: https://drive.google.com/open?id=1V6yq7tjWcZ0QvAIUOXvWsja8Utj2Ifgl \

Day 5: File handling
PDF: https://drive.google.com/open?id=1Jvgv8DHzlM2KbUJDD1Tl1mCOMjR6GH4I
Needed .bed File: https://drive.google.com/open?id=1CkQsbQ48L2ab56lUujGCRvsJlbyb78Ik
Needed XY File: https://drive.google.com/open?id=1ZTQWyPF4Bfy6RRMSyomlIgKMY7H9_W22
Jupyter notebook File handling: https://drive.google.com/open?id=1hK1_B3NUBsz5-fTY1kmFHqFnq2FFVf2S
Answers File handling: https://drive.google.com/open?id=1a5JhC-_yaEr8VRZm96fP6fIrrIlgIW6x \

Day 6: Extra
Notebook "the hidden message: https://drive.google.com/open?id=18U9AKbQOSLaj8VA59BP28GZtVOdtyWvy
Extra: genome.fa https://drive.google.com/open?id=1QLFpH1WQa1kOA6mrvsmphi0wcbBI9T6Y
Notebook: https://drive.google.com/open?id=11bUuykfOv-HgeH9uH8_vfD2CNZv0eUAG
Snail File (you need this for the notebook:
https://drive.google.com/open?id=1u3iIaIQoFSlBKMuc_pvBc48EvK7MAzWj

Zebrafish files
U can use these files to practice getting data from a file in a list or dictionary, followed by an investigation and plotting some results.
The contents of the first file are the coding sequences on Zebrafish chromosomes 1 and 2 in FASTA format. The headers in this file are build from: gene-id, chromosome, start, stop. After each header the sequence is given, which might be on multiple lines.
The second file contains the gene-ids and their associated phenotype(s).

Fasta file: https://drive.google.com/open?id=1KZ8iLHwCPzcgt55iRWDGWUgEA88xBI8E
Chicken Phenotype file: https://drive.google.com/open?id=1Wu54LNgCrpmDuLQ7-Je_8SGODQPsEMk3

Some questions you can think of:

  • How many genes are on the individual chromosomes?
  • What is the distribution of the positions of genes over both chromosomes?
  • Make the coding sequences in to peptides and count aminoacid usage?
  • What is the distribution of the length of the genes?
  • How many genes on chromosome 1 are linked to a phenotype ?
  • What is the position of genes accosiacted to a certain phenotype?
  • Be creative, ...

Good luck!

Day 7: Recap, Questions

Day 8: Final Assignment

Extra information and references:
https://en.wikibooks.org/wiki/Python_Programming (some references can be Python 2.7!)
https://www.practicepython.org/ Extra practice
https://www.listendata.com/ Python, R and more

END