Skip to content

Latest commit

 

History

106 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WIS Python programming course started in 2024.11

Course number: 20253491

Students

Home page Repo Assignments Project Status
Adi Moskovits repo
Adi Barnoor repo repo In Vivo Organizer
Aishwarya Singh repo repo Molecular-Dynamics-Structure-Analysis
Alon Gershkoviz repo repo MyCookbook
Ameera Egbaria repo repo Automated FISH Probe Design Tool
Anastasiia Mamaeva repo repo Sequence_parser
Anatoly Kustanovich repo repo bam2csv converter
Artem Dubovetskyi repo repo Pub Ranker
Catalina Donic repo repo J-conjugator
Divya Krishna Kumar repo repo ChEC In Vitro Analysis Pipeline for Hybrid Genome
Dmitrii Bushmin repo repo Hartree-Fock Energy Calculator for Simple Molecules
Grigorii Rubinovskii repo repo
Guy Haim repo repo ALS-Aging Genetic Interaction Analysis Tool
Iina Takala Raz repo repo CellScribe
Joshua Bugis repo repo mutfinder
Karin Vardy repo repo Conduction analyzer
Libi Saad repo repo F-MRI Metabolism Quantification Using 3FDG and 3FDGal
Lihi Erez repo repo qPCR Results Analysis
Lior Lin repo repo CRISPR Base-Editor Guide Planner
Maxim Kuryachiy repo repo Gibsembler
Maytal Katz repo repo Python Program for Psychometric Data Analysis
Osher Ben-Nun repo repo scRNA_to_GO_generator
Raz Cuchacovich repo repo AKTA Visualization
Romi (Ruchama) Brody repo repo Big Floof Energy (BFE)
Rotem Berda repo repo Transcription Factor Mutation Tool
Santiago Montealegre repo repo LabTurn: A Lab Equipment Booking System
Sarit Moses repo repo Offline boggle game with gui
Shiri Karagach repo repo Proteomics QC Tracker
Sima Glicksman repo repo Wolt Roulette
Stav Ohayon repo repo Genome Assembly from Short Reads with Python
Tal Sharon repo repo
Talia Baer repo repo Transient-Identification-Tool
Yuliya Androsova repo
Yulia Eriukova repo repo

Lecturer

Teaching Assistants

Plan

SYLLABUS

Schedule

  • Day 1 2024.11.03 9:15-12:00
  • Day 2 2024.11.10 9:15-12:00
  • Day 3 2024.11.17 9:15-12:00
  • Day 4 2024.11.24 9:15-12:00
  • Day 5 2024.12.01 9:15-12:00
  • Day 6 2024.12.08 9:15-12:00
  • Day 7 2024.12.15 9:15-12:00
  • Day 8 2024.12.22 9:15-12:00
  • Hanukkah
  • Day 9 2025.01.05 9:15-12:00
  • Day 10 2025.01.12 9:15-12:00

Assignments

There will be assignments after every lecture. You will submit them via GitHub. I'll explain the details during the lectures.

Project

Towards the end of the course you'll be asked to do a project. First you will need to submit a proposal for the project and when it is accepted then implement it. The project should be something that is useful for your studies or at least it is fun for you to make. Ask in the lab where you work what needs are there that you might implement as your final project. You can get inspiration from the projects listed here and the projects of the 2023 autumn semester or those of 2024 spring semester.

The idea of the project is that you write something that is going to be useful for you beyond the course. e.g. There is some manual work in your lab and this project will automate it. It can be also a tool to help you with your research. etc. It can also be useful in your private life. e.g. we had projects trying to register for visa applications at the USA embasy and also games.

You can even take an existing project and make some valuable improvements to that project. (e.g. one project from one of the previous courses).

How to submit your proposal?

  • Create a separate repository for the project. Its name should reflect the project: (e.g. Gene-Amplification-and-SNP-Analysis) and not the the course. If someone looks at this repository they should see it as a real application and not "some stuff you wrote just to get the grade".

  • The proposal should be the README.md file of the repository. If you need to include images or data files, those should be also included in the repository. It should be a description that will help any future visitor of the project to understand

  1. What does this project do?
  2. What kind of input data it expects and what kind out output the user might expect.
  3. The technicalities: How to download it, install the dependencies, run the tests, and run the project?

It would be nice if at the end of the README you mention that this was written as part of the course and link to the course repository.

We understand that the project and thus the description might evolve during the implementation. That's fine. You can update the README with the new information. In the proposal we would like to see your understanding of the project before you start implementing it.

Before you submit it for approval it is recommended that you send it to another student and ask if the description is clear. If that student has any questions then you probably will need to update the README to answer those questions so the next person won't need to ask.

Once you are ready, open an issue on our repository linking to you project to get it approved.

Once the project is approved you will implement it in the same repository. Open a new issue when you'd like the project to be graded.

Expected workload

In addition to the lectures you will spend about 2-4 hours / week on the assignments and 20-40 hours on the project.

The actual time spent will greatly depend on your previous experience with programming in general and Python in particular.

The time you spend on the project will also depend on the availability of the data you work on. If you pick a project that you would want to do anyway then this is basically time you would spend anyway.

Grades

  • Each assignment counts as 5% (we will have 10 of them).

  • The project proposal is 15%.

  • The project is 35%.

  • The project is a requirement. Without that you won't get a passing grade.

Slides

During the course I'll use some of the slides that can be found here. These slides are publicly available and will remain on the web site after the course is over.

Videos in English

There are recording of this course from 3 years ago.

There are also recordings from the 2023 autumn semester.

There are also recordings from the 2024 spring semester.

You can watch those, but be also warned, this semester the order of the material will be different.

There are many more videos in my English-language YouTube channel. You are invited to check them out and to follow the channel.

Videos in Hebrew

Some of the material is also available in Hebrew. You can find them on my website and in my Hebrew-language YouTube channel. You are invited to follow that channel as well.

Language

The default teaching language of WIS and of this course is English.

In writing please stick to English.

If and when we have one-on-one conversions I'd be happy to speak in Hebrew, Hungarian, Spanish, or Ladino as well.

Bring your own computer!

You are expected to bring your own computer to the lectures.

Installations

There is no need to install anything up front. We'll do that during the lectures.

Day 1

GitHub, GitHub Pages

Assignment (day 1)

  • If you don't have one yet create an account on GitHub.

  • Upload a picture of you or some avatar to your account.

  • Create a nice page based on GitHub pages. Include information about yourself, your studies, your hobbies. Link to the institution and to my home page https://szabgab.com/ .

  • Open an issue on our repository, the title should be "1st assignment of YOUR NAME" (put your name instead of YOUR NAME) and in the issue link to your web site and to your repository.

  • The TAs will respond to the issue and I'll add a link to your site to the README of the repository of the course.

  • Dead-line: 2024.11.06 24:00

Day 2

  • Video

  • Install VS Code

  • Mention other IDEs (PyCharm, Spyder)

  • Write Hello World

  • Install Python

  • Run Python program

  • Mention Anaconda

  • Install Jupyter labs

  • Create first Notebook

  • Install Git client

  • Start a repo locally

  • Local setup

  • Add some files.

  • We ran out of time and I could not show how to connect the local repo and the one in GitHub. I should have done this and delay the Jupyter labs demo for the next session.

Assignment (day 2)

  • Star our repo.

  • Pick two participinats of the course who you don't know (preferably people who who don't yet have 2 issues opened on their repo), look at their web site, star their repo and open a constructive issue on how to improve the site.

  • Handle the issues you receive. (Comment on them and when both of you are satified with the changes then close the issue.

  • Write a python program that has two variables width and length of a rectangle. Print out the area and the circumference of the rectangle. (rectangle.py)

  • Write a python program that has one variable radius of a circle. Print out the area and the circumference of the circle. (cricle.py)

  • Create a Jupyter Notebook that has 3 variables width and length of a rectangle and the radius of a circle. Print out the area and circumference of both. (day2.ipynb)

  • Create a new repository for the assignments (e.g. call it python-assignments) create a folder called day02 and upload the 3 files to that folder.

  • Add a README.md file to the root of the repository with some information explaining what is in the repository.

Open an issue on our repository "day 2 by YOUR NAME" and a link to the new repository.

  • Dead-line: 2024.11.14 13:00

Day 3

  • video

  • Mention that in the course we only learn 0.01% of "programming in Python", the rest they will have to learn alone.

  • Mention the tension that about 30% of the students have no programming background and the other have.

  • Resize image: #43

  • Clone web site

  • Make some changes to the web site

  • Commit and push

  • Create a new repository for the assignments. Clone it. Add some files and push it out.

Assignment (day 3)

  • Clone the repository of your assignments

  • Add a new folder called day03

  • Copy the rectangle.py from day02 and change it to use input to get the values from the user.

  • Copy the circle.py from day02 and change it to use the command line to get values from the user. (argparse)

  • Copy the Jupyter notebook from day02 and change it to get the parameters using input.

  • Copy the day03/dilution_calculation.ipynb from this repository (you can clone this repository as well to your computer) and solve it.

  • Dead-line: 2024.11.26 22:00

Day 4

Using Jupyter notebook

  • input()

  • scalar values (e.g. a number)

  • def define functions

  • return single value

  • return multiple values and accept them as a tuple

  • move the function to a separate file and import it from there.

  • lists

  • for loop to double numbers

  • map to double numbers

  • list

  • range

  • random

  • if

  • break

  • continue

  • divide 100 by numbers in a list

  • two lists (vectors) - add them pair-wise using a for loop and using zip

  • Show how to search for help - Stackoverflow

Assignment (day 4)

  • Create a folder called day04.

We did not go over the while loops but for this assignment you will need it. It is used when we don't have anything to iterate overknow or we don't know up front how many iteration we will have. You can use break and continue in the while loops as well: You car write it like this:

while True:
    if some_condition:
        break
    ...
  • Write a Python program that is a number guessing game:
    • The computer "thinks" a about a whole number between 1 and 20

    • The user guesses

    • The computer tells if the guess was too small, too big or exact.

    • If exact the user wins, the program ends. Otherwise the user can guess again.

    • At the end of the game print out how many guesses the user needed.

    • Allow the user to play several games: once one game ends ask her if she wants to play again, generate a new random number and play again.

    • If the user enters "x" any time, exit the program.

    • If the user enters "n" any time, leave the current game and ask if she wants to play a new game?

    • If the user enters "s" any time, show the hidden number (cheating).

    • Move the code in a function called main and split up the code into several function that make sense.

There is a file called day04/assignment-t-test.ipynb copy it and follow the instructions in the file.

  • Dead-line: 2024.12.02 22:00

Day 5

  • video

  • while loop vs for loop

  • count digits in a string

  • count digits in a file

  • testing you first need to pip install pytest to be able to run the tests

Assignment (day 5)

  1. Sequences and stats
  • Write a program that given one or more files with a sequence in it will display some basic statistics about the sequences.
  • Write a few tests that will verify the results.

e.g. python seq.py day05/a_seq.txt day05/b_seq.txt

day05/a_seq.txt
A:        2  7.4%
C:        5 18.5%
G:        6 22.2%
T:        7 25.9%
Unknown:  7 25.9%
Total:   27

day05/b_seq.txt
A:        1  10.0%
C:        2  20.0%
G:        3  30.0%
T:        4  40.0%
Unknown:  0   0%
Total:   10


All
A:        3   8.1%
C:        7  18.9%
G:        9  24.3%
T:       11  29.7%
Unknown:  7  18.9%
Total:   37
  1. Patients

There is a file called day05/Datasets.ipynb copy it and follow the instructions in the file. There is also a data file called day05/patient_data.csv.

  • Dead-line: 2024.12.09 22:00

Day 6

count words in a list count words in a file

__pycache__ .gitigrnore

Opening files:

  • plain text file
with open(filename, "r") as fh:
    fh.read()
    fh.readline()

Assignment (day 6)

Create a folder called day06.

Write a command line tool that can download data from NCBI. You can download from the nucleotide database as we did in the lecture, but it would be much more interesting if you used some of the other databases available on NCBI. e.g.:

python ncbi.py  --database nucleotide --term TERM --number NUMBER

The database can default to "nucleotide", ther number can default to 10.

Search for the TERM and download up to NUMBER items. Save each item in its own file. Print the names of the files. Also save the date, the database, the search term, the number asked for and the total number of items found in a csv file. So if you run the command twice:

python ncbi.py  --database genome --term Orchid --number 3
python ncbi.py  -cauliflower

you'd get something like this:

date,term,max,total
2024-05-30 17:20:21,genome,Orchid,3,527341
2024-05-30 18:12:34,nucleotide,cauliflower,10,32781

Copy the file day06/Assignment06.ipynb and follow the instructions there.

  • Dead-line: 2024.12.16 22:00

Day 7

Jupyter notebook file selector

Assignment (day 7)

There was no assignment.

Day 8

Assignment (day 8)

  • Take one of the previous programs you wrote and create either a GUI for it using Tk or a Web interface for it using Flask.

For example you can take the number guessing game and convert it to work in either GUI or web. You could also take some interesting biological process or computation, implement it and add GUI or web interface to it.

  • Dead-line: 2025.01.06 22:00

  • Project proposal dead-line: 2025.01.13 22:00

Day 9

Assignment (day 9)

We saw one example analyzing sequences: find the longest sub-sequence that repeates itself. In the day09 folder create a program that will receive the path to a file in Fasta or GeneBank format, and use the above analyzis to print out the longest sub-sequence that appears twice.

Then come up with some other "interesting feature" of sequences and add that analyzis too. Make both analyzis optional and let the user control which one is done: (assuming this second analyzis is called blabla you could use the program like this:

python analyze.py FILE --duplicate --blabla

What is an "interesting feature" is up to you. It can be a real, scientifically valuable feature, but if that's too difficult it can be some simpe feature like the repetition we have.

Include a README.md file and the requirements.txt file if necessary.

  • Dead-line 2025.01.12 22:00

Day 10

Assignment (day 10)

  • Project dead-line: 2025.02.03 22:00

About

No description, website, or topics provided.

Resources

Stars

26 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages