示例#1
0
    def add_images_section(self):
        style = "width:65%"
        import pylab
        pylab.ioff()

        def plotter1(filename):
            self.bam.plot_bar_flags(logy=True, filename=filename)

        html1 = self.create_embedded_png(plotter1, "filename", style=style)

        def plotter2(filename):
            self.bam.plot_bar_flags(logy=False, filename=filename)

        html2 = self.create_embedded_png(plotter2, "filename", style=style)

        def plotter3(filename):
            self.bam.plot_bar_mapq(filename=filename)

        html3 = self.create_embedded_png(plotter3, "filename", style=style)

        self.sections.append({
            "name": "Image",
            "anchor": "table",
            "content": html1 + html2 + html3
        })
示例#2
0
 def plotter(filename, key):
     name = key.replace(" ", "_")
     pylab.ioff()
     histograms[key].plot(logy=False, lw=2, marker="o")
     pylab.title(name + "(%s)" % count)
     pylab.grid(True)
     pylab.savefig(filename)
     pylab.close()  # need to close the figure otherwise warnings 
示例#3
0
 def plotter(filename, key):
     name = key.replace(" ", "_")
     pylab.ioff()
     histograms[key].plot(logy=False, lw=2, marker="o")
     pylab.title(name + "(%s)" % count)
     pylab.grid(True)
     pylab.savefig(filename)
     pylab.close()  # need to close the figure otherwise warnings
示例#4
0
文件: bamqc.py 项目: sequana/sequana
    def add_images_section(self):
        style = "width:65%"
        import pylab
        pylab.ioff()

        def plotter1(filename):
            self.bam.plot_bar_flags(logy=True, filename=filename)
        html1 = self.create_embedded_png(plotter1, "filename", style=style)

        def plotter2(filename):
            self.bam.plot_bar_flags(logy=False, filename=filename)
        html2 = self.create_embedded_png(plotter2, "filename", style=style)

        def plotter3(filename):
            self.bam.plot_bar_mapq(filename=filename)
        html3 = self.create_embedded_png(plotter3, "filename", style=style)


        self.sections.append({
          "name": "Image",
          "anchor": "table",
          "content": html1 + html2 + html3
        })
示例#5
0
文件: trf.py 项目: sequana/sequana
    def add_images_section(self):
        style = "width:65%"
        import pylab
        pylab.ioff()

        def plotter1(filename):
            pylab.clf()
            self.trf.hist_entropy()
            pylab.savefig(filename)

        html1 = self.create_embedded_png(plotter1, "filename", style=style)

        def plotter2(filename):
            pylab.clf()
            self.trf.hist_period_size()
            pylab.savefig(filename)

        html2 = self.create_embedded_png(plotter2, "filename", style=style)

        self.sections.append({
            "name": "Image",
            "anchor": "table",
            "content": html1 + html2
        })