خرید بک لینک

Vote count: 0

I am trying to find palindromic sequences within DNA by using recursion. I am doing this because it is impossible to know the exact length of a palindromic sequence within DNA. I have worked through the problem in my head and on paper, but the code below still does not come up with the answer I want it to. I am new to pyparsing and using CFGs. Therefore, I might be wrong with the way I set the code up. Any help would be welcome.

stem = Forward()
atRule = Word("A") + ZeroOrMore(stem) + Word("T")
taRule = Word("T") + ZeroOrMore(stem) + Word("A")
gcRule = Word("G") + ZeroOrMore(stem) + Word("C")
cgRule = Word("C") + ZeroOrMore(stem) + Word("G")
stem << locatedExpr(Combine(atRule + taRule + gcRule + cgRule))
print(stem.parseString("AAAGGGCCCTTTAAAGGGCCCTTT"))

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 20 فروردين 1395 ساعت: 9:25

صفحه بندی