Example #1
0
        private static AnnotationResources GetAnnotationResources()
        {
            var annotationResources = new AnnotationResources(_refSequencePath, _inputCachePrefix, SupplementaryAnnotationDirectories, null, _pluginDirectory, _disableRecomposition, _forceMitochondrialAnnotation);

            if (SupplementaryAnnotationDirectories.Count == 0)
            {
                return(annotationResources);
            }

            using (var preloadVcfStream = GZipUtilities.GetAppropriateStream(
                       new PersistentStream(PersistentStreamUtils.GetReadStream(_vcfPath),
                                            ConnectUtilities.GetFileConnectFunc(_vcfPath), 0)))
            {
                annotationResources.GetVariantPositions(preloadVcfStream, null);
            }
            return(annotationResources);
        }
Example #2
0
        public void Connect_success_with_enough_retries()
        {
            var connector = GetMockConnector();

            Assert.NotNull(ConnectUtilities.ConnectWithRetries(connector.ConnectorFunc, 0, 4));
        }
Example #3
0
        public void Connect_failed_due_to_too_few_retries()
        {
            var connector = GetMockConnector();

            Assert.Throws <IOException>(() => ConnectUtilities.ConnectWithRetries(connector.ConnectorFunc, 0, 2));
        }