/// <summary> /// Step 1: Building k-mers from sequence reads /// Step 2: Build de bruijn graph for input set of k-mers. /// Sets the _assemblerGraph field. /// </summary> protected virtual void CreateGraph() { Graph = new DeBruijnGraph(this.kmerLength); Graph.Build(this.sequenceReads); }
/// <summary> /// Validate graph generated using DeBruijnGraph.CreateGraph() with kmers /// </summary> /// <param name="nodeName">xml node name used for different testcases</param> internal void ValidateDeBruijnGraphBuild(string nodeName) { string filePath = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.FilePathNode); string kmerLength = utilityObj.xmlUtil.GetTextValue(nodeName, Constants.KmerLengthNode); // Get the input reads and build kmers IEnumerable<ISequence> sequenceReads = null; using (FastAParser parser = new FastAParser(filePath)) { sequenceReads = parser.Parse(); this.KmerLength = int.Parse(kmerLength, (IFormatProvider)null); this.SequenceReads.Clear(); this.SetSequenceReads(sequenceReads.ToList()); DeBruijnGraph graph = new DeBruijnGraph(this.KmerLength); graph.Build(this.SequenceReads); ValidateGraph(graph, nodeName); } ApplicationLog.WriteLine(@"Padena BVT : DeBruijnGraph Build() validation for Padena step2 completed successfully"); }