Esempio n. 1
0
        public BufferedPositions Purge()
        {
            var copyOfBuffer = BufferedPositions;

            BufferedPositions = BufferedPositions.CreateEmptyBufferedPositions();
            return(copyOfBuffer);
        }
Esempio n. 2
0
        }                                                          // 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();
        }
Esempio n. 3
0
        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);
        }