Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

DNA analysis is an important part of medical exploration and discovery. In this

ID: 3686412 • Letter: D

Question

DNA analysis is an important part of medical exploration and discovery. In this assignment*, we examine both hemoglobin genes for each of four people, with each gene consisting of 444 DNA bases (A,C,T,G). These are the four bases (letters) that make up DNA. Sickle-cell anemia is a disorder that is caused by a single mutation in the hemoglobin gene.

A sickle hemoglobin gene has a T in the 20th position.

A person is anemic if he/she has two sickle hemoglobin genes.

A person is a carrier if he/she has one sickle hemoglobin gene.

Otherwise, the person is normal.

The input file, called dna.txt, contains the DNA of the two hemoglobin genes of four people. The file contains the gene DNA information in this order:

gene1A

gene2A

gene1B

gene2B

gene1C

gene2C

gene1D

gene2D

where 1 and 2 denote the first and second gene, and A,B,C,D denote people. The required information is found in the first 3552 characters of dna.txt, that is, there is no whitespace before or between the eight genes. Create a report, called DNAanalysis.txt, that indicates whether each person is anemic, a carrier, or normal.

For example,

Person X is anemic.

Person Y is normal.

Person Z is a carrier.

Two individuals are related if they share at least one gene. Determine whether any of the above four individuals are related and indicate this in DNAanalysis.txt. For example, Person X is related to person Y. Include a subfunction, called SameGene, that takes two character arrays and their size, and returns true if they are the same gene; and returns false, otherwise

DNA.txt

Explanation / Answer

we can solve using file pointers.

according to given statement

we examine both hemoglobin genes for each of four people, with each gene consisting of 444 DNA bases (A,C,T,G). These are the four bases (letters) that make up DNA. Sickle-cell anemia is a disorder that is caused by a single mutation in the hemoglobin gene.

A sickle hemoglobin gene has a T in the 20th position.

A person is anemic if he/she has two sickle hemoglobin genes.

A person is a carrier if he/she has one sickle hemoglobin gene.

Otherwise, the person is normal.

Person X is anemic.

Person Y is normal.

Person Z is a carrier.