implement a program in Python that includes a function which:
- takes as input argument the name of a file which stores protein sequences in FastA format.
- from the file reads in the sequences using a suitable function/method in the Biopython package and stores these in a list.
- for each protein sequence uses a function/method in the re module for extracting all non-overlapping matches for the patterns listed below. All non-overlapping matches should be printed to a results file together with protein ID for which the pattern search was made. Patterns to search for:
- W, followed by any amino acid, followed by P
- Two S in a row, followed by a D or L
- Q followed by one or two A
Please download a protein sequences fasta file as I cannot upload mines
For finding a pattern I could not call my fasta file
Here's the Python program with the specified function: The find_patterns function takes the FASTA file name and results file name as arguments, then iterates through each sequence in the FASTA file, searching for the specified patterns using regular expressions, and writes the matches to the results file.
suppose protein sequence is as follows
output will be as