示例#1
0
        /// <summary>
        /// constructor
        /// </summary>
        public MockSupplementaryAnnotationProvider(ISupplementaryAnnotationReader saReader, ChromosomeRenamer renamer)
        {
            if (saReader == null)
            {
                return;
            }
            _saReader = saReader;

            _overlappingSupplementaryIntervals = new List <ISupplementaryInterval>();
            _suppIntervalForest = _saReader.GetIntervalForest(renamer);
        }
示例#2
0
        public void Load(string ucscReferenceName, IChromosomeRenamer renamer)
        {
            if (string.IsNullOrEmpty(_saDir) || ucscReferenceName == _currentUcscReferenceName)
            {
                return;
            }

            var saPath = Path.Combine(_saDir, ucscReferenceName + ".nsa");

            _saReader = File.Exists(saPath) ? new SupplementaryAnnotationReader(saPath) : null;

            _intervalForest = _saReader?.GetIntervalForest(renamer);
            _hasIntervals   = !(_intervalForest is NullIntervalSearch <ISupplementaryInterval>);

            _currentUcscReferenceName = ucscReferenceName;
        }