Exemplo n.º 1
0
        public override IEnumerable <string> Process()
        {
            var result = new List <string>();

            if (File.Exists(options.CountFile))
            {
                Progress.SetMessage("Reading count table from " + options.CountFile + " ...");
            }

            var map = options.GetCountMap();
            var dic = new Dictionary <int, CountItem>();

            DoProcess(m => m.SeqString.Length >= options.MinimumReadLength, map, options.OutputFile, dic);

            using (var sw = new StreamWriter(options.SummaryFile))
            {
                sw.WriteLine("Length\tReadsNotNTA\tReadsCC\tReadsCCA\tReadsCCAA");
                var lens = dic.Keys.OrderBy(m => m).ToArray();
                foreach (var len in lens)
                {
                    sw.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}", len, dic[len].notNTA, dic[len].CC, dic[len].CCA, dic[len].CCAA);
                }
            }

            Progress.End();

            return(result);
        }