public static void MakeMethySpatialDepthCov() { try { Dictionary <string, List <List <double> > > tdict = Genome.GetAllSingleSpatialDepthCoverages(); UpdateLog("Making Distributions..", true); MultiBayes mBayes = new MultiBayes(tdict, ModelDisplayType.Line, MultiBayesLayout.Stacked); PlotModel model = new PlotModel { Title = "Global spatial distribution of read-depth across element(s)" }; LinearAxis axX = new LinearAxis(AxisPosition.Bottom, 0, mBayes.GetXPercentLimit(1) + 1, "Normalised division of element"); LinearAxis axY = new LinearAxis(AxisPosition.Left, 0, mBayes.GetYPercentLimit(1), "Odds ratio of read coverage-depth for element vs background"); model.TitlePadding = 10; axX.AxisTitleDistance = 10; axY.AxisTitleDistance = 10; model.Axes.Add(axX); model.Axes.Add(axY); mBayes.AddToModel(model); model.IsLegendVisible = true; MainWindow.InsertGraph(GraphWindow.Meth, model, mBayes); UpdateLog("Made a spatial-depth-coverage graph in the Methylation tab.", true); ProgramState.MadeMethGraph = true; } catch (Exception e) { ShowMessageWindow(e.Message, true); } }
public static void MakeMultiBayesRankGraph(Dictionary <string, List <List <double> > > data, GraphWindow grWind, string xLab, string yLab, string title, RSplitContainer <List <double> > rsc, bool mergeOld) { try { UpdateLog("Making Odds ratios..", true); MultiBayes.FlipFullDictionary(data); MultiBayes mBayes = new MultiBayes(data, ModelDisplayType.Line, MultiBayesLayout.Stacked); PlotModel model = new PlotModel { Title = title }; LinearAxis axX = new LinearAxis(AxisPosition.Bottom, 0, mBayes.GetXPercentLimit(1) + 1, xLab); LinearAxis axY = new LinearAxis(AxisPosition.Left, 0, mBayes.GetYPercentLimit(1), yLab); model.TitlePadding = 10; axX.AxisTitleDistance = 10; axY.AxisTitleDistance = 10; model.Axes.Add(axX); model.Axes.Add(axY); mBayes.AddToModel(model); if (mergeOld && RSPToMergeSeries != null) { foreach (Series sr in RSPToMergeSeries) { model.Series.Add(sr); } } else { if (RSPToMergeSeries != null) { RSPToMergeSeries.Clear(); } } RSPToMergeSeries.AddRange(mBayes.GetNextSeries(title.Split(' ')[0])); model.IsLegendVisible = true; MainWindow.InsertGraph(grWind, model, mBayes); MainWindow.SetRSplitDoubleContainer(rsc); UpdateLog("Made a Spatial Rank/Split graph...", true); ProgramState.MadeGlobalGraph = true; } catch (Exception e) { ShowMessageWindow(e.Message, true); } }