protected ParsedIntervals <I, S> Parse(string sourceFilePath, ParsedIntervals <I, S> data) { _sourceFilePath = sourceFilePath; _data = data; _data.FilePath = Path.GetFullPath(_sourceFilePath); _data.FileName = Path.GetFileName(_sourceFilePath); _data.FileHashKey = HashFunctions.FNVHashFunction(_data.FilePath); _excessChrs = new List <string>(); _missingChrs = new List <string>(); Messages = new List <string>(); _assemblyData = References.GetGenomeSizes(Assembly); if (!File.Exists(_sourceFilePath)) { throw new FileNotFoundException(string.Format("The file `{0}` does not exist or is inaccessible.", _sourceFilePath)); } Parse(); if (_dropedLinesCount > 0) { Messages.Insert(0, "\t" + _dropedLinesCount.ToString() + " Lines dropped"); } _data.Messages = Messages; if (Assembly != Assemblies.Unknown) { ReadMissingAndExcessChrs(); } _data.Assembly = Assembly; return(_data); }
public Interval(int left, int right, string hashSeed = "") { Left = left; Right = right; unchecked { _hashKey = (int)HashFunctions.FNVHashFunction(left.ToString() + right.ToString() + hashSeed); } }