bioinformatics phd. course
DESCRIPTION
Bioinformatics PhD. Course. Summary (approximate). 1. Biological introduction. 2. Comparison of short sequences (TRANSCRIPT
Bioinformatics PhD. Course
Summary (approximate)
• 1. Biological introduction• 2. Comparison of short sequences (<10.000 bps)
• 4 Sequence assembly
• 3 Comparison of large sequences (up to 250 000 000)
• 5 Efficient data search structures and algorithms
• 6 Proteins...
3. Comparison of large sequences
Summary (more or less)
• 3.1 Overview• 3.2 Suffix trees• 3.3 MUMs
Sequence assembly
It has two applications:
• EST assembly: using mRNA fragments to find the genes expressed in a cell
• DNA sequencing: determining the bases of a DNA sequence.
• Hybridization: allows the tuples of a given length in a sequence to be found.
DNA sequencing
Techniques employed:
• Shotgun: breaks a sequence into small pieces.
• Hybridization: allows the tuples of a given length in a sequence to be found.
DNA sequencing
Techniques employed:
• Shotgun: breaks a sequence into small pieces.
Hybridization
Imagine we want to determine the sequence xxxxxxxxxxxxx
and we know that it contains the following triplets:
AAC GAT TGCACG CGG GCC TTG GGA ATT
How can the sequence be established?
Hybridization
We create a graph based on suffix-prefix overlaps
AAC GAT TGC
ACG CGG GCC TTG
GGA ATT
AACGGATTGCC
The sequence is deduced following the path in the graph
What is the cost of finding the path?
Hybridization
Let us consider a more realistic case:
For a general case we find the Hamiltonian path (NP-Complet)
What is the cost of the entire hybridization technique?
AAC CAA GAT TGC
ACG CGG GCC TTG
GGC GGA CCG ATT
Hybridization technique:
Cost: 1. Find the L-tuples AAC, CAA, ACG,... :
2. Find the overlaps AAC ACA,... :
All possible 4L tuples are constructed and searched
If there are m pieces of length L, then there are O(m2 L2 ) comparisons
3. Create the graph and find the Hamiltonian path
NP- Complet
Note
Quadratic cost: O(m2 )
Linear cost: O(m)
Exponential cost: O(2m )
m t = 1 mseg10m 10t = 10 mseg1000m 1000t = 1 seg
m t = 1mseg.10m 100t = 100 mseg.1000m 1000000t = 16 min
m t = 1 mseg.10m 210 t = 1 seg1000m 21000 t = 1030 t = 1018 years
Hybridization technique:
Cost: 1. Find the L-tuples AAC, CAA, ACG,... :
2. Find the overlaps AAC ACA,... :
All possible 4L tuples are constructed and searched
If there are m pieces of length L, then there are O(m2 L2 ) comparisons
3. Create the graph and find the Hamiltonian path
NP- Complet
How can we avoid NP-completeness?
Hybridization: two reductions
Find the Hamiltonian path (NP-complete)
AAC GAT TGC
ACG CGG GCC TTG
GGC GGA CCG ATT
or find the Eulerian path (linear) AA
AC
GG
CG
GA
CC
GC
TG
TT
AT
Hybridization: Eulerian path
Define unbalanced nodes: entry degree = exit degree(Starting or ending nodes: )
Define balanced nodes: entry degree = exit degree(traversal nodes: )
Finding the Eulerian path of a graph:
Hybridization: Eulerian path
Algorithm: Create a random path from a starting node to an ending node Add circuits at balanced nodes
Hybridization: camí Eulerià
Algorithm: Create a random path from a starting node to an ending node Add circuits at balanced nodes
Hybridization technique:
Cost: 1. Find the L-tuples AAC, CAA, ACG,... :
2. Find the overlaps AAC ACA,... :
All possible 4L tuples are constructed and searched
If there are m pieces of length L, then there are O(m2 L2 ) comparisons
3. Create the graph and find the Eulerian path
Linear
What is the limiting factor?
Hybridization: limitations of the technique
AAC CAA GAT TGC
ACG CGG GCC TTG
GGA ATT
Repeated fragments
What is the probability that a fragment repeats?
CAACGGATTGCC
CAACGGACGGATTGCC
GAC
Hybridization
Model: random sequence of length N with an equally distribution (1/4),
We estimate the probability that a fragment repeats:
Given 2 fragments, the probability that they are identical: 4-L
Given 3 fragment, the probability that two of them are identical: (32)4-L
Given m fragment, the probability that two of them are identical: (m2)4-L
If L=8 and we want this probability to be 1%, then m =32
Conclusion: the technique of Hybridization can only be applied to short sequences.
Excursió: hipòtesi d’equiprobabilitat
Cromosoma 21 té unes 34Mb distribuïdes:
A: 30% C: 20% G:20% T:20%
i si tenim en compte parells de bases, per exemple
AA: 10% AC: 5%
Fins a quin punt són equiprobables les seqüències?
Seqüenciació del DNA
De quines tècniques es disposa:
• Trets: permet disparar sobre la seqüència i trencar-la en trossos.
• Hybridization: permet saber quins mots d’una longitud fixa es troben a la seqüencia.
Trets
Imaginem que volem conèixer la seqüència xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
i la nostra tècnica ens permet :
• copiar-la
• partir-la a l’atzar en trossos de diferent llargada i sense saber-ne l’ordre
Què podem fer?
Trets: algorisme
Imaginem xxxxx|xxxxxxx|xxxxxxx|xxxx xxxxxxxx|xxxxxx|xxxxxx|xxxxxxx|xxxxxx|xxxxxx|xxxxxxx
L’algorisme serà:
1er. Comparar tots els trossos dos a dos per esbrinar com es superposen (eliminant inclusions).
2on. Construir el graf sufix-prefix
3er. Buscar el camí
Trets
La copiem tres cops xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
n’obtenim els trossos
accgt, aggt, acgatac, accttta, tttaac, gataca, accgtacc, ggt, acaggt,taacgat, accg, tacctt
Trets
Cal comparar els trossos per veure quins engalcen sufix-prefix
• Directament amb programació dinàmica (Cost quadràtic)
(tots contre tots i la majoria no engalceran)
• En dos passos:• Detectar els que engalcen
(Cost lineal amb l’Algorisme hash)
• Aplicar Prog. Dinàmica només als que engalcen
Excursió: algorisme de hash
Trets
accgtaccaccttta
tacctt
tttaac taacga
acgatac
accgaccgt
tacaggt
gataca
construïm el graf (cost quadràtic)
accgtacctttaacgatacaggt
i aconseguim la seqüència (cost exponencial)
Trets: problemes
Problemes
xxxxxxxxxxxxx
xxxxx
xxxxxx xxxxxx xxxxxxxx
accgaccgt
xxxxxxxxxxxxxx
• Repeticions consecutives• Repeticions curtes llunyanes• Falta de recobriment (problemes al seqüenciar)• Errors en els trossos (problemes al seqüenciar)
Trets: propietats del recobriment
Estudiem el recobriment:
Qüestions importants:
• Quina és la llargada mitja dels “contigs”?
• Quin es el nombre esperat de “contigs”?
• Quin és el percentatge de recobriment de la seqüència?
Trets: percentatge de recobriment
Grau de cobertura de la seqüència N d / L
Quin és el percentatge de recobriment de la seqüència?L
N d
Suposem que els segments estan uniformament distribuïts.
que una base de la seqüència sigui recoberta per k segments ve donada per la Dist. Binomial (N,d / L):
La probabilitat de
Prob{X=k}= (d/L)k (1-d/L)n-kNk
Excursió: distribució binomial
Distribució binomial B(n,p):
amb probabilitats p i 1-p de que hi caigui una bola.
Tenim dues urnes:
p 1-p
Quina és la probabilitat de que d’entre n boles en caiguin ka la primera urna?
Prob{X=k}= pk (1-p)n-knk
Excursió: distribució de Poisson
Quin és el límit de la distribució binomial quan n i p 0
conservant-se constant el producte np=
Distribució de Poisson P()
Prob{X=k}= e- (demostració a classe)k
k!
Llavors la probabilitat de que almenys caigui una bola és
Prob{X>0}= 1-Prob{X=0}= 1- e-
Trets: percentatge de recobriment
Si volem un recobriment del 99% cal que N d / L = 4.6
Distribució Binomial (N ,d / L)
Distribució de Poisson (N d / L)N d/L 0
Llavors el percentatge de recobriment ve donat per
la probabilitat de que al menys un tros cobreixi cada punt
1- e(N d / L)
Si volem un recobriment del 99.9% cal que N d / L = 6.9
Engalçament d’EST
Tenim milers de trosso de unes 500 bases de longitud,que pertanyen a diferents
L’algorisme serà:
1er. Comparar tots els trossos dos a dos per esbrinar quins estan relacionats(eliminant inclusions).
2on. Construir el graf sufix-prefix: (surten molts petits grafs)
3er. Buscar el camí