Question: Write a python program that identifies number of times a pattern appears in a text file.The text-file should be in the same folder as the

Write a python program that identifies number of times a pattern appears in a text file.The text-file should be in the same folder as the python script.
The program should ask the user to enter the pattern for matching/searching.
The text file can be of multiple lines and the program should be able to match a sequence that is split over two lines due to newline and/or carriage return.
Consensus nine-bp binding site sequences of SP1 is 5'-GGGGCGGGG-3'. You suspect second finger GCG can have a mutation and you are looking for all possible mutation of GCG)in the text file. You are asked to write a program that would look for sequence GGGNNNGGG, where NNN could be any possible nucleotides.
***use Python3

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!