DNA String compression example
Definition:
A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0. |d| is the length of d.
Assume the following binary encoding: A = 00, T= 01, C = 10, G = 11
We can fit 4 characters from a DNA string into an unsigned char.If (|d| % 4 != 0), then pad with trailing zeros. Suppose d is ATTCGG.
Compress ATTCGG using bitwise operators in C++. First print |d|.
DNA String compression example
Definition:
A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0. |d| is the length of d.
Assume the following binary encoding:
A = 00, T= 01, C = 10, G = 11
d = ATTCGG
Initialize an 8-bit unsigned char to store compressed bits.
DNA String compression example
Definition:
A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0. |d| is the length of d.
Assume the following binary encoding:
A = 00, T= 01, C = 10, G = 11
d = ATTCGG
Read the first character of d and use bitwise operators to place its binary encoding in the proper location.
DNA String compression example
Definition: A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0. |d| is the length of d.
Assume the following binary encoding:
A = 00, T= 01, C = 10, G = 11
d = ATTCGG
Read the next character of d and use bitwise operators to place its binary encoding in the proper location.
DNA String compression example
Definition:
A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0 |d| is the length of d.
Assume the following binary encoding:
A = 00, T= 01, C = 10, G = 11
d = ATTCGG
Read the next character of d and use bitwise operators to place its binary encoding in the proper location.
DNA String compression example
Definition:
A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0. |d| is the length of d.
Assme the following binary encoding:
A = 00, T= 01, C = 10, G = 11
d = ATTCGG
Read the next character of d and use bitwise operators to place its binary encoding in the proper location.
DNA String compression example
Definition: A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0.
|d| is the length of d.
Assume the following binary encoding:
A = 00, T= 01, C = 10, G = 11
d = ATTCGG
Print the base-10 integer value of the 8-bit unsigned char.
DNA String compression example
Definition: A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0. |d| is the length of d.
Assume the following binary encoding:
A = 00, T= 01, C = 10, G = 11
d = ATTCGG
Reinitialize the 8-bit unsigned char.
DNA String compression example
Definition:
A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0 |d| is the length of d.
Assume the following binary encoding:
A = 00, T= 01, C = 10, G = 11
d = ATTCGG
Read the next character of d and use bitwise operators to place its binary encoding in the proper location.
DNA String compression example
Definition:
A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0. |d| is the length of d.
Assume the following binary encoding:
A = 00, T= 01, C = 10, G = 11
d = ATTCGG
Read the next character of d and use bitwise operators to place its binary encoding in the proper location.
DNA String compression example
Definition: A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0. |d| is the length of d.
Assume the following binary encoding:
A = 00, T= 01, C = 10, G = 11
d = ATTCGG
Once we reach the end of d, add trailing zeros to fill the 8-bit
unsigned char.
DNA String compression example
Definition:A DNA string d is string of consisting of characters from the set {A, T, C, G} where |d| > 0. |d| is the length of d.
Assume the following binary encoding:
A = 00, T= 01, C = 10, G = 11
d = ATTCGG
Print the base-10 integer value of the 8-bit unsigned char
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of