Skip to content

Session 3: Practicing with the tools

Juan Gonzalez-Gomez edited this page Feb 4, 2020 · 14 revisions

Session 3: Practicing with the TOOLs

  • Time: 2h
  • Date: Wednesday, Feb-5th-2020
  • Goals:
    • Practice by doing
    • Practicing with Github
    • Practicing with Pycharm
      • Running programs
      • Debugging programs

Contents

Introduction

It is very important that you learn to use the tools: Github + pycharm. You should get confident. In this session you will have time to practice by your own. There are some proposes exercises for you to work

If you have not finished the exercises proposed in the previous sessions do it now, and when finished, continue with the exercises proposed in this session. It is very important that you try to do all the exercises

Exercises

All these exercises should be stored in your working repo in the Session-03 folder. Do not forget to upload them to Github

Exercise 1: Counting DNA Bases

  • Filename: Session-03/dna_count.py
  • Description: Create a program for counting the number of bases presented in a DNA sequence. The user introduces a sequence of letter representing the DNA chain. For example: CATGTAGACTAG. Our program should calculate the total length, and the number of bases that compound the sequence. In the previous example sequence, the output of our program should be like this:
Introduce the sequence: CATGTAGACTAG
Total length: 12
A: 4
C: 2
T: 3
G: 3

Suppose that the user always introduce correct sequences (you do not have to manage any error yet)

Exercise 2: Counting DNA bases from a file

  • Filename: Session-03/dna_count_file.py
  • Filename: Session-03/dna.txt. Text file with the DNA sequence. It can have sequences in separated lines. This is an example of the DNA text file:
AGTACACTGGT
ACCAGTGTACT
ATGGCCATTGTAATGGGCCGCTGAAAGGGTGCCCGATAG
  • Description: Write a program that opens the dna.txt file and calculates the total number of bases, and the number of the different bases

END of the session

The session is finished. Make sure, during this week, that everything in this list is checked!

  • You have all the items of the session 2 checked!
  • Your working repo contains the Session-03 Folder with the following files:
    • dna_count.py
    • dna_count_file.py

Author

Credits

  • Alvaro del Castillo. He designed and created the original content of this subject. Thanks a lot :-)

License

Links

Clone this wiki locally