public visHierar(HClusterNode hnode, string name, string measureName, Dictionary <string, string> labels) { InitializeComponent(); buffer = new Bitmap(pictureBox1.Width, pictureBox1.Height); drawH = new DrawHierarchical(hnode, measureName, labels, buffer, true); drawH.horizontalView = true; winName = name; this.Text = name; int[] tab = new int[4]; tab[0] = 0; tab[1] = 85; tab[2] = 170; tab[3] = 255; for (int i = 0; i < tab.Length; i++) { for (int j = 0; j < tab.Length; j++) { for (int n = 0; n < tab.Length; n++) { colorMap.Add(Color.FromArgb(tab[i], tab[j], tab[n])); } } } vecColor = labels; drawH.SetColors(); }
public visHierar(HClusterNode hnode, string name, string measureName, Dictionary <string, string> labels) { InitializeComponent(); root = hnode; buffer = new Bitmap(pictureBox1.Width, pictureBox1.Height); drawH = new DrawHierarchical(hnode, measureName, labels, buffer, true); drawH.horizontalView = true; winName = name; this.Text = name; vecColor = labels; InitVisHier(); }
public visHierar(ClusterOutput outp, string name, string measureName, Dictionary <string, string> labels) { InitializeComponent(); root = outp.hNode; profilesColorMap = outp.profilesColor; buffer = new Bitmap(pictureBox1.Width, pictureBox1.Height); drawH = new DrawHierarchical(root, measureName, labels, buffer, true); drawH.horizontalView = true; winName = name; this.Text = name; vecColor = labels; InitVisHier(); }
public HeatMap(HClusterNode upperNode, HClusterNode leftNode, Dictionary <string, string> labels, string measure, string intervalsFile) { upperNode.ClearColors(Color.Black); leftNode.ClearColors(Color.Black); this.upperNode = auxUpper = upperNode; this.leftNode = auxLeft = leftNode; List <KeyValuePair <string, List <int> > > colOmicsProfiles; rowOmicsProfiles = OmicsProfile.ReadOmicsProfile(/*"omics_Omics_profile"+"_"+*/ intervalsFile); colOmicsProfiles = OmicsProfile.ReadOmicsProfile(/*"omics_Omics_profile"+"_"+*/ intervalsFile + "_transpose"); omicsProfiles = new Dictionary <string, Dictionary <string, int> >(); for (int i = 0; i < rowOmicsProfiles.Count; i++) { if (!omicsProfiles.ContainsKey(rowOmicsProfiles[i].Key)) { omicsProfiles.Add(rowOmicsProfiles[i].Key, new Dictionary <string, int>()); } for (int j = 0; j < colOmicsProfiles.Count; j++) { if (!omicsProfiles[rowOmicsProfiles[i].Key].ContainsKey(colOmicsProfiles[j].Key)) { omicsProfiles[rowOmicsProfiles[i].Key].Add(colOmicsProfiles[j].Key, rowOmicsProfiles[i].Value[j]); } } } colorMap = DrawHierarchical.PrepareColorMap(); ReadOmicsIntervals(intervalsFile); InitializeComponent(); upperBitMap = new Bitmap(pictureBox2.Width, pictureBox2.Height); leftBitMap = new Bitmap(pictureBox3.Width, pictureBox3.Height); upper = new DrawHierarchical(upperNode, measure, labels, upperBitMap, true); //upper.viewType = true; left = new DrawHierarchical(leftNode, measure, labels, leftBitMap, false); //left.viewType = true; foreach (var item in rowOmicsProfiles) { foreach (var v in item.Value) { if (!distV.ContainsKey(v)) { distV.Add(v, 0); } } } pictureBox2.Refresh(); }