Beispiel #1
0
        public void Process_WithTwoReadingsWithSameNameButDifferentReadingDataNames_SendsOneDataPointToSubscribersWithTwoReadingDataValues()
        {
            IList <FeatureStatistics> passedDataPoints = null;

            ReadingPublisher.Subscribe(GetSubscriber((dataPoints) =>
            {
                passedDataPoints = dataPoints;
            }));
            ReadingPublisher.PublishReading(new Reading {
                FeatureName = "DataPointName", Data = new Int32ReadingData(1)
                {
                    Name = "Number"
                }
            });
            ReadingPublisher.PublishReading(new Reading {
                FeatureName = "DataPointName", Data = new Int32ReadingData(1)
                {
                    Name = "Error"
                }
            });

            ReadingPublisher.Start(100, false);
            ReadingPublisher.Process();

            FeatureStatistics dataPoint = passedDataPoints.First();

            Assert.That(dataPoint.Readings.Count, Is.EqualTo(2));
            Assert.That(dataPoint.Readings.First().Name, Is.EqualTo("Number"));
            Assert.That(dataPoint.Readings.Last().Name, Is.EqualTo("Error"));
        }
Beispiel #2
0
        public void Merge(ImportDataStore originalDataStore, ImportDataStore mergedDataStore,
                          FeatureStatistics statistics)
        {
            var transcriptDict = GetMergedTranscripts(originalDataStore);

            mergedDataStore.Transcripts.AddRange(transcriptDict.Values.ToList());
            statistics.Increment(mergedDataStore.Transcripts.Count, originalDataStore.Transcripts.Count);
        }
Beispiel #3
0
        /// <summary>
        /// constructor
        /// </summary>
        public VepCacheParser(TranscriptDataSource ds)
        {
            ImportDataStore.TranscriptSource = ds;

            _uniqueDataStore    = new ImportDataStore();
            _nonUniquedataStore = new ImportDataStore();
            _tempDataStore      = new ImportDataStore();

            _regulatoryStatistics = new FeatureStatistics("Regulatory");
            _transcriptStatistics = new FeatureStatistics("Transcripts");
            _geneStatistics       = new FeatureStatistics("Genes");
            _intronStatistics     = new FeatureStatistics("Introns");
            _exonStatistics       = new FeatureStatistics("Exons");
            _mirnaStatistics      = new FeatureStatistics("miRNAs");
            _siftStatistics       = new FeatureStatistics("SIFT matrices");
            _polyphenStatistics   = new FeatureStatistics("PolyPhen matrices");
            _cdnaStatistics       = new FeatureStatistics("cDNA seqs");
            _peptideStatistics    = new FeatureStatistics("Peptide seqs");
        }
        public void Merge(ImportDataStore originalDataStore, ImportDataStore mergedDataStore, FeatureStatistics statistics)
        {
            var regulatoryDict = GetMergedRegulatoryRegions(originalDataStore);

            mergedDataStore.RegulatoryFeatures.AddRange(regulatoryDict.Values.ToList());
            statistics.Increment(mergedDataStore.RegulatoryFeatures.Count, originalDataStore.RegulatoryFeatures.Count);
        }