Question: PYTHON DNA sequencing is the process of determining the nucleic acid sequence in DNA. It includes any method or technology that is used to determine

PYTHON DNA sequencing is the process of determining the nucleic acid sequence in DNA. It includes any method or technology that is used to determine the order of the four bases: adenine (A), guanine (G), cytosine (C), and thymine (T). When DNA is represented in a computer program, it can be conveniently represented as a (long) list of numbers to indicate the arrangement of the four bases. Lets adopt here the convention of using the integer numbers 0, 1, 2, 3 to indicate the four bases, respectively, A, C, T, G. An important problem when working with DNA is subsequence matching. In short, subsequence matching determines if a short DNA sequence occurs within a longer sequence (i.e., all the letters of the subsequence occur consecutively within the original sequence). Implement the function simpleSubseqMatch(sequence, subseq) which, given a DNA sequence sequence and a shorter DNA sequence subseq, returns how many times subseq occurs within sequence. You can assume that both sequence and subseq are numeric lists containing only 0, 1, 2, 3 numbers, and can also be empty lists. For example: The sequence [0, 1, 1, 1, 1, 2, 2, 2] contains the subsequence [1, 1, 2] once. The sequence [0, 1, 1, 2, 0, 1, 1, 2] contains the subsequence [1, 1, 2] twice. The sequence [0, 1, 1, 1, 2, 2, 2, 2] contains the subsequence [2, 2] three times. An algorithm to solve this problem might operate as follows: 1. Loop through each location in the sequence. For each location: Check and see if the subsequence exists in the sequence starting at that location. If it does exist, increment a counter that remembers how many matches you have seen. 2. After the loop finishes, return the counter.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!