A single-nucleotide polymorphism (abbreviation: SNP; pronunciation: snip) is a DNA sequence variation — a polymorphism — occuring when a single nucleotide (A, C, G or T) in the genome (or another shared sequence) differs between two members of a biological species or paired chromosomes in a human. For example, the two sequenced DNA fragments from different individuals, AAGCCTA to AAGCTTA, contain a difference in a single nucleotide at the 5th position. In this case we say that there are two alleles.

SNP
The first DNA molecule differs from the second DNA molecule at a single base-pair location (a C/T polymorphism).

These genetic variations underlie differences in our susceptibility to certain diseases. The severity of illness and the way our body responds to treatments are also manifestations of genetic variations. For example, a single mutation in the APOE (apolipoprotein E1) gene is associated with a higher risk for Alzheimer disease.

Assignment

In this exercise, DNA sequences are represented as strings that only contain the upper case letters A, C, G and T, representing the individual nucleotides.

Example

>>> SNP('AAGCCTA', 'AAGCTTA')
(4, 'C', 'T')
>>> SNP('AAGCCTAA', 'AAGCTTA')
>>> SNP('AAGCTTA', 'AAGCTTA')
>>> SNP('AAGCCCA', 'AAGCTTA')

>>> SNPs('AGCTGATAAGCCTAAGCGCT', 'AAGCTTA')
[11]
>>> SNPs('ATCGTAAGCCTAAGGCTACGCTTAGAGATA', 'AAGCTTA')
[9, 18]
>>> SNPs('AAGCCTAAGCCTA', 'AAGCTTA')
[4, 10]