This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
from pathlib import Path | |
def find_motifs_from_file(file_path, kmer_length=6): | |
""" | |
Reads a text file with DNA sequences, one per line, using pathlib and finds the most frequent k-mers. | |
Parameters: | |
- file_path (str): The path to the text file containing the DNA sequences. | |
- kmer_length (int): The length of the k-mers to consider in the motif search. |