def plotTotalChromPairsMRM(dataFrame, toPlotIndex, axis, colors=["blue", "red"], smooth=0, zoom=False): [lightX, lightY, heavyX, heavyY] = getIsotopPairTotalsMRM(dataFrame, toPlotIndex) if smooth > 0: lightY = vizLib.smoothListGaussian([float(i) for i in lightY], degree=smooth) heavyY = vizLib.smoothListGaussian([float(i) for i in heavyY], degree=smooth) axis.plot(lightX, lightY, colors[0], label="light") axis.plot(heavyX, heavyY, colors[1], label="heavy") if zoom: maxIndex = numpy.argmax(numpy.array(lightY)) axis.set_xlim(lightX[maxIndex] - 2, lightX[maxIndex] + 2) return axis
def plotMRM( dataFrame, fileName, pepSeq, precursorCharge, fragIon, prodCharge, isotopeLabel, ax, color="grey", smooth=0, zoom=False, ): subDF = dataFrame[ (dataFrame["Peptide Modified Sequence"] == pepSeq) & (dataFrame["Fragment Ion"] == fragIon) & (dataFrame["Precursor Charge"] == precursorCharge) & (dataFrame["Isotope Label Type"] == isotopeLabel) & (dataFrame["Product Charge"] == prodCharge) & (dataFrame["File Name"] == fileName) ] X = subDF["Times"].values[0].split(",") Y = subDF["Intensities"].values[0].split(",") if smooth > 0: Y = vizLib.smoothListGaussian([float(i) for i in Y], degree=smooth) ax.plot(X, Y, color=color) if zoom: if numpy.max(Y) > 100: maxIndex = numpy.argmax(numpy.array(Y)) ax.set_xlim(float(X[maxIndex]) - 2, float(X[maxIndex]) + 2) return ax