public void AnnotationSourceConstructor() { var saPath = Resources.TopPath("DirectoryIntegrity"); var cacheStub = Resources.CacheGRCh37("ENST00000579787_chr1_Ensembl84"); var customAnnoPath = Resources.TopPath("DirectoryIntegrity"); var customIntervalsPath = Resources.TopPath("DirectoryIntegrity"); var conservationScoreReader = new PhylopReader(saPath); var transcriptStream = ResourceUtilities.GetReadStream(cacheStub + ".ndb"); var siftStream = ResourceUtilities.GetReadStream(cacheStub + ".sift"); var polyPhenStream = ResourceUtilities.GetReadStream(cacheStub + ".polyphen"); var referenceStream = ResourceUtilities.GetReadStream(cacheStub + ".bases"); var streams = new AnnotationSourceStreams(transcriptStream, siftStream, polyPhenStream, referenceStream); var customAnnotationProvider = new CustomAnnotationProvider(new[] { customAnnoPath }); var customIntervalProvider = new CustomIntervalProvider(new[] { customIntervalsPath }); var saProvider = new SupplementaryAnnotationProvider(saPath); var annotationSource = new NirvanaAnnotationSource(streams, saProvider, conservationScoreReader, customAnnotationProvider, customIntervalProvider, null); Assert.NotNull(annotationSource); }
/// <summary> /// constructor /// </summary> public UnifiedJsonWriter(StreamWriter writer, string creationTime, string vepDataVersion, IEnumerable <IDataSourceVersion> iDataSourceVersions, string genomeAssembly, string[] sampleNames) { _writer = writer; _writer.NewLine = "\n"; var dataSourceVersions = iDataSourceVersions?.Select(iDataSourceVersion => iDataSourceVersion as DataSourceVersion).ToList(); // write the header _writer.Write(UnifiedJson.GetHeader(NirvanaAnnotationSource.GetVersion(), creationTime, genomeAssembly, JsonCommon.SchemaVersion, vepDataVersion, dataSourceVersions, sampleNames)); }
public IAnnotationSource CreateAnnotationSource(IAnnotatorInfo annotatorInfo, IAnnotatorPaths annotatorPaths) { var conservationScoreReader = new PhylopReader(annotatorPaths.SupplementaryAnnotation); var transcriptStream = FileUtilities.GetReadStream(CacheConstants.TranscriptPath(annotatorPaths.CachePrefix)); var siftStream = FileUtilities.GetReadStream(CacheConstants.SiftPath(annotatorPaths.CachePrefix)); var polyPhenStream = FileUtilities.GetReadStream(CacheConstants.PolyPhenPath(annotatorPaths.CachePrefix)); var referenceStream = FileUtilities.GetReadStream(annotatorPaths.CompressedReference); var streams = new AnnotationSourceStreams(transcriptStream, siftStream, polyPhenStream, referenceStream); var caProvider = annotatorPaths.CustomAnnotation.Any() ? new CustomAnnotationProvider(annotatorPaths.CustomAnnotation) : null; var ciProvider = annotatorPaths.CustomIntervals.Any() ? new CustomIntervalProvider(annotatorPaths.CustomIntervals) : null; var saProvider = annotatorPaths.SupplementaryAnnotation != null ? new SupplementaryAnnotationProvider(annotatorPaths.SupplementaryAnnotation) : null; //adding the saPath because OMIM needs it var annotationSource = new NirvanaAnnotationSource(streams, saProvider, conservationScoreReader, caProvider, ciProvider, annotatorPaths.SupplementaryAnnotation); if (annotatorInfo.BooleanArguments.Contains(AnnotatorInfoCommon.ReferenceNoCall)) { annotationSource.EnableReferenceNoCalls(annotatorInfo.BooleanArguments.Contains(AnnotatorInfoCommon.TranscriptOnlyRefNoCall)); } if (annotatorInfo.BooleanArguments.Contains(AnnotatorInfoCommon.EnableMitochondrialAnnotation)) { annotationSource.EnableMitochondrialAnnotation(); } if (annotatorInfo.BooleanArguments.Contains(AnnotatorInfoCommon.ReportAllSvOverlappingTranscripts)) { annotationSource.EnableReportAllSvOverlappingTranscripts(); } if (annotatorInfo.BooleanArguments.Contains(AnnotatorInfoCommon.EnableLoftee)) { annotationSource.AddPlugin(new Loftee()); } return(annotationSource); }