/// <summary> /// Refine layout in the delta alignments. /// </summary> public void GenerateConsensus() { TimeSpan timeSpan = new TimeSpan(); Stopwatch runAlgorithm = new Stopwatch(); runAlgorithm.Restart(); FileInfo inputFileinfo = new FileInfo(this.FilePath[1]); long inputFileLength = inputFileinfo.Length; inputFileinfo = null; runAlgorithm.Stop(); if (this.Verbose) { Output.WriteLine(OutputLevel.Verbose); Output.WriteLine(OutputLevel.Verbose, "Processed Query FastA file: {0}", Path.GetFullPath(this.FilePath[1])); Output.WriteLine(OutputLevel.Verbose, " Read/Processing time : {0}", runAlgorithm.Elapsed); Output.WriteLine(OutputLevel.Verbose, " File Size : {0}", inputFileLength); } inputFileinfo = new FileInfo(this.FilePath[0]); inputFileLength = inputFileinfo.Length; inputFileinfo = null; runAlgorithm.Restart(); using (DeltaAlignmentCollection deltaCollection = new DeltaAlignmentCollection(this.FilePath[0], this.FilePath[1])) { runAlgorithm.Stop(); if (this.Verbose) { Output.WriteLine(OutputLevel.Verbose); Output.WriteLine(OutputLevel.Verbose, "Processed DeltaAlignment file: {0}", Path.GetFullPath(this.FilePath[0])); Output.WriteLine(OutputLevel.Verbose, " Read/Processing time : {0}", runAlgorithm.Elapsed); Output.WriteLine(OutputLevel.Verbose, " File Size : {0}", inputFileLength); } runAlgorithm.Restart(); IEnumerable <ISequence> consensus = ConsensusGeneration.GenerateConsensus(deltaCollection); runAlgorithm.Stop(); timeSpan = timeSpan.Add(runAlgorithm.Elapsed); runAlgorithm.Restart(); this.WriteSequences(consensus); runAlgorithm.Stop(); } if (this.Verbose) { Output.WriteLine(OutputLevel.Verbose, "Compute time: {0}", timeSpan); Output.WriteLine(OutputLevel.Verbose, "Write() time: {0}", runAlgorithm.Elapsed); } }
/// <summary> /// Refine layout in the delta alignments. /// </summary> public void GenerateConsensus() { TimeSpan timeSpan = new TimeSpan(); Stopwatch runAlgorithm = new Stopwatch(); FileInfo inputFileinfo = new FileInfo(this.FilePath); long inputFileLength = inputFileinfo.Length; inputFileinfo = null; runAlgorithm.Restart(); DeltaAlignmentParser parser = new DeltaAlignmentParser(this.FilePath); IList <DeltaAlignment> deltas = parser.Parse(); runAlgorithm.Stop(); if (this.Verbose) { Console.WriteLine(); Console.WriteLine(" Processed DeltaAlignment file: {0}", Path.GetFullPath(this.FilePath)); Console.WriteLine(" Read/Processing time: {0}", runAlgorithm.Elapsed); Console.WriteLine(" File Size : {0}", inputFileLength); } runAlgorithm.Restart(); IEnumerable <ISequence> consensus = ConsensusGeneration.GenerateConsensus(deltas); runAlgorithm.Stop(); timeSpan = timeSpan.Add(runAlgorithm.Elapsed); runAlgorithm.Restart(); this.WriteSequences(consensus); runAlgorithm.Stop(); if (this.Verbose) { Console.WriteLine(" Compute time: {0}", timeSpan); Console.WriteLine(" Write() time: {0}", runAlgorithm.Elapsed); } }