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 }); }
public static OverlappedChipSeqComparisonItem Build(OverlappedChipSeqItem item, Dictionary <string, string> fileNameGroup) { var result = new OverlappedChipSeqComparisonItem(); foreach (var csi in item) { var key = fileNameGroup[csi.Filename]; result.AddItem(key, csi); } return(result); }
public static OverlappedChipSeqComparisonItem Build(OverlappedChipSeqItem item, Dictionary<string, string> fileNameGroup) { var result = new OverlappedChipSeqComparisonItem(); foreach (var csi in item) { var key = fileNameGroup[csi.Filename]; result.AddItem(key, csi); } return result; }