Question: THIS CODE IS FOR PYTHON, IT SHOULD ONLY USE LISTS AND STRING FUNCTIONS: We want to build a code called matcher We will be given
THIS CODE IS FOR PYTHON, IT SHOULD ONLY USE LISTS AND STRING FUNCTIONS:
We want to build a code called matcher We will be given a string and a matching sequence(matchseq) Here is some background T matches with X, G matches with R, so X matches with T and R matches with G. We have a few cases we also need to be weary of 1. We can have situations where a matchingsequence can have an option to be two values this will be represented as X[GT]X so the value in the brackets can be either a G or a T so XGTX matches with TRT or TXT. 2. Another special case is the letter k matches with anything so k matches with T, X, G, and R so XK matches with TG, TR, TX, TT. 3. Finally we have the special case where people simplified the matching sequence and made it so TG3 means TGGG so TG3 can bind with XRRR We need to build this code in python using only the built in functions with strings and lists, the goal of the code is the obtain the index where the matching sequence matches with the given string. An example of this is def matcher(XTXTXXXT,X[GT]X). This matches with TXT at the 1st index of the gene.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
