<commit_before>---
layout: page
title: Elementi di Bioinformatica (2019-20)
---

## Elenco delle lezioni


| #  | Docente | Data  | Argomento                                                                                                               | Materiale                                                                                                       | Esercizi      | Soluzioni |  
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 1  | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python.                                  | Gusfield 1.1, 4.1, 4.2.[1-2] 
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 2  | GDV     | 3/10  | Richiamo linguaggio C                                                                                                   | [Modern C](https://modernc.gforge.inria.fr/)                                                                    |               |           |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 3  | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 4  | GDV     | 9/10  | Karp-Rabin: algoritmo e implementazione. Richiami shell Linux. Make                                                     | Gusfield 4.4                                                                  
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 5  | GDV     | 10/10 | Implementazione Karp-Rabin. Shell Linux.    
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 6  | RR      | 7/10  |                                                                                                                       
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 7  | GDV     | 16/10 | Suffix array e Suffix tree: definizioni. Suffix array e Suffix tree: relazioni. LCP                                     | Gusfield, 5, 5.1, 5.2, 5.3, 5.4, 7.14. [dispensa](http://courses.csail.mit.edu/6.851/spring12/lectures/L16.pdf) | 
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 8  | GDV     | 17/10 | Calcolo della sottostringa comune più lunga di 2 stringhe. Suffix array: pattern matching. Controllo di versione (git). | Gusfield 7.4, 7.14.2                                                                                            |  
  | -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 9  | RR      | 7/10  | 
                                                                                                                      | -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 10 | GDV     | 2/10  | Implementazione di pattern matching su suffix array.                                                                    | 4.2.[1-2])                                                                                                      |             
 | -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 11 | GDV     | 3/10  | Ricerca della sottostringa comune più lunga di k stringhe (Gusfield, 7.4): algoritmo e implementazione   
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 12 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple 
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 13 | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python.                                  | (Gusfield, 1.1, 4.1, 4.2.[1-2])                                       
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 14 | GDV     | 3/10  | Richiamo linguaggio C                                                                                                   | [Modern C](https://modernc.gforge.inria.fr/)                                                                    |       
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 15 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple                                                                           
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 16 | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python.                                  | (Gusfield, 1.1, 4.1, 4.2.[1-2])                   
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 17 | GDV     | 3/10  | Richiamo linguaggio C                                                                                                   | [Modern C](https://modernc.gforge.inria.fr/)
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 18 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple
----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 19 | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python. 
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 20 | GDV     | 3/10  | Richiamo linguaggio C
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 21 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple
|----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 22 | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python.                                  | (Gusfield, 1.1, 4.1, 4.2.[1-2])    
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 23 | GDV     | 3/10  | Richiamo linguaggio C 
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 24 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple                                                                           | -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 25 | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python.                                  | (Gusfield, 1.1, 4.1, 4.2.[1-2])
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 26 | GDV     | 3/10  | Richiamo linguaggio C
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 27 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple   
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 28 | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python.
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 29 | GDV     | 3/10  | Richiamo linguaggio C
|   | -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 30 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 31 | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python.                                  | (Gusfield, 1.1, 4.1, 4.2.[1-2])                                                                           
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 32 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple                                                                           
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  


## Azure Notebooks

[Azure notebooks of the course](https://notebooks.azure.com/gianluca-dellavedova/projects/foundationsCS-2019)

## Install software

You will need to use the command line.


1.  Install [conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html). Install the Python 3 version.
1.  `git clone https://github.com/gdv/foundationsCS.git`
1.  `cd foundationsCS`
1.  `conda env create -f FoCS.yml`
1.  `conda activate FoCS`


## Linux shell commands

* [ls, cd, pwd](https://asciinema.org/a/197295)
* [mv cp nano touch rsync](https://asciinema.org/a/197355)
* [redirection pipe cut wc sort head tail](https://asciinema.org/a/197358)
* [for history echo](https://asciinema.org/a/197360)
* [bash programs, script, filenames with spaces](https://asciinema.org/a/197363)
* [grep, find](https://asciinema.org/a/197364)
* [fg, bg, ctrl+c, ctrl+z, ps, kill, chmod](https://asciinema.org/a/197590)

# License


<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
<commit_msg>layout<commit_after>---
layout: page
title: Elementi di Bioinformatica (2019-20)
---

## Elenco delle lezioni


| #  | Docente | Data  | Argomento                                                                                                               | Materiale                                                                                                       | Esercizi      | Soluzioni |  
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 1  | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python.                                  | Gusfield 1.1, 4.1, 4.2.[1-2] 
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 2  | GDV     | 3/10  | Richiamo linguaggio C                                                                                                   | 
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 3  | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 4  | GDV     | 9/10  | Karp-Rabin: algoritmo e implementazione. Richiami shell Linux. Make                                                     | Gusfield 4.4                                                                  
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 5  | GDV     | 10/10 | Implementazione Karp-Rabin. Shell Linux.    
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 6  | RR      | 7/10  |                                                                                                                       
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 7  | GDV     | 16/10 | Suffix array e Suffix tree: definizioni. Suffix array e Suffix tree: relazioni. LCP                                     | Gusfield, 5, 5.1, 5.2, 5.3, 5.4, 7.14. [dispensa](http://courses.csail.mit.edu/6.851/spring12/lectures/L16.pdf) | 
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 8  | GDV     | 17/10 | Calcolo della sottostringa comune più lunga di 2 stringhe. Suffix array: pattern matching. Controllo di versione (git). | Gusfield 7.4, 7.14.2                                                                                            |  
  | -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 9  | RR      | 7/10  | 
                                                                                                                      | -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 10 | GDV     | 2/10  | Implementazione di pattern matching su suffix array.                                                                    | 4.2.[1-2])                                                                                                      |             
 | -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 11 | GDV     | 3/10  | Ricerca della sottostringa comune più lunga di k stringhe (Gusfield, 7.4): algoritmo e implementazione   
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 12 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple 
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 13 | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python.                                  | (Gusfield, 1.1, 4.1, 4.2.[1-2])                                       
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 14 | GDV     | 3/10  | Richiamo linguaggio C                                                                                                   | [Modern C](https://modernc.gforge.inria.fr/)                                                                    |       
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 15 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple                                                                           
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 16 | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python.                                  | (Gusfield, 1.1, 4.1, 4.2.[1-2])                   
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 17 | GDV     | 3/10  | Richiamo linguaggio C                                                                                                   | [Modern C](https://modernc.gforge.inria.fr/)
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 18 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple
----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 19 | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python. 
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 20 | GDV     | 3/10  | Richiamo linguaggio C
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 21 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple
|----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 22 | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python.                                  | (Gusfield, 1.1, 4.1, 4.2.[1-2])    
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 23 | GDV     | 3/10  | Richiamo linguaggio C 
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 24 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple                                                                           | -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 25 | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python.                                  | (Gusfield, 1.1, 4.1, 4.2.[1-2])
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 26 | GDV     | 3/10  | Richiamo linguaggio C
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 27 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple   
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 28 | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python.
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 29 | GDV     | 3/10  | Richiamo linguaggio C
|   | -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 30 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 31 | GDV     | 2/10  | Pattern Matching. Algoritmo Bit-parallel per pattern matching esatto. Cenni di Python.                                  | (Gusfield, 1.1, 4.1, 4.2.[1-2])                                                                           
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  
| 32 | RR      | 7/10  | Introduzione a Python. Stringhe, liste, tuple.ZZ                                                                           
| -- | ---     | ----- | ---------                                                                                                               | ----------                                                                                                      | ------------- | --------- |  


## Azure Notebooks

[Azure notebooks of the course](https://notebooks.azure.com/gianluca-dellavedova/projects/foundationsCS-2019)

## Install software

You will need to use the command line.


1.  Install [conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html). Install the Python 3 version.
1.  `git clone https://github.com/gdv/foundationsCS.git`
1.  `cd foundationsCS`
1.  `conda env create -f FoCS.yml`
1.  `conda activate FoCS`


## Linux shell commands

* [ls, cd, pwd](https://asciinema.org/a/197295)
* [mv cp nano touch rsync](https://asciinema.org/a/197355)
* [redirection pipe cut wc sort head tail](https://asciinema.org/a/197358)
* [for history echo](https://asciinema.org/a/197360)
* [bash programs, script, filenames with spaces](https://asciinema.org/a/197363)
* [grep, find](https://asciinema.org/a/197364)
* [fg, bg, ctrl+c, ctrl+z, ps, kill, chmod](https://asciinema.org/a/197590)

# License


<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.

{'fraction_non_alphanumeric': 0.1618331096057191, 'fraction_numerical': 0.019230168888333905, 'mean_word_length': 0.2965031568722681, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 27, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 751, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7168383', 'n_tokens_mistral': 5293, 'n_tokens_neox': 4657, 'n_words': 968}