본문 바로가기
Python

Rosalind - Finding a Motif in DNA

by 코딩하는 미토콘드리아 bioinformatics 2023. 10. 15.
반응형

문제 설명:

출처 : https://www.nature.com/articles/nbt0806-959

"DNA sequence motifs are short, recurring patterns in 

DNA that are presumed to have a biological function"

Motif 란 생물학적으로

중요한 기능을 뉴클리오티드나 아미노산 패턴을 의미 합니다.

이러한 서열 패턴을 분석 함으로써

두 종간의 생물학적 비교를 할 수 도 있고,

제한효소나 전사인자의 binding sites 를 알아 낼 수도 있습니다.

 

코드:

### Finding a Motif in DNA

s = "GATATATGCATATACTT"
t = "ATAT"

def findMotif(s,t):
    start=0
    while True:
        start = s.find(t,start)
        if start == -1:
            return
        yield start + 1
        start += 1

x = findMotif(s,t)
result = ''
for y in x:
    result = result + str(y) + " "

print(result)
#result
#2 4 10

 

관련 내용

https://biocorecrg.github.io/CRG_Bioinformatics_for_Biologists_2021/dna_motifs.html

 

DNA motifs

DNA motifs DNA sequence motifs are short, recurring patterns in DNA that are presumed to have a biological function. Often they indicate sequence-specific binding sites for proteins such as nucleases and transcription factors (TF). Others are involved in i

biocorecrg.github.io

 

반응형