Ejemplo n.º 1
0
        LoadDataStores(ILogger logger, FilePaths filePaths)
        {
            logger.Write("- loading datastores... ");
            var loadBenchmark = new Benchmark();

            var dicts = GetSequenceDictionaries(filePaths.GRCh38.ReferencePath, ExternalFiles.AssemblyFile37.FilePath, ExternalFiles.AssemblyFile38.FilePath);

            var geneInfoData = GeneInfoData.Create(ExternalFiles.GeneInfoFile.FilePath);
            var dataStore37  = AssemblyDataStore.Create("GRCh37", logger, filePaths.GRCh37, dicts.RefNameToChromosome, dicts.Accession37, true);
            var dataStore38  = AssemblyDataStore.Create("GRCh38", logger, filePaths.GRCh38, dicts.RefNameToChromosome, dicts.Accession38, false);
            var hgnc         = Hgnc.Create(ExternalFiles.HgncFile.FilePath, dicts.RefNameToChromosome);

            logger.WriteLine($"{Benchmark.ToHumanReadable(loadBenchmark.GetElapsedTime())}");

            return(geneInfoData, dataStore37, dataStore38, hgnc);
        }
Ejemplo n.º 2
0
        LoadDataStores(FilePaths filePaths)
        {
            Logger.Write("- loading datastores... ");
            var loadBenchmark = new Benchmark();

            var(_, refNameToChromosome, _) = SequenceHelper.GetDictionaries(filePaths.GRCh38.ReferencePath);

            var geneInfoData = GeneInfoData.Create(ExternalFiles.GeneInfoFile.FilePath);
            var dataStore37  = AssemblyDataStore.Create("GRCh37", filePaths.GRCh37, refNameToChromosome, true);
            var dataStore38  = AssemblyDataStore.Create("GRCh38", filePaths.GRCh38, refNameToChromosome, false);
            var hgnc         = Hgnc.Create(ExternalFiles.HgncFile.FilePath, refNameToChromosome);

            Logger.WriteLine($"{Benchmark.ToHumanReadable(loadBenchmark.GetElapsedTime())}");

            return(geneInfoData, dataStore37, dataStore38, hgnc);
        }
Ejemplo n.º 3
0
        private static FilePaths GetFilePaths(string jsonPath)
        {
            var builder = new ConfigurationBuilder();

            builder.AddJsonFile(jsonPath);

            var configuration = builder.Build();

            var filePaths = new FilePaths();

            configuration.Bind(filePaths);

            UpdatePaths(filePaths.GRCh37);
            UpdatePaths(filePaths.GRCh38);

            CheckPaths(filePaths.GRCh37);
            CheckPaths(filePaths.GRCh38);

            return(filePaths);
        }