Ejemplo n.º 1
0
 def plot(self):
     expected = [1 for i in range(len(self.key)-1)]
     tracePlot = plotters.Iontrace(self.key,
                                   expected,
                                   self.data,
                                   title="Consensus Key 1-Mer - %s Ave. Peak = %s" % (self.title, self.average_peak))
     tracePlot.render()
     tracePlot.save(os.path.join(os.getcwd(), 'iontrace_%s' % self.title.replace(" ", "_")))
Ejemplo n.º 2
0
def makeRawPlot(data, labels, flowOrder):
    title = None
    if labels == 'TCAG':
        title = 'Library'
    elif labels == 'ATCG':
        title = 'Test Fragment'
    trace = {}
    for line in data:
        t = line.strip().split(" ")
        fTrace = [float(i) for i in t[1:]]
        trace[t[0]] = fTrace

    toPlot = []
    for k in flowOrder:
        if k != "G":
            toPlot.append(trace[k])
    expected = [1, 1, 1]
    tracePlot = plotters.Iontrace(flowOrder,
                                  expected,
                                  toPlot,
                                  title="Consensus Key 1-Mer - %s" % title)
    tracePlot.render()
    pylab.savefig(path.join(os.getcwd(), 'iontrace_%s' % title))