private CheckpointRunnerAsync GetCheckpointRunner(ILogger logger, IDirectoryLocation outputDirectory, string startCheckpoint, string stopCheckpoint, IDirectoryLocation wholeGenomeFastaFolder) { var parentDirectories = new Dictionary <string, IDirectoryLocation> { { "Output", outputDirectory }, }; // Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta IDirectoryLocation genomeRoot = wholeGenomeFastaFolder?.Parent?.Parent?.Parent?.Parent?.Parent; if (genomeRoot != null) { parentDirectories.Add("Genome", genomeRoot); } JsonConverter[] converters = { new FileSystemLocationConverter(parentDirectories) }; ICheckpointSerializerAsync serializer = new CheckpointJsonSerializerAsync(CheckpointManagerFactory.GetCheckpointFolder(outputDirectory), logger, converters); return(CheckpointRunnerAsync.Create(serializer, logger, outputDirectory, startCheckpoint, stopCheckpoint, true)); }
private CheckpointRunnerAsync GetCheckpointRunner(ILogger logger, IDirectoryLocation outputDirectory, string startCheckpoint, string stopCheckpoint, IDirectoryLocation wholeGenomeFastaFolder) { var parentDirectories = new Dictionary<string, IDirectoryLocation> { {"Output", outputDirectory}, }; // Homo_sapiens/UCSC/hg19/Sequence/WholeGenomeFasta IDirectoryLocation genomeRoot = wholeGenomeFastaFolder?.Parent?.Parent?.Parent?.Parent?.Parent; if (genomeRoot != null) parentDirectories.Add("Genome", genomeRoot); JsonConverter[] converters = { new FileSystemLocationConverter(parentDirectories) }; ICheckpointSerializerAsync serializer = new CheckpointJsonSerializerAsync(CheckpointManagerFactory.GetCheckpointFolder(outputDirectory), logger, converters); return CheckpointRunnerAsync.Create(serializer, logger, outputDirectory, startCheckpoint, stopCheckpoint, true); }