private static ExitCodes ProgramExecution() { using (var writer = GZipUtilities.GetStreamWriter(_outputFileName)) { string cachePath = CacheConstants.TranscriptPath(_inputPrefix); var sequenceData = SequenceHelper.GetDictionaries(_referencePath); // load the cache Console.Write("- reading {0}... ", Path.GetFileName(cachePath)); var cache = TranscriptCacheHelper.GetCache(cachePath, sequenceData.refIndexToChromosome); Console.WriteLine("found {0:N0} reference sequences. ", cache.RegulatoryRegionIntervalArrays.Length); Console.Write("- writing GFF entries... "); foreach (var intervalArray in cache.RegulatoryRegionIntervalArrays) { if (intervalArray == null) { continue; } foreach (var interval in intervalArray.Array) { WriteRegulatoryFeature(writer, interval.Value); } } Console.WriteLine("finished."); } return(ExitCodes.Success); }
private static ExitCodes ProgramExecution() { string cachePath = CacheConstants.TranscriptPath(_inputPrefix); var(refIndexToChromosome, _, _) = SequenceHelper.GetDictionaries(_compressedReferencePath); var cache = TranscriptCacheHelper.GetCache(cachePath, refIndexToChromosome); var geneToInternalId = InternalGenes.CreateDictionary(cache.Genes); using (var writer = new GffWriter(GZipUtilities.GetStreamWriter(_outputFileName))) { var creator = new GffCreator(writer, geneToInternalId); creator.Create(cache.TranscriptIntervalArrays); } return(ExitCodes.Success); }
private static ExitCodes ProgramExecution() { Source transcriptSource = ParseVepCacheDirectoryMain.GetSource(_transcriptSource); string cachePath = CacheConstants.TranscriptPath(_inputPrefix); IDictionary <ushort, IChromosome> refIndexToChromosome = SequenceHelper.GetDictionaries(_compressedReferencePath).refIndexToChromosome; TranscriptCacheData cache = TranscriptCacheHelper.GetCache(cachePath, refIndexToChromosome); IDictionary <IGene, int> geneToInternalId = InternalGenes.CreateDictionary(cache.Genes); using (var writer = new GffWriter(GZipUtilities.GetStreamWriter(_outputFileName))) { var creator = new GffCreator(writer, geneToInternalId, transcriptSource); creator.Create(cache.TranscriptIntervalArrays); } return(ExitCodes.Success); }