def test_rna_plots(self): print "test_rna_plots" RNA.PS_rna_plot(seq1, struct1, "test_ss.ps") anote = "2 15 1 gmark\n" + "3 cmark\n" RNA.PS_rna_plot_a(seq1, struct1, "test_ss_a.ps", None, anote) RNA.PS_dot_plot(seq1, "test_dp.ps") RNA.ssv_rna_plot(seq1, struct, "test.coord") print "please check the two postscript files test_ss.ps and test_dp.ps" RNA.write_parameter_file("test.par")
def rnaplot(seq, struct=None, path='rnaplots', name='temp'): import RNA if struct == None: struct = RNA.fold(seq)[0] filename = os.path.join(path, name + '.ps') #RNA.svg_rna_plot(seq,struct,filename) colors = [" 1. 0. .2", " 0. .9 .5"] macro = format_cmark_values(range(0, 10), rgb=colors[0]) RNA.PS_rna_plot_a(seq, struct, filename, '', macro) return filename