public BufferedPositions Purge() { var copyOfBuffer = BufferedPositions; BufferedPositions = BufferedPositions.CreateEmptyBufferedPositions(); return(copyOfBuffer); }
} // used to find overlap genes for now public PositionBuffer(ICodonInfoProvider codonInfoProvider, IIntervalForest <IGene> geneIntervalForest) { CodonInfoProvider = codonInfoProvider; GeneIntervalForest = geneIntervalForest; CurrentChromosome = new EmptyChromosome(string.Empty); BufferedPositions = BufferedPositions.CreateEmptyBufferedPositions(); }
public BufferedPositions AddPosition(ISimplePosition simplePosition) { bool recomposable = IsRecomposable(simplePosition); bool isPositionWithinRange = !simplePosition.Chromosome.IsEmpty() && PositionWithinRange(simplePosition); if (isPositionWithinRange) { BufferedPositions.SimplePositions.Add(simplePosition); BufferedPositions.Recomposable.Add(recomposable); if (recomposable) { UpdateFunctionBlockRanges(simplePosition); } return(BufferedPositions.CreateEmptyBufferedPositions()); } var copyOfBuffer = BufferedPositions; ResetBuffer(simplePosition, recomposable); return(copyOfBuffer); }