סמינר 2 במדעי המחשב 236802 סמסטר חרף 2004-5

Preview:

DESCRIPTION

סמינר 2 במדעי המחשב 236802 סמסטר חרף 2004-5. http: //www.cs.technion.ac.il/~moran/COURSES/SEM04-5/sem04-5.htm. 236803 סמינר במדעי המחשב 3 סמסטר ב', תשס"ג. הרשמה לקורס כל מי שרשום לקורס, או לא רשום אך מעונין להרשם – שיירשם בדף הנוכחות. - PowerPoint PPT Presentation

Citation preview

.

במדעי המחשב 2סמינר 236802

2004-5סמסטר חרף

  http://www.cs.technion.ac.il/~moran/COURSES/SEM04-5/sem04-5.htm

דואר אלקטרוני יום  ושעות קבלה משרד טל' הרצאה מרצה 

moran@cs 16:30-17:30ה' 4363 639  טאוב , יום 6טאוב -14:30ה'

16:30

  שלמה מורן 

2

   

3 סמינר במדעי המחשב 236803סמסטר ב', תשס"ג   

הרשמה לקורס  

כל מי שרשום לקורס, או לא רשום אך מעונין להרשם – שיירשם בדף הנוכחות.

עדיפות לאלו שאי רישום לסמינר עלול לעכב את סיום לימודיהם.

תלמידי תואר שני המעונינים להרשם – נא שלחו לי דוא"ל. אישור הרשמה מותנה במקומות פנויים בקורס.

3

   

3 סמינר במדעי המחשב 236803סמסטר ב', תשס"ג   

דרישות הקורס  

המשתתפים בקורס יעבירו הרצאות על אלגוריתמים הקשורים לבניית עצים פילוגנטיים )עצי אבולוציה(.

 נושאי  ההרצאה יילקחו ממאמרים ב .רשימה המופיעה באתר הקורס

אחת או שתי ההרצאות הראשונות )כולל הנוכחית( יינתנו על ידי המרצה. הרצאת סטודנטים ראשונה תינתן לכל המאוחר ב

4.11.04.: מבנה הציון

נוכחות. ייתכן בוחן סיום לבדיקת 10-20% הרצאה, 80-90%בקיאות בהרצאות שהועברו.

 

4

   

3 סמינר במדעי המחשב 236803סמסטר ב', תשס"ג   

הכנת הרצאה 

ככלל, ההרצאות יוכנו ויוגשו בזוגות, כל זוג ירצה שעתיים )פגישה אחת(. יש להכין תקציר של ההרצאה, שיחולק

לסטודנטים בכתה .ניתן להעזר במרצה לפני ההרצאה. בתאום עם המרצה, ניתן

להציג רק חלק מהמאמר.  יש לשלוח אל המרצה בדוא"ל את תקציר ההרצאה לפחות

שעות לפני ההרצאה. התקציר יועלה על אתר הקורס. 72

5

   

3 סמינר במדעי המחשב 236803סמסטר ב', תשס"ג   

 

רישום נוכחות:( 28.10.03ניקוד על נוכחות ייעשה מהרצאה שניה )1.

והלאה.היעדרות מהרצאה תחשב מוצדקת עבור מי שיש לו 2.

אישור מילואים\מחלה של ארבעה ימים או יותר. למי שתהיה היעדרות לא מוצדקת אחת יוכל לכתוב 3.

תקציר של ההרצאה ממנה נעדר )עד שני עמודים קבצים בדאר אלקטרוני(, אלימודפסים – ניתן לשלוח

ויוחזרו לו חלק או מלוא הנקודות שירדו מציונו בגין אותה היעדרות. מועד אחרון להגשת התקציר היום האחרון

בסמסטר.מי שתהיה לו יותר מהיעדרות לא מוצדקת אחת יוכל 4.

לסכם, בתאום אתי ובהיקף שייקבע על ידי, את אחת ההרצאות מהן נעדר, ויוחזרו לו חלק או מלוא הנקודות

שירדו מציונו בגין אותן היעדרויות.

6

 

הקצאת הרצאות ראשונות:מיד לאחר הרצאה זו מוזמנים אלי למשרד אלו

המוכנים להרצות עד מחצית נובמבר, לצורך קבלת המאמרים להרצאה.

הקצאת הרצאות מאוחרות יותר:סטודנטים הרשומים לקורס מתבקשים לשלוח אלי תוך

שבוע מהיום, או מיד לאחר אישור הרשמתם:תאריכים בהם לא יוכלו להרצות מסיבות מלואים, 1.)מומלץ( זמני הרצאה מועדפים, בני זוג מוסכמים 2.

להרצאה.המגמה לקבוע שבוץ ההרצאות עד ההרצאה של

.4.11.03ה

7

Course Prerequisites

Computer Science and Probability Background Data structure 1 )cs234218( Algorithms 1 )cs234247( Computability theory )cs236343( Probability )any course(

Not a prerequisite, but recommended: Algorithms in Computational Biology (cs236522).

8

Questions so far?

Introduction

9

Evolution

Evolution of new organisms is driven by

Diversity Different individuals

carry different variants of the same basic blue print

Mutations The DNA sequence

can be changed due to single base changes, deletion/insertion of DNA segments, etc.

Selection bias

10

The Tree of Life

Sou

rce:

Alb

erts

et

al

11

Primate evolution

A phylogeny is a tree that describes the sequence of speciation events that lead to the forming of a set of current day species; also called a phylogenetic tree.

12

Historical Note Until mid 1950’s phylogenies were constructed by

experts based on their opinion (subjective criteria)

Since then, focus on objective criteria for constructing phylogenetic trees

Thousands of articles in the last decades

Important for many aspects of biology Classification Understanding biological mechanisms

13

Morphological vs. Molecular

Classical phylogenetic analysis: morphological features: number of legs, lengths of legs, etc.

Modern biological methods allow to use molecular features

Gene sequences Protein sequences

Analysis based on homologous sequences (e.g., globins) in different species

14

Morphological topology

BonoboChimpanzeeManGorillaSumatran orangutanBornean orangutanCommon gibbonBarbary apeBaboonWhite-fronted capuchinSlow lorisTree shrewJapanese pipistrelleLong-tailed batJamaican fruit-eating batHorseshoe bat

Little red flying foxRyukyu flying foxMouseRatVoleCane-ratGuinea pigSquirrelDormouseRabbitPikaPigHippopotamusSheepCowAlpacaBlue whaleFin whaleSperm whaleDonkeyHorseIndian rhinoWhite rhinoElephantAardvarkGrey sealHarbor sealDogCatAsiatic shrewLong-clawed shrewSmall Madagascar hedgehogHedgehogGymnureMoleArmadilloBandicootWallarooOpossumPlatypus

Archonta

Glires

Ungulata

Carnivora

Insectivora

Xenarthra

)Based on Mc Kenna and Bell, 1997(

15

Rat QEPGGLVVPPTDA

Rabbit QEPGGMVVPPTDA

Gorilla QEPGGLVVPPTDA

Cat REPGGLVVPPTEG

From sequences to a phylogenetic tree

There are many possible types of sequences to use )e.g. Mitochondrial vs Nuclear proteins(.

16

Theory of Evolution

Basic idea speciation events lead to creation of different

species. Speciation caused by physical separation into

groups where different genetic variants become dominant

Any two species share a (possibly distant) common ancestor

17

Phylogenenetic trees

Leafs - current day species Internal vertices - hypothetical most recent common

ancestors Edges length - “time” from one speciation to the next

Aardvark Bison Chimp Dog Elephant

18

Dangers in Molecular Phylogenies

We have to emphasize that gene/protein sequence can be homologous for several different reasons:

Orthologs -- sequences diverged after a speciation event

Paralogs -- sequences diverged after a duplication event

Xenologs -- sequences diverged after a horizontal transfer (e.g., by virus)

אסתי יגר לוטם 31.12.02: פרלוג - גנים ששוכפלו בתוך אותו יצור, וקבלו תכונות שונות. השואת גנים (למשל המוגלובין אלפה ובטה, גם אצל עכבר וגם אצל אדם - השואת אלפה של אדם עם בטה של עכבר תיתו נתונים מוטעים על מידת המרחק)

19

Dangers of Paralogs

Speciation events

Gene Duplication

1A 2A 3A 3B 2B 1B

20

Dangers of Paralogs

Speciation events

Gene Duplication

1A 2A 3A 3B 2B 1B

If we happen to consider only species 1A, 2B, and 3A, we get a wrong tree that does not represent the phylogeny of the host species of the given sequences because duplication does not create new species.

In the sequel we assume all given sequences are orthologs.

S

SS

21

Types of Trees

A natural model to consider is that of rooted trees

CommonAncestor

22

Types of treesUnrooted tree represents the same phylogeny without

the root node

Depending on the model, data from current day species does not distinguish between different placements of the root.

23

Rooted versus unrooted treesTree a

ab

Tree b

c

Tree c

Represents the three rooted trees

24

Positioning Roots in Unrooted Trees

We can estimate the position of the root by introducing an outgroup:

a set of species that are definitely distant from all the species of interest

Aardvark Bison Chimp Dog Elephant

Falcon

Proposed root

25

Type of Data

Distance-based Input is a matrix of distances between species Can be fraction of residue they disagree on, or

alignment score between them, or …

Character-based Examine each character (e.g., residue)

separately

26

Three Methods of Tree Construction

Distance- A weighted tree that realizes the distances between the objects.

Parsimony – A tree with a total minimum number of character changes between nodes.

Maximum likelihood - Finding the “most probable” tree.

USER
לפני הבניה יש להכניס את משפט 4 הנקודות (מקובץ נפרד), שיחליף את ההוכחה הקודמת שלו בהרצאה 12. כמו כן ייתכן שכדאי לוותר על UPGMA. הערה זו משפיעה כמובן גם על הרצאה 12.שלמה 12.3.03

27

Molecular clock

The tree has all leaves in the same depth. When this property holds, the phylogenetic tree is said to satisfy a molecular clock. Namely, the time from a speciation event to the formation of current species is identical for all paths )wrong assumption in reality(.

30

Additivity

Molecular clock: a special case of additive distances: distances that can be realized by a tree.

Always true for 3 or less vertices:

ab

c

i

j

k

cbkjd

cakid

bajid

(,)

(,)

(,)

31

Additive sets

Given a set M of L objects with pairwise distances:d)i,i(=0, and for i≠j, d(i,j(>0d(i,j)=d)j,i(. For all i,j,k it holds that d)i,k( ≤ d(i,j)+d)j,k(.

we say that the set is additive if there is a tree T, L of its nodes correspond to the L objects, with positive weights on the edges, such that for all i,j, d)i,j( = dT)i,j(, the length of the path from i to j in T.

Note 1: If the tree is required to be binary, the edge weights are required to be non-negative.

Note 2: For simplicity, we will assume the nodes corresponding to objects are all leaves

32

Important Note

In reality, the input data is not an additive set. So we need the algorithm to return a tree which

approximates the distances of the input data. A natural requirement: If the input set is additive, then

the algorithm should return a correct tree )which is unique if all distances are positive(.

Algorithmic questions: Decide if a given set is additive, and if it is, construct the corresponding weighted tree.

33

Basic property of Additivity

Suppose input distances are additive. For any three vertices i,j,k there is a “junction” m.

Thus

ab

c

i

j

k

) , () , () , (

d i j a bd i k a cd j k b c

m

1) , ( ) ) , ( ) , ( ) , ((

2d k m d i k d j k d i j

34

Identifying additive sets:The four points condition

Theorem: A set M is additive iff any subset of four objects can be labeled i,j,k,l so that:

d)i,j( +d)k,l( = d)i,l( +d)k,j( ≥ d)i,k( + d)j,l(

il

kj

Proof:Additivity 4P Condition: By the figure...

35

The four point condition

d)i,j( +d)k,l( = d)i,l( +d)k,j( ≥ d)i,k( + d)j,l(

4P Condition Additivity: Induction on the number of objects L.For L ≤ 3 the condition is empty and tree exists. So assume L>3. Let a set of objects {1,..,L} be given, with pairwise distances which satisfy the 4P condition.

36

Induction step: Remove Object L from the set By induction, there is a tree for the L-1 nodes, T’. For each pair of labeled nodes (i,j) in T’, let aij, bij,

cij be defined by the following figure:

aij

bij

cij

i

j

L

mijL

1[ ) , ( ) , ( ) , (]

2ijc d i L d j L d i j

37

Induction step: Pick i and j that minimize cij. T is constructed by adding L )and possibly mijL( to T’, as in the

figure. Remains to prove: For each k ≠ i,j: d)k,L( = dT)k,L(.

aij

bij

cij

i

j

L

mijL

T’

38

Induction stepProof according the location of mijk on T’.

Case 1: mijk ≠ mijL .

WLOG Assume that mijk lies between mijL and j.

By induction hypothesis:

d)i,j (=dT)i,j(, d)i,k (=dT)i,k(, d)j,k (=dT)j,k(

By construction:

d)i,L (=dT)i,L(, d)j,L (=dT)j,L(

Need to prove:

d(k,L) = dT(k,L)

aij

bij

cij

i

j

L

mijL

T’

k

mijk

39

Induction stepProof

case 1: mijk is located on T’ as shown. By the 4P condition on {i,j,k,L}:

d)k,L( +d)i,j( = d)j,L( +d)i,k(> d)i,L( +d)j,k (:

and by the location of mijk :

dT)k,L( +d)i,j( = d)j,L( +d)i,k(:

Which implies that d)k,L( = dT)k,L(.

aij

bij

cij

i

j

L

mijL

T’

k

mijk

40

Induction step (cont.)Case 2: mijk = mijL. It is suffice to prove that

d)k,L( +d)i,j( = d)j,L( +d)i,k(.By the 4P condition on {i,j,k,L} and the fact that:

d)j,L( +d)i,k( = d)i,L( +d)j,k(, we have that:

d)k,L( +d)i,j( ≤ d)j,L( +d)i,k(,

cij

i

j

L

mijL

T’

k

41

Induction step (end) It remains to prove that d)k,L( +d)i,j( ≥ d)j,L( +d)i,k(:

this is proved by the formula below. The left inequality is implied by the minimality of cij.

ai

j

bij

cij

i

j

L

mijL

T’

k

0 2) ( [ ) , ( ) , ( ) , (] [ ) , ( ) , ( ) , (][ ) , ( ) , (] [ ) , ( ) , (]

ij ikc c d i L d j L d i j d i L d k L d i kd j L d i k d k L d i j

42

Constructing additive trees:The neighbor finding problem

The formula

shows that if we knew that i and j are neighboring leaves,

then we can construct their parent node m and compute the

distances of m to all other leaves m.

We remove nodes i,j and add m.

1) , ( ) ) , ( ) , ( ) , ((

2d k m d i k d j k d i j

43

Neighbor Joining Algorithms Set L to contain all leaves

Iteration: Choose i,j such that i,j are leaves with same

father. Create new node m, and set

remove i,j from L, and add mTerminate:

when |L| =2, connect two remaining nodes

ij

m

kk

)),(),(),((),(,

)),(),(),(

)),(),(),((),(

jidkjdkidmkdk

midjidmjd

kjdkidjidmid

21

21

other nodeeach for

44

Neighbor Joining Algorithms

Question: How do we decide, from the distance matrix, if vertices i and j are neighboring leaves?

This is one of the topics to be discussed.