A General Observation
From the result, we could see that:
1 |
SP-Score: 19/26 = 0.7307… |
Approach
From the last section, we know our propose is to calculate:
1 |
1. Number of shared homologies. |
At the same time, we have a general thinking which is:
1 |
2,3 —> 1 |
First of all, it gives these definitions:
1 |
Si represent the i-th sequence in the alignment. |
I will give you an example:
Then, we could know these (Explaining an example):
Algorithm
This section is for programming.
Let’s look at some difinitions first:
1 |
n represent the number of sequences in the alignment. |
Explaining them by this example:
The pseudo code is like this:
Make a mapping:
The result could be:
1 |
SP-Score: N/h1 |
Evaluation
Calculating the matrix S: O(nk)
Calculating combination number: O(1)
Calculating each Nx: O(n)
As for the FOR loop: O(nk)
So:
The time complexity is O(n•k)
.
The space complexity is O(n•k)
.
Comparing to the other programs:
The link of this page is https://blog.nooa.tech/articles/bd4539a2/ . Welcome to reproduce it!