So i m creating a program that will find a motiff and the position of the motiff in a sequence inside a fasta file. A motiff is like a specific string introduced by the user. So for example in this sequence ACCTGCTTCCGTTCGAGTTCAGTT and the motiff is GTT it needs to report that there is two occurrences and their positions.
I tried using the following code since my species name and sequence are stored inside a dictionary
def MotiffFinder(Dicionario, Motiff):
for key, value in Dicionario.items():
for Motiff in value:
print(value.index(Motiff))
i also tried
find()
but it doesnt seem to work since it reports positions where the motiff is not in.
Help