QCB Scientific Programming Lab
  • Scientific Programming for QCB
  • General Info
    • Timetable and lecture rooms
    • Tutoring
    • Equipment
    • Acknowledgements
  • Module 1, Practical 1
    • Setting up the environment
      • Linux on windows
      • A dual boot system
    • Our toolbox
    • Installing Python3 in Linux
    • Installing Python3 in Windows/Mac
      • OPTION 1:
      • OPTION 2 (easier):
    • The console
    • Visual Studio Code
    • The debugger
    • A quick Jupyter primer (just for your information, skip if not interested)
      • Installation
    • Exercises
  • Module 1, Practical 2
    • Modules
    • Objects
    • Variables
    • Numeric types
      • Integers
      • Booleans
      • Real numbers
    • Strings
      • Methods for the str object
    • Exercises
  • Module 1, Practical 3
    • Lists
      • Operators for lists
      • Methods of the class list
      • From strings to lists, the split method
      • And back to strings with the join method
    • Tuples
    • Introduction to sets
    • Exercises
  • Module 1, Practical 4
    • Execution flow
    • Conditionals
      • The basic if - else statement
      • The if - elif - else statement
    • Loops
      • For loop
      • Looping over a range
      • Nested for loops
      • While loops
    • Exercises
  • Module 1, Practical 5
    • More on control structures
      • Ternary operator
      • Break and continue
        • Continue statement
        • Break statement
      • List comprehension
    • Dictionaries
      • Functions working on dictionaries
      • Dictionary methods
    • Exercises
  • Module 1, Practical 6
    • Functions
    • Namespace and variable scope
    • Argument passing
      • Positional arguments
      • Passing arguments by keyword
      • Specifying default values
    • File input and output
      • Opening a file
      • Closing a file
      • Reading from a file
      • Writing to a file
      • String formatting with format
    • Exercises
  • Module 1, Practical 7
    • Quick reminder on functions
    • Getting input from the command line
    • Argparse
    • Libraries installation for the next practicals
    • Exercises
  • Module 1, Practical 8
    • Libraries installation
    • Pandas
    • Series
      • How to define and access a Series
      • Operator broadcasting
      • Filtering
      • Missing data
      • Computing stats
    • Plotting data
    • Pandas DataFrames
      • Define a DataFrame
      • Loading data from external files
      • Extract values by row and column
      • Broadcasting, filtering and computing stats
      • Merging DataFrames
      • Grouping
    • Exercises
  • Module 1, Practical 9
    • Numpy
    • Numpy ndarray
    • Random arrays
    • Numpy to and from pandas
    • Reshaping
    • Iterating over arrays and Indexing
    • Broadcasting and arithmetic functions
    • Filtering
    • Linear algebra
    • Matplotlib
    • Exercises
  • Module 1, Practical 10
    • Biopython
    • Installation of Biopython
    • General overview
    • Sequence objects
    • Looping, slicing and concatenation
      • Complement and reverse complement
      • Transcription and translation
      • MutableSeq
    • Sequence annotation
    • Sequence I/O
      • BioSeqIO.parse()
      • Sequences as dictionaries
      • Writing sequence files
    • Multiple sequence alignment
      • Parsing multiple sequence alignments
      • Writing multiple sequence alignments
      • Manipulating alignments
      • Biopython’s pairwise2 alignment
    • Exercises
  • Module 1, Practical 10b
    • Biopython
    • BLAST
      • The function qblast
      • Parsing qblast output
      • Saving results to file
      • Open a blast .XML file
      • The BLAST record class
    • Getting data from NCBI
    • Getting data from ExPASy
    • 3D structure and PDB
    • Exercises
  • Module 1, Practical 11
    • Recursive functions
    • Exercise
  • Module 1, MidTerm Simulation
    • Download the data
    • Problem 1
    • Problem 2
  • Module 2, Tutoring
  • Module 2, Practical 1
    • Object Oriented Programming
      • Classes, Methods and Objects
      • Self
      • Definition of a class
      • The life-cycle of classes and objects in a program:
    • Encapsulation
    • Special methods
    • Inheritance and overriding
      • Exercise
    • Lambda functions
    • Exercises
  • Module 2, Practical 2
    • Testing
    • Unit testing
      • Exercise
    • Measuring time
      • Exercise
    • Measuring memory
      • Exercise
  • Module 2, Practical 3
    • Complexity
    • Exercises
  • Module 2, Practical 4
    • Regular expressions
      • Basic Patterns
      • Group extraction
      • Exercises
      • re.compile
      • Substitution
      • Exercise
    • Exercises
  • Module 2, Announcement
  • Module 2, Practical 5
    • Sorting algorithms
    • Selection sort
      • A base class for sorting algorithms
      • Exercise (implementation)
    • Insertion sort
      • Exercise (implementation)
    • Merge sort and Quick sort
      • Merge sort
      • Exercise (Implementation)
      • Quick sort
      • Exercise (Implementation)
    • Exercise (algorithm benchmark)
    • Exercise (Counting Sort)
  • Module 2, Practical 6
    • Data structures
      • Abstract Data Types (ADTs)
        • ADT: Sequence
        • ADT: Set
      • Iterators in Python
      • Exercise (set implementation)
      • ADT: dictionary
    • Linked lists
      • Example: bidirectional linked list
      • Exercise (complete bidirectional list)
      • Exercise (circular list)
    • Stacks
      • Exercise
    • Queues
    • Collections
      • Exercise
  • Module 2, Practical 7
    • Trees
    • ADT: Binary Tree
      • Exercise
    • Tree visit
      • Binary Tree visits: DFS
      • Binary Tree visits: BFS
      • Exercises
    • ADT: Generic Tree
      • Exercise (implementation)
  • Module 2, Practical 8
    • Graphs
    • Graph ADT
    • Implementation as adjacency matrix
      • Exercises
    • Implementation as (adjacency) linked list
      • Exercises
  • Module 2, Practical 9
    • Graphs recap
    • Visits
      • Depth First Search (DFS)
      • Exercises
      • Breadth First Search (BFS)
      • Exercise
    • Exercise
  • Module 2, Practical 10
    • Dynamic programming
      • Excercise
    • Finding (the optimal) overlaps among DNA strings
      • Exercise
  • Module 2, MidTerm Simulation
    • Theoretical part
      • Exercise 1
      • Exercise 2
    • Practical part
      • Exercise 3
      • Exercise 4
QCB Scientific Programming Lab
  • Scientific Programming for QCB
  • General Info
    • Timetable and lecture rooms
    • Tutoring
    • Equipment
    • Acknowledgements
  • Module 1, Practical 1
    • Setting up the environment
      • Linux on windows
      • A dual boot system
    • Our toolbox
    • Installing Python3 in Linux
    • Installing Python3 in Windows/Mac
      • OPTION 1:
      • OPTION 2 (easier):
    • The console
    • Visual Studio Code
    • The debugger
    • A quick Jupyter primer (just for your information, skip if not interested)
      • Installation
    • Exercises
  • Module 1, Practical 2
    • Modules
    • Objects
    • Variables
    • Numeric types
      • Integers
      • Booleans
      • Real numbers
    • Strings
      • Methods for the str object
    • Exercises
  • Module 1, Practical 3
    • Lists
      • Operators for lists
      • Methods of the class list
      • From strings to lists, the split method
      • And back to strings with the join method
    • Tuples
    • Introduction to sets
    • Exercises
  • Module 1, Practical 4
    • Execution flow
    • Conditionals
      • The basic if - else statement
      • The if - elif - else statement
    • Loops
      • For loop
      • Looping over a range
      • Nested for loops
      • While loops
    • Exercises
  • Module 1, Practical 5
    • More on control structures
      • Ternary operator
      • Break and continue
        • Continue statement
        • Break statement
      • List comprehension
    • Dictionaries
      • Functions working on dictionaries
      • Dictionary methods
    • Exercises
  • Module 1, Practical 6
    • Functions
    • Namespace and variable scope
    • Argument passing
      • Positional arguments
      • Passing arguments by keyword
      • Specifying default values
    • File input and output
      • Opening a file
      • Closing a file
      • Reading from a file
      • Writing to a file
      • String formatting with format
    • Exercises
  • Module 1, Practical 7
    • Quick reminder on functions
    • Getting input from the command line
    • Argparse
    • Libraries installation for the next practicals
    • Exercises
  • Module 1, Practical 8
    • Libraries installation
    • Pandas
    • Series
      • How to define and access a Series
      • Operator broadcasting
      • Filtering
      • Missing data
      • Computing stats
    • Plotting data
    • Pandas DataFrames
      • Define a DataFrame
      • Loading data from external files
      • Extract values by row and column
      • Broadcasting, filtering and computing stats
      • Merging DataFrames
      • Grouping
    • Exercises
  • Module 1, Practical 9
    • Numpy
    • Numpy ndarray
    • Random arrays
    • Numpy to and from pandas
    • Reshaping
    • Iterating over arrays and Indexing
    • Broadcasting and arithmetic functions
    • Filtering
    • Linear algebra
    • Matplotlib
    • Exercises
  • Module 1, Practical 10
    • Biopython
    • Installation of Biopython
    • General overview
    • Sequence objects
    • Looping, slicing and concatenation
      • Complement and reverse complement
      • Transcription and translation
      • MutableSeq
    • Sequence annotation
    • Sequence I/O
      • BioSeqIO.parse()
      • Sequences as dictionaries
      • Writing sequence files
    • Multiple sequence alignment
      • Parsing multiple sequence alignments
      • Writing multiple sequence alignments
      • Manipulating alignments
      • Biopython’s pairwise2 alignment
    • Exercises
  • Module 1, Practical 10b
    • Biopython
    • BLAST
      • The function qblast
      • Parsing qblast output
      • Saving results to file
      • Open a blast .XML file
      • The BLAST record class
    • Getting data from NCBI
    • Getting data from ExPASy
    • 3D structure and PDB
    • Exercises
  • Module 1, Practical 11
    • Recursive functions
    • Exercise
  • Module 1, MidTerm Simulation
    • Download the data
    • Problem 1
    • Problem 2
  • Module 2, Tutoring
  • Module 2, Practical 1
    • Object Oriented Programming
      • Classes, Methods and Objects
      • Self
      • Definition of a class
      • The life-cycle of classes and objects in a program:
    • Encapsulation
    • Special methods
    • Inheritance and overriding
      • Exercise
    • Lambda functions
    • Exercises
  • Module 2, Practical 2
    • Testing
    • Unit testing
      • Exercise
    • Measuring time
      • Exercise
    • Measuring memory
      • Exercise
  • Module 2, Practical 3
    • Complexity
    • Exercises
  • Module 2, Practical 4
    • Regular expressions
      • Basic Patterns
      • Group extraction
      • Exercises
      • re.compile
      • Substitution
      • Exercise
    • Exercises
  • Module 2, Announcement
  • Module 2, Practical 5
    • Sorting algorithms
    • Selection sort
      • A base class for sorting algorithms
      • Exercise (implementation)
    • Insertion sort
      • Exercise (implementation)
    • Merge sort and Quick sort
      • Merge sort
      • Exercise (Implementation)
      • Quick sort
      • Exercise (Implementation)
    • Exercise (algorithm benchmark)
    • Exercise (Counting Sort)
  • Module 2, Practical 6
    • Data structures
      • Abstract Data Types (ADTs)
        • ADT: Sequence
        • ADT: Set
      • Iterators in Python
      • Exercise (set implementation)
      • ADT: dictionary
    • Linked lists
      • Example: bidirectional linked list
      • Exercise (complete bidirectional list)
      • Exercise (circular list)
    • Stacks
      • Exercise
    • Queues
    • Collections
      • Exercise
  • Module 2, Practical 7
    • Trees
    • ADT: Binary Tree
      • Exercise
    • Tree visit
      • Binary Tree visits: DFS
      • Binary Tree visits: BFS
      • Exercises
    • ADT: Generic Tree
      • Exercise (implementation)
  • Module 2, Practical 8
    • Graphs
    • Graph ADT
    • Implementation as adjacency matrix
      • Exercises
    • Implementation as (adjacency) linked list
      • Exercises
  • Module 2, Practical 9
    • Graphs recap
    • Visits
      • Depth First Search (DFS)
      • Exercises
      • Breadth First Search (BFS)
      • Exercise
    • Exercise
  • Module 2, Practical 10
    • Dynamic programming
      • Excercise
    • Finding (the optimal) overlaps among DNA strings
      • Exercise
  • Module 2, MidTerm Simulation
    • Theoretical part
      • Exercise 1
      • Exercise 2
    • Practical part
      • Exercise 3
      • Exercise 4
Next

© Copyright # 2021 - 2024, SciProg instructors.

Built with Sphinx using a theme provided by Read the Docs.