private static (PredictionCacheStaging Staging, Prediction[] Predictions) GetPredictionStaging(ILogger logger,
                                                                                                       string description, IEnumerable <ITranscript> transcripts, IChromosome chromosome, IReadOnlyList <Prediction> oldPredictions,
                                                                                                       PredictionCacheReader reader, Func <ITranscript, int> indexFunc, int numRefSeqs)
        {
            logger.Write($"- retrieving {description} predictions... ");

            var indexSet          = GetUniqueIndices(transcripts, indexFunc);
            var predictionsPerRef = GetPredictions(indexSet, chromosome, numRefSeqs, oldPredictions);
            var staging           = new PredictionCacheStaging(reader.Header, predictionsPerRef);

            logger.WriteLine($"found {indexSet.Count} predictions.");
            return(staging, predictionsPerRef[chromosome.Index]);
Example #2
0
        public static void WritePredictionCaches(PredictionCacheStaging sift, PredictionCacheStaging polyPhen,
                                                 string outputStub, List <string> outputFiles)
        {
            var siftPath     = outputStub + ".sift" + TempCacheExt;
            var polyphenPath = outputStub + ".polyphen" + TempCacheExt;

            outputFiles.Add(siftPath);
            outputFiles.Add(polyphenPath);

            sift?.Write(siftPath);
            polyPhen?.Write(polyphenPath);
        }