def volcano_plot(self, label, pdf, colors="YlGnBu_r", log_bins=True):
"""
Create a volcano plot (p-value vs. functional score).
*label* is the data label (barcode, variant, etc.)
*pdf* is an open PdfPages instance.
The p-values used are the regression p-values (p-value of non-zero slope). Due to the large number of points, we use a hexbin plot showing the density instead of a scatter plot.
"""
logging.info("Creating volcano plot ({})".format(label), extra={'oname' : self.name})
# get the data
data = self.store.select("/main/{}/scores".format(label), "columns=['score', 'pvalue_raw']")
volcano_plot(data, pdf, title="{} ({})".format(self.name, label.title()), colors=colors, log_bins=log_bins)
评论列表
文章目录