예제 #1
0
        public override IEnumerable <string> Process(string fileName)
        {
            var curResult = ChipSeqItemUtils.ReadItems(sourceFiles);
            var curComp   = new Dictionary <string, List <OverlappedChipSeqComparisonItem> >();

            foreach (var res in curResult)
            {
                curComp[res.Key] = (from r in res.Value
                                    select OverlappedChipSeqComparisonItem.Build(r, filenameGroup)).ToList();
            }

            foreach (var g in curComp.Values)
            {
                foreach (var r in g)
                {
                    foreach (var item in r.ItemMap.Values)
                    {
                        item.CalculateFields();
                        item.InitializeDetails(filenameMap);
                    }
                }
            }

            var olist = (from g in curComp.Values
                         from r in g
                         select r).ToList();

            new OverlappedChipSeqComparisonItemFormat().WriteToFile(fileName, olist);

            return(new string[] { fileName });
        }
예제 #2
0
        public override IEnumerable <string> Process(string fileName)
        {
            var curResult = ChipSeqItemUtils.ReadItems(sourceFiles);

            foreach (var g in curResult.Values)
            {
                g.ForEach(m =>
                {
                    m.CalculateFields();
                    m.InitializeDetails(filenameMap);
                });
                g.Sort((m1, m2) => m2.Ratio.CompareTo(m1.Ratio));
            }

            var ocsList = (from g in curResult.Values
                           orderby g.Max(m => m.Ratio) descending
                           from o in g
                           select o).ToList();

            new OverlappedChipSeqItemFormat().WriteToFile(fileName, ocsList);

            return(new string[] { fileName });
        }