Esempio n. 1
0
        public void FillCombinedDictionary(Dictionary <string, string> fileNameAndHeadertoUniqueGroupName)
        {
            foreach (KeyValuePair <string, double> kvp in Log2NormalizedSampleValues)
            {
                string uniqueGroupNameKey = FileLocation + kvp.Key;
                CombinedLog2NormalizedSampleValues.Add(fileNameAndHeadertoUniqueGroupName[uniqueGroupNameKey], kvp.Value);
                CombinedMeanNormalizedSampleValues.Add(fileNameAndHeadertoUniqueGroupName[uniqueGroupNameKey], MeanNormalizedSampleValues[kvp.Key]);
            }

            foreach (KeyValuePair <string, string> kvp in HeadersToPrintDict)
            {
                List <string> addList = new List <string>();
                addList.Add(kvp.Value);
                CombinedHeadersToPrintSampleValues.Add(kvp.Key, addList);
            }
        }
Esempio n. 2
0
        public void AddQuantEntry(QuantEntry addQuantEntry, Dictionary <string, string> fileNameAndHeadertoUniqueGroupName)
        {
            //Make a combined dictionary for Log2Normalized Values
            foreach (KeyValuePair <string, double> kvp in addQuantEntry.Log2NormalizedSampleValues)
            {
                string uniqueGroupNameKey = addQuantEntry.FileLocation + kvp.Key;
                CombinedLog2NormalizedSampleValues.Add(fileNameAndHeadertoUniqueGroupName[uniqueGroupNameKey], kvp.Value);
            }

            //Make a combined dictionary for Mean normalized Values
            foreach (KeyValuePair <string, double> kvp in addQuantEntry.MeanNormalizedSampleValues)
            {
                string uniqueGroupNameKey = addQuantEntry.FileLocation + kvp.Key;
                CombinedMeanNormalizedSampleValues.Add(fileNameAndHeadertoUniqueGroupName[uniqueGroupNameKey], kvp.Value);
            }

            //Add to the headers to print list - it will print out values from each file if they are not the same.
            foreach (KeyValuePair <string, string> kvp in addQuantEntry.HeadersToPrintDict)
            {
                List <string> outList = null;
                if (CombinedHeadersToPrintSampleValues.TryGetValue(kvp.Key, out outList))
                {
                    if (!outList.Contains(kvp.Value))
                    {
                        outList.Add(kvp.Value);
                    }
                }
                else
                {
                    List <string> addList = new List <string>();
                    addList.Add(kvp.Value);
                    CombinedHeadersToPrintSampleValues.Add(kvp.Key, addList);
                }
            }

            //Populate the Unique Header to Group Number Dictionary that will be used for Grouping the Quant Data
            foreach (KeyValuePair <string, string> uniqueGroupNameToNumber in addQuantEntry.UniqueHeaderToGroupString)
            {
                string outInt = null;
                if (!UniqueHeaderToGroupString.TryGetValue(uniqueGroupNameToNumber.Key, out outInt))
                {
                    UniqueHeaderToGroupString.Add(uniqueGroupNameToNumber.Key, uniqueGroupNameToNumber.Value);
                }
            }
        }