Beispiel #1
0
        public void GetItems()
        {
            using (var reader = new ClinGenReader(new StreamReader(GetStream()), ChromosomeUtilities.RefNameToChromosome))
            {
                var items = reader.GetItems().ToList();

                Assert.Equal(4, items.Count);
                Assert.Equal("\"chromosome\":\"1\",\"begin\":564405,\"end\":8597804,\"variantType\":\"copy_number_loss\",\"id\":\"nsv530705\",\"clinicalInterpretation\":\"pathogenic\",\"phenotypes\":[\"Developmental delay AND/OR other significant developmental or morphological phenotypes\"],\"observedLosses\":1", items[0].GetJsonString());
            }
        }
Beispiel #2
0
        private static ExitCodes ProgramExecution()
        {
            var    referenceProvider = new ReferenceSequenceProvider(FileUtilities.GetReadStream(_compressedReference));
            var    version           = DataSourceVersionReader.GetSourceVersion(_inputFileName + ".version");
            string outFileName       = $"{version.Name}_{version.Version}";

            using (var clinGenReader = new ClinGenReader(GZipUtilities.GetAppropriateStreamReader(_inputFileName), referenceProvider.RefNameToChromosome))
                using (var nsaStream = FileUtilities.GetCreateStream(Path.Combine(_outputDirectory, outFileName + SaCommon.SiFileSuffix)))
                    using (var nsiWriter = new NsiWriter(new ExtendedBinaryWriter(nsaStream), version, referenceProvider.Assembly, SaCommon.ClinGenTag, ReportFor.StructuralVariants, SaCommon.SchemaVersion))
                    {
                        nsiWriter.Write(clinGenReader.GetItems());
                    }

            return(ExitCodes.Success);
        }