コード例 #1
0
ファイル: DataFileManager.cs プロジェクト: YuJiang01/Nirvana
        public void LoadReference(ushort refIndex, Action clearDataSources, PerformanceMetrics metrics = null)
        {
            if (refIndex == _currentReferenceIndex)
            {
                return;
            }

            if (refIndex == ChromosomeRenamer.UnknownReferenceIndex)
            {
                clearDataSources();
                return;
            }

            var referenceData = new ReferenceNameData
            {
                ReferenceIndex       = refIndex,
                UcscReferenceName    = _compressedSequence.Renamer.UcscReferenceNames[refIndex],
                EnsemblReferenceName = _compressedSequence.Renamer.EnsemblReferenceNames[refIndex]
            };

            metrics?.StartReference(referenceData.UcscReferenceName);
            _compressedSequenceReader.GetCompressedSequence(referenceData.EnsemblReferenceName);
            metrics?.StopReference();
            _currentReferenceIndex = refIndex;

            Changed?.Invoke(this, new NewReferenceEventArgs(referenceData));
        }
コード例 #2
0
 /// <summary>
 /// constructor
 /// </summary>
 public NewReferenceEventArgs(ReferenceNameData data)
 {
     Data = data;
 }