public static int Main(string[] args) { var ops = new Dictionary <string, TopLevelOption> { ["createSA"] = new TopLevelOption("create Nirvana supplementary annotation database", MergeIntermediateTsvs.Run), ["createTSV"] = new TopLevelOption("create intermediate tsv file for supplementary annotation", CreateIntermediateTsvsMain.Run), ["createOmimTsv"] = new TopLevelOption("create omim tsv file", CreateOmimTsvMain.Run), ["geneScoresTsv"] = new TopLevelOption("create gene scores tsv file", GeneScoresMain.Run), ["extractMiniSA"] = new TopLevelOption("extracts mini SA", ExtractMiniSaMain.Run), ["extractMiniXml"] = new TopLevelOption("extracts mini SA", ExtractMiniXmlMain.Run), ["createGnomadTsv"] = new TopLevelOption("create gnomAD tsv file", CreateGnomadTsvMain.Run), ["createTopMedTsv"] = new TopLevelOption("create TOPMed tsv file", CreateTopMedTsvMain.Run), ["createCosmicSvs"] = new TopLevelOption("create COSMIC SV tsv files", ExtractCosmicSvsMain.Run), ["remapWithDbsnp"] = new TopLevelOption("remap a VCF file given source and destination rsID mappings", DbSnpRemapperMain.Run), }; var exitCode = new TopLevelAppBuilder(args, ops) .Parse() .ShowBanner(Constants.Authors) .ShowHelpMenu("Utilities focused on supplementary annotation") .ShowErrors() .Execute(); return((int)exitCode); }
public void Parse_Nominal() { var exitCode = new TopLevelAppBuilder(new[] { "combine", "dummy" }, _ops) .Parse() .ShowBanner("banner") .ShowHelpMenu("help") .ShowErrors() .Execute(); Assert.Equal(ExitCodes.Success, exitCode); }
public static int Main(string[] args) { var ops = new Dictionary <string, TopLevelOption> { ["clinvar"] = new TopLevelOption("create ClinVar database", ClinVarMain.Run), ["cosmic"] = new TopLevelOption("create COSMIC database", CreateCosmicDb.Main.Run), ["ClinGen"] = new TopLevelOption("create ClinGen database", MakeClinGenDb.Main.Run), ["CustomVar"] = new TopLevelOption("create custom variant annotation database", Custom.VariantMain.Run), ["CustomGene"] = new TopLevelOption("create custom gene annotation database", Custom.GeneMain.Run), ["OneKGenSvVcfToBed"] = new TopLevelOption("convert 1000 Genomes structural variants VCF file into a BED-like file", OneKGenSvDb.VcfToBed.Run), ["OneKGenSv"] = new TopLevelOption("create 1000 Genomes structural variants database", OneKGenSvDb.Create.Run), ["OneKGen"] = new TopLevelOption("create 1000 Genome small variants database", CreateOneKgDb.Main.Run), ["RefMinor"] = new TopLevelOption("create Reference Minor database from 1000 Genome ", RefMinorDb.Main.Run), ["ancestralAllele"] = new TopLevelOption("create Ancestral allele database from 1000Genomes data", MakeAaDb.Main.Run), ["dbsnp"] = new TopLevelOption("create dbSNP database", CreateDbsnpDb.Main.Run), ["globalMinor"] = new TopLevelOption("create global minor allele database", CreateGlobalAllelesDb.Main.Run), ["Dgv"] = new TopLevelOption("create DGV database", makeDgvDb.Main.Run), ["Omim"] = new TopLevelOption("create OMIM database", Omim.Main.Run), ["downloadOmim"] = new TopLevelOption("download OMIM database", Omim.Downloader.Run), ["ExacScores"] = new TopLevelOption("create ExAC gene scores database", ExacScores.Main.Run), ["extractMiniSA"] = new TopLevelOption("extracts mini SA", ExtractMiniSaMain.Run), ["extractMiniXml"] = new TopLevelOption("extracts mini XML (ClinVar)", ExtractMiniXmlMain.Run), ["gnomad"] = new TopLevelOption("create gnomAD database", GnomadSnvMain.Run), ["gnomad-lcr"] = new TopLevelOption("create gnomAD low complexity region database", LcrRegionsMain.Run), ["gnomadGeneScores"] = new TopLevelOption("create gnomAD gene scores database", GnomadGenesMain.Run), ["TopMed"] = new TopLevelOption("create TOPMed database", CreateTopMedDb.Main.Run), ["PhyloP"] = new TopLevelOption("create PhyloP database", PhyloP.Main.Run), ["CosmicSv"] = new TopLevelOption("create COSMIC SV tsv files", ExtractCosmicSvsMain.Run), ["remapWithDbsnp"] = new TopLevelOption("remap a VCF file given source and destination rsID mappings", DbSnpRemapperMain.Run), ["filterSpliceNetTsv"] = new TopLevelOption("filter SpliceNet predictions", SpliceNetPredictionFilterMain.Run), ["mitomapVarDb"] = new TopLevelOption("create MITOMAP small variants database", SmallVarDb.Run), ["mitomapSvDb"] = new TopLevelOption("create MITOMAP structural variants database", StructVarDb.Run), ["spliceAi"] = new TopLevelOption("create SpliceAI database", SpliceAiDb.Run), ["primateAi"] = new TopLevelOption("create PrimateAI database", PrimateAiDb.Run), ["dosageMapRegions"] = new TopLevelOption("create dosage map regions", DosageMapRegions.Run), ["dosageSensitivity"] = new TopLevelOption("create dosage sensitivity database", DosageSensitivity.Run), ["diseaseValidity"] = new TopLevelOption("create disease validity database", GeneDiseaseValidity.Run), ["MitoHet"] = new TopLevelOption("create mitochondrial Heteroplasmy database", MitoHeteroplasmyDb.Run), ["Revel"] = new TopLevelOption("create REVEL database", Revel.Create.Run), ["index"] = new TopLevelOption("edit an index file", UpdateIndex.Run), ["concat"] = new TopLevelOption("merge multiple NSA files for the same data source having non-overlapping regions", NsaConcatenator.NsaConcatenator.Run), ["AaCon"] = new TopLevelOption("create AA conservation database", AAConservation.AaConservationMain.Run) }; var exitCode = new TopLevelAppBuilder(args, ops) .Parse() .ShowBanner(Constants.Authors) .ShowHelpMenu("Utilities focused on supplementary annotation") .ShowErrors() .Execute(); return((int)exitCode); }
public void Parse_ShowHelpMenu() { var validator = new TopLevelAppBuilder(null, _ops).Parse(); Assert.True(validator.Data.ShowHelpMenu); var exitCode = validator .ShowBanner("banner") .ShowHelpMenu("help") .ShowErrors() .Execute(); Assert.Equal(ExitCodes.MissingCommandLineOption, exitCode); }
public void Parse_UnsupportedOption() { var validator = new TopLevelAppBuilder(new[] { "--if", "-" }, _ops).Parse(); Assert.True(validator.Data.Errors.Count > 0); var exitCode = validator .ShowBanner("banner") .ShowHelpMenu("help") .ShowErrors() .Execute(); Assert.Equal(ExitCodes.UnknownCommandLineOption, exitCode); }
private static int Main(string[] args) { var ops = new Dictionary <string, TopLevelOption> { ["create"] = new TopLevelOption("creates a full reference file", CreateReferenceMain.Run), ["substring"] = new TopLevelOption("creates a reference substring file", CreateSubstringMain.Run), ["testseq"] = new TopLevelOption("creates a TestSeq_reference.dat file", CreateTestSeqMain.Run) }; var exitCode = new TopLevelAppBuilder(args, ops) .Parse() .ShowBanner(Constants.Authors) .ShowHelpMenu("Utilities focused on creating the reference files") .ShowErrors() .Execute(); return((int)exitCode); }
public static int Main(string[] args) { var ops = new Dictionary <string, TopLevelOption> { ["clinvar"] = new TopLevelOption("create ClinVar database", CreateClinvarDb.Main.Run), ["cosmic"] = new TopLevelOption("create COSMIC database", CreateCosmicDb.Main.Run), ["ClinGen"] = new TopLevelOption("create ClinGen database", MakeClinGenDb.Main.Run), ["Custom"] = new TopLevelOption("create custom annotation database", Custom.Main.Run), ["OneKGenSv"] = new TopLevelOption("create 1000 Genomes structural variants database", MakeOnekSvDb.Main.Run), ["OneKGen"] = new TopLevelOption("create 1000 Genome small variants database", CreateOneKgDb.Main.Run), ["RefMinor"] = new TopLevelOption("create Reference Minor database from 1000 Genome ", RefMinorDb.Main.Run), ["ancestralAllele"] = new TopLevelOption("create Ancestral allele database from 1000Genomes data", MakeAaDb.Main.Run), ["Dbsnp"] = new TopLevelOption("create dbSNP database", CreateDbsnpDb.Main.Run), ["globalMinor"] = new TopLevelOption("create global minor allele database", CreateGlobalAllelesDb.Main.Run), ["Dgv"] = new TopLevelOption("create DGV database", makeDgvDb.Main.Run), ["Omim"] = new TopLevelOption("create OMIM database", Omim.Main.Run), ["ExacScores"] = new TopLevelOption("create ExAC gene scores database", ExacScores.Main.Run), ["extractMiniSA"] = new TopLevelOption("extracts mini SA", ExtractMiniSaMain.Run), ["extractMiniXml"] = new TopLevelOption("extracts mini XML (ClinVar)", ExtractMiniXmlMain.Run), ["Gnomad"] = new TopLevelOption("create gnomAD database", CreateGnomadDb.Main.Run), ["GnomadGeneScores"] = new TopLevelOption("create gnomAD gene scores database", GnomadGenesMain.Run), ["TopMed"] = new TopLevelOption("create TOPMed database", CreateTopMedDb.Main.Run), ["PhyloP"] = new TopLevelOption("create PhyloP database", PhyloP.Main.Run), ["CosmicSv"] = new TopLevelOption("create COSMIC SV tsv files", ExtractCosmicSvsMain.Run), ["remapWithDbsnp"] = new TopLevelOption("remap a VCF file given source and destination rsID mappings", DbSnpRemapperMain.Run), ["filterSpliceNetTsv"] = new TopLevelOption("filter SpliceNet predictions", SpliceNetPredictionFilterMain.Run), ["mitomapVarDb"] = new TopLevelOption("create MITOMAP small variants database", SmallVarDb.Run), ["mitomapSvDb"] = new TopLevelOption("create MITOMAP structural variants database", StructVarDb.Run), ["spliceAi"] = new TopLevelOption("create SpliceAI database", SpliceAiDb.Run), ["dosageSensitivity"] = new TopLevelOption("create dosage sensitivity database", DosageSensitivity.Run) }; var exitCode = new TopLevelAppBuilder(args, ops) .Parse() .ShowBanner(Constants.Authors) .ShowHelpMenu("Utilities focused on supplementary annotation") .ShowErrors() .Execute(); return((int)exitCode); }
private static int Main(string[] args) { var ops = new Dictionary <string, TopLevelOption> { ["combine"] = new TopLevelOption("combine cache directories", CombineCacheDirectoriesMain.Run), ["create"] = new TopLevelOption("create Nirvana cache files", CreateNirvanaDatabaseMain.Run), ["download"] = new TopLevelOption("downloads required files", DownloadMain.Run), ["extract"] = new TopLevelOption("extracts transcripts", ExtractTranscriptsMain.Run), ["gene"] = new TopLevelOption("updates the universal gene archive", UniversalGeneArchiveMain.Run), ["gff"] = new TopLevelOption("export transcripts to GFF", CreateGffMain.Run), ["header"] = new TopLevelOption("displays the header information", HeaderMain.Run), ["parse"] = new TopLevelOption("parses the VEP cache files", ParseVepCacheDirectoryMain.Run), ["rgff"] = new TopLevelOption("export regulatory regions to GFF", CreateRegulatoryGffMain.Run) }; var exitCode = new TopLevelAppBuilder(args, ops) .Parse() .ShowBanner(Constants.Authors) .ShowHelpMenu("Utilities focused on querying the cache directory") .ShowErrors() .Execute(); return((int)exitCode); }