mirna_target = ["UACAGUACUGUGAUAACUGAA"] #polyAdenaltion function def polya ( mirna ): return mirna + 'A' * 30 mirna_target_a = polya(mirna_target[0]) print "Micro RNA Target: " + mirna_target[0] print "Poly A: " + polya( mirna_target[0]) #RNA to cDNA mirna_target_a = mirna_target_a.replace("U", "T") print "cDNA:" + mirna_target_a #reverse complement from string import maketrans f_strand = "TACG" r_strand = "ATGC" trans = maketrans(f_strand, r_strand) mirna_target_c = mirna_target_a.translate(trans) print "Complement:" + mirna_target_c mirna_target_rc = mirna_target_c[::-1] print "Reverse Complement:" + mirna_target_rc #generate RT primers rt_primers = ["CTTTT" + str(x) for x in mirna_target] for i in range(15): rt_primers_dict = {primer:(("t" * i )+ str(primer)) for primer in rt_primers} print rt_primers_dict
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question