Question: 1. Implement a C++ function to compute the score of a multiple sequence alignment using Entropy method (incorporate gaps) and also output the profile of
1. Implement a C++ function to compute the score of a multiple sequence alignment using Entropy method (incorporate gaps) and also output the profile of the alignment. Note that your function should be able detect the number of sequences and the alignment length in the multiple alignment. The alignment should be read from a text file. Note that pX log2pX is 0 if pX is 0.
Test Case 1:
AAA
ACC
ACG
ACT
Output should be Alignment profile:
A 4 1 1
T 0 0 1
G 0 0 1
C 0 3 1
- 0 0 0
Entropy score is 2.811
Test Case 2:
AA-
ACC
ACG
AC-
Output should be Alignment profile:
A 4 1 0
T 0 0 0
G 0 0 1
C 0 3 1
- 0 0 2
Entropy score is 2.311
Test Case 3:
GGGC-
GGTAA
GGGAA
Output should be Alignment profile:
A 0 0 0 2 2
T 0 0 1 0 0
G 3 3 2 0 0
C 0 0 0 1 0
- 0 0 0 0 1
Entropy score is 2.755
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
