Write a relatively complex script which checks for the best match between two nucleotide sequences.
Best Matches
Two seqeunces can anneal in different ways. Consider these possibilities:
GGTTAACCGG --------------------> 0 GGTTAACCGG -------------------> 0 GGTTAACCGG ------------------> 0 GGTTAACCGG -----------------> 2 GGTTAACCGG ----------------> 1 GGTTAACCGG ---------------> 1 GGTTAACCGG --------------> 1 GGTTAACCGG -------------> 3 GGTTAACCGG ------------> 1 GGTTAACCGG -----------> 1 AGTCCGAGGT GGTTAACCGG ----------> 2 GGTTAACCGG ---------> 2 GGTTAACCGG --------> 3 GGTTAACCGG -------> 3 GGTTAACCGG ------> 1 GGTTAACCGG -----> 1 GGTTAACCGG ----> 2 GGTTAACCGG ---> 0 GGTTAACCGG --> 0As you can see there are three positions which are best matches. These are at offsets -2, 3, and 4.
When two sequences have unmatched ends, free nucleotides can fill in the missing spots providing the appropriate enzymes are available to connect them.
ASSIGNMENT:
Modify the sample script so that it can deal with any pair of nucleotides of any length (even two nucleotides of different length). Provide facilities for user input (and check user input to ensure that proper nucleotide sequences are entered).