0% found this document useful (0 votes)
5 views20 pages

Lecture 6.2 FASTA

Uploaded by

samir241-15-361
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views20 pages

Lecture 6.2 FASTA

Uploaded by

samir241-15-361
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Database

Searching
(FASTA)
Lecture – 6.2

Department of CSE, DIU


CONTENTS

1. TP, TN, FP, FN

2. Selectivity, Sensitivity

3. Hash Table used in FASTA


1. TP, TN, FP, FN
True Positive, True Negative, False Positive, False Negative
A patient fears that he
has Cancer
&
Goes to the doctor for
Diagnosis
Possible Scenarios
True Positive True Negative
Patient really had Patient didn’t have
cancer cancer
& &
Diagnosis came Diagnosis came
Positive Negative

False Positive False Negative


Patient didn’t have Patient really had
cancer cancer
& &
Diagnosis came Diagnosis came
Positive negative
2. Selectivity and
Sensitivity
We will learn about calculating selectivity and sensitivity
Selectivity &
Sensitivity

Worked Out Example ▹
(Sensitivity)
Dataset

A G

C T

G T

G C

A G

C G

Search Character = C
Expected = CCC
Outcome = ACC
Worked Out Example ▹
(Selectivity)
Dataset

A G

C T

G T

G C

A G

C G

Search Character = C
Expected = CCC
Outcome = ACC
3. Hash Table Used in
FASTA
Hash Table Algorithm
Given Data

Query Sequence:
JUSTICELEAGUE
Target Sequence:
LEAGUEOFASSASINS
Value of K : 1
Step 1 : Build Query Table

1 2 3 4 5 6 7 8 9 10 11 12 13
J U S T I C E L E A G U E
Step 2: Hash Table for Query Sequence

Write all the distinct characters appeared in the Query Sequence


Lexicographically and then, beneath that,
write the number of the position in which that letter appeared. There can be
multiple occurrences.
A C E G I J L S T U

10 6 7 11 5 1 8 3 4 2
9 12
13
Step 3 : Build Target Table

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
L E A G U E O F A S S A S I N S
Step 4 : Import the Hash Table for Query
Sequence

A C E G I J L S T U

10 6 7 11 5 1 8 3 4 2
9 12
13

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
L E A G U E O F A S S A S I N S
Step 5 : Build the Extended Target Table
based on Hash Table
A C E G I J L S T U

10 6 7 11 5 1 8 3 4 2
9 12
13

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
L E A G U E O F A S S A S I N S

7 5 7 7 -3 1 1 -7 -8 -2 -10 -9 -13
7 7 3
11 7

Entry in Extended Row = Position of the Letter in Hash Table – Position of the
Letter in Extended Target Table
Example:• For L, in Extended Target Table, Entry is 7 (8-
• 1) .
Similarly For E, the entries are 5 (7-2), 7 (9-
Step 5 : Build Offset Table

Draw a table from the minimum to the maximum entry of the extended target
table. Then beneath each entry
number, write down number of times that entry occurred in extended target
table. For example, the entry 7
-13 Occurred
-12 -116 times
-10 and
-9 the
-8 entry
-7 1-6
occurred
-5 -42 times.
-3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11
1 1 1 1 1 1 1 2 1 1 6 1
Step 6: Build Pre-Final Table

Start both Query and Target sequence


from 0 position.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
J U S T I C E L E A G U E

L E A G U E O F A S S A S I N S
Step 7 : Build Final Table

• Find out the entry number from the offset table, that occurred maximum number of
times (Here 7, which occurred
6 times).
• After that, add that entry number with the previous starting position of target
sequence to get the new starting
Position of Target Sequence (Previous starting position = 0, Then new starting position of
0 target
1 2 3 seq4 5becomes
6 7 8 09 +10
7 = 11
7). 12 13 14 15 16 17 18 19 20 21 22
J U S T I C E L E A G U E

L E A G U E O F A S S A S I N S

You might also like