plot_M_vs_U(data_containers_or_path=None, meth=None, unmeth=None, poobah=None, noob=True, silent=False, verbose=False, plot=True, compare=False, return_fig=False, palette=None, cutoff_line=True)¶
plot methylated vs unmethylated probe intensities
- PATH to csv files processed using methylprep
- these have “noob_meth” and “noob_unmeth” columns per sample file this function can use. if you want it to processed data uncorrected data. (If there is a poobah_values.pkl file in this PATH, it will use the file to color code points)
- data_containers = run_pipeline(data_dir = ‘somepath’,
- save_uncorrected=True, sample_sheet_filepath=’samplesheet.csv’)
you can also recreate the list of datacontainers using methylcheck.load(<filepath>,’meth’)
- (meth and unmeth)
- if you chose process –all you can load the raw intensities like this, and pass them in: meth = pd.read_pickle(‘meth_values.pkl’) unmeth = pd.read_pickle(‘unmeth_values.pkl’) THIS will run the fastest.
- filepath: You may supply the file path to the p-value detection dataframe. If supplied, it will color code points on the plot. False: set poobah to False to suppress this coloring. None (default): if there is a poobah_values.pkl file in your path, it will use it.
- optional params:
noob: use noob-corrected meth/unmeth values verbose: additional messages plot: if True (default), shows a plot. if False, this function returns the median values per sample of meth and unmeth probes. return_fig: (False default), if True (and plot is true), returns the figure object instead of showing it. compare:if the processed data contains both noob and uncorrected values, it will plot both in different colors the compare option will not work with using the ‘meth’ and ‘unmeth’ inputs, only with path or data_containers.
- cutoff_line: True will draw a diagonal line on plots.
- the cutoff line is based on the X-Y scale of the plot, which depends on the range of intensity values in your data set.
- doesn’t return both types of data if using compare and not plotting doesn’t give good error message for compare