From 2708652547be0c8af05905823611876aedf783d7 Mon Sep 17 00:00:00 2001 From: Jules Jacobsen Date: Tue, 20 Feb 2024 17:17:59 +0000 Subject: [PATCH] Add geneBlacklistFilter, SPLICE_AI and ALPHA_MISSENSE to example YAML files. Return exit code from exomiser-cli --- exomiser-cli/CHANGELOG.md | 3 +++ .../exomiser/cli/BatchFileReader.java | 6 ++---- .../exomiser/cli/CommandLineJobReader.java | 18 +++++++----------- .../exomiser/cli/CommandLineOptionsParser.java | 4 +--- .../monarchinitiative/exomiser/cli/Main.java | 4 ++-- .../src/main/resources/application.properties | 2 +- .../examples/preset-exome-analysis.yml | 4 ++-- .../examples/preset-genome-analysis.yml | 4 ++-- .../resources/examples/test-analysis-exome.yml | 5 +++-- .../examples/test-analysis-genome.yml | 5 +++-- .../examples/test-analysis-multisample.yml | 5 +++-- .../exomiser/cli/CommandLineJobReaderTest.java | 5 ++--- .../src/test/resources/exome-analysis.yml | 5 +++-- .../test/resources/pfeiffer-analysis-v8-12.yml | 3 ++- .../resources/pfeiffer-job-phenopacket.yml | 3 ++- .../src/test/resources/pfeiffer-job-sample.yml | 3 ++- .../src/test/resources/test-analysis-exome.yml | 3 ++- 17 files changed, 42 insertions(+), 40 deletions(-) diff --git a/exomiser-cli/CHANGELOG.md b/exomiser-cli/CHANGELOG.md index 972e28a3e..724a8a0d0 100644 --- a/exomiser-cli/CHANGELOG.md +++ b/exomiser-cli/CHANGELOG.md @@ -2,7 +2,10 @@ ## 14.0.0 2023-MM-dd +- Minimum Java version is now set to __Java 17__ - Enabled independent update of ClinVar data [#501](https://github.com/exomiser/Exomiser/issues/501) +- Fix for issue [#531](https://github.com/exomiser/Exomiser/issues/531) where the `priorityScoreFilter` and `regulatoryFeatureFilter` pass/fail counts were not displayed in the HTML. +- Fix for issue [#534](https://github.com/exomiser/Exomiser/issues/534) where variant frequency and/or pathogenicity annotations are missing in certain run configurations. ## 13.3.0 2023-10-17 diff --git a/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/BatchFileReader.java b/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/BatchFileReader.java index 855d1d36b..d2ff6c0d6 100644 --- a/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/BatchFileReader.java +++ b/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/BatchFileReader.java @@ -33,8 +33,6 @@ import java.util.function.Predicate; import java.util.stream.Stream; -import static java.util.stream.Collectors.toList; - /** * Reads in Exomiser batch files and returns a list of Paths to the * settings/analysis files. The reader expects a single path per line. @@ -56,7 +54,7 @@ public static List readPathsFromBatchFile(Path batchFile) { .filter(commentLines()) .filter(emptyLines()) .map(line -> Paths.get(line.trim())) - .collect(toList()); + .toList(); } catch (IOException ex) { logger.error("Unable to read batch file {}", batchFile, ex); } @@ -71,7 +69,7 @@ public static List readJobsFromBatchFile(Path batchFile) { .filter(commentLines()) .filter(emptyLines()) .flatMap(line -> commandLineJobReader.readJobs(CommandLineOptionsParser.parse(line.split("\\s+"))).stream()) - .collect(toList()); + .toList(); } catch (IOException ex) { logger.error("Unable to read batch file {}", batchFile, ex); } diff --git a/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/CommandLineJobReader.java b/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/CommandLineJobReader.java index 145bf6ecd..893ca6fb5 100644 --- a/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/CommandLineJobReader.java +++ b/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/CommandLineJobReader.java @@ -70,7 +70,7 @@ public List readJobs(CommandLine commandLine) { if (userOptions.equals(Set.of("analysis-batch"))) { Path analysisBatchFile = Path.of(commandLine.getOptionValue("analysis-batch")); List analysisScripts = BatchFileReader.readPathsFromBatchFile(analysisBatchFile); - return analysisScripts.stream().map(JobReader::readJob).collect(Collectors.toList()); + return analysisScripts.stream().map(JobReader::readJob).toList(); } // new batch option which will parse each line as a cli command if (userOptions.equals(Set.of("batch"))) { @@ -361,16 +361,12 @@ private U tryParseJsonOrYaml(U messageBuilder, Path } private AnalysisProto.Preset parsePreset(String presetValue) { - switch (presetValue.toLowerCase()) { - case "exome": - return AnalysisProto.Preset.EXOME; - case "genome": - return AnalysisProto.Preset.GENOME; - case "phenotype-only": - return AnalysisProto.Preset.PHENOTYPE_ONLY; - default: - throw new IllegalArgumentException("Unrecognised preset option: " + presetValue); - } + return switch (presetValue.toLowerCase()) { + case "exome" -> AnalysisProto.Preset.EXOME; + case "genome" -> AnalysisProto.Preset.GENOME; + case "phenotype-only" -> AnalysisProto.Preset.PHENOTYPE_ONLY; + default -> throw new IllegalArgumentException("Unrecognised preset option: " + presetValue); + }; } private OutputProto.OutputOptions readOutputOptions(Path outputOptionsPath) { diff --git a/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/CommandLineOptionsParser.java b/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/CommandLineOptionsParser.java index 7e498f2d4..1ee45d23f 100644 --- a/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/CommandLineOptionsParser.java +++ b/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/CommandLineOptionsParser.java @@ -28,8 +28,6 @@ import java.nio.file.Paths; import java.util.List; -import static java.util.stream.Collectors.toList; - /** * @author Jules Jacobsen * @since 13.0.0 @@ -226,7 +224,7 @@ protected static List fileDependentOptions() { return options.getOptions().stream() .filter(option -> "file".equals(option.getArgName())) .map(Option::getLongOpt) - .collect(toList()); + .toList(); } public static void printHelp() { diff --git a/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/Main.java b/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/Main.java index 06e473863..bc2abf311 100644 --- a/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/Main.java +++ b/exomiser-cli/src/main/java/org/monarchinitiative/exomiser/cli/Main.java @@ -50,9 +50,9 @@ public static void main(String[] args) { // all ok so far - try launching the app Locale.setDefault(Locale.UK); - SpringApplication.run(Main.class, args).close(); - + int exitCode = SpringApplication.exit(SpringApplication.run(Main.class, args)); logger.info("Exomising finished - Bye!"); + System.exit(exitCode); } } diff --git a/exomiser-cli/src/main/resources/application.properties b/exomiser-cli/src/main/resources/application.properties index b63d1fd64..9d6991c87 100644 --- a/exomiser-cli/src/main/resources/application.properties +++ b/exomiser-cli/src/main/resources/application.properties @@ -62,7 +62,7 @@ exomiser.hg19.data-version=2402 #exomiser.hg38.use-clinvar-white-list=true ### phenotypes ### -exomiser.phenotype.data-version=2109 +exomiser.phenotype.data-version=2402 #exomiser.phenotype.data-directory=${exomiser.data-directory}/${exomiser.phenotype.data-version}_phenotype # String random walk data file #exomiser.phenotype.random-walk-file-name=rw_string_10.mv diff --git a/exomiser-cli/src/main/resources/examples/preset-exome-analysis.yml b/exomiser-cli/src/main/resources/examples/preset-exome-analysis.yml index 30d9ba60b..1fe9189fe 100644 --- a/exomiser-cli/src/main/resources/examples/preset-exome-analysis.yml +++ b/exomiser-cli/src/main/resources/examples/preset-exome-analysis.yml @@ -33,11 +33,11 @@ frequencySources: [ # GNOMAD_G_OTH, GNOMAD_G_SAS ] -# Possible pathogenicitySources: (POLYPHEN, MUTATION_TASTER, SIFT), (REVEL, MVP), CADD, REMM +# Possible pathogenicitySources: (POLYPHEN, MUTATION_TASTER, SIFT), (REVEL, MVP), CADD, REMM, SPLICE_AI, ALPHA_MISSENSE # REMM is trained on non-coding regulatory regions # *WARNING* if you enable CADD or REMM ensure that you have downloaded and installed the CADD/REMM tabix files # and updated their location in the application.properties. Exomiser will not run without this. -pathogenicitySources: [ REVEL, MVP ] +pathogenicitySources: [ REVEL, MVP, SPLICE_AI ] #this is the standard exomiser order. steps: [ failedVariantFilter: { }, diff --git a/exomiser-cli/src/main/resources/examples/preset-genome-analysis.yml b/exomiser-cli/src/main/resources/examples/preset-genome-analysis.yml index 86b0cbca0..403cc4fbb 100644 --- a/exomiser-cli/src/main/resources/examples/preset-genome-analysis.yml +++ b/exomiser-cli/src/main/resources/examples/preset-genome-analysis.yml @@ -33,11 +33,11 @@ frequencySources: [ # GNOMAD_G_OTH, GNOMAD_G_SAS ] -# Possible pathogenicitySources: (POLYPHEN, MUTATION_TASTER, SIFT), (REVEL, MVP), CADD, REMM +# Possible pathogenicitySources: (POLYPHEN, MUTATION_TASTER, SIFT), (REVEL, MVP), CADD, REMM, SPLICE_AI, ALPHA_MISSENSE # REMM is trained on non-coding regulatory regions # *WARNING* if you enable CADD or REMM ensure that you have downloaded and installed the CADD/REMM tabix files # and updated their location in the application.properties. Exomiser will not run without this. -pathogenicitySources: [ REVEL, MVP, REMM ] +pathogenicitySources: [ REVEL, MVP, REMM, SPLICE_AI ] # this is the recommended order for a genome-sized analysis. steps: [ hiPhivePrioritiser: { }, diff --git a/exomiser-cli/src/main/resources/examples/test-analysis-exome.yml b/exomiser-cli/src/main/resources/examples/test-analysis-exome.yml index 9f84e91bc..82fd18e76 100644 --- a/exomiser-cli/src/main/resources/examples/test-analysis-exome.yml +++ b/exomiser-cli/src/main/resources/examples/test-analysis-exome.yml @@ -51,11 +51,11 @@ analysis: # GNOMAD_G_OTH, GNOMAD_G_SAS ] - # Possible pathogenicitySources: (POLYPHEN, MUTATION_TASTER, SIFT), (REVEL, MVP), CADD, REMM + # Possible pathogenicitySources: (POLYPHEN, MUTATION_TASTER, SIFT), (REVEL, MVP), CADD, REMM, SPLICE_AI, ALPHA_MISSENSE # REMM is trained on non-coding regulatory regions # *WARNING* if you enable CADD or REMM ensure that you have downloaded and installed the CADD/REMM tabix files # and updated their location in the application.properties. Exomiser will not run without this. - pathogenicitySources: [ REVEL, MVP ] + pathogenicitySources: [ REVEL, MVP, SPLICE_AI ] # this is the standard exomiser order. # all steps are optional steps: [ @@ -65,6 +65,7 @@ analysis: # or using a BED file - NOTE this should be 0-based, Exomiser otherwise uses 1-based coordinates in line with VCF #intervalFilter: {bed: /full/path/to/bed_file.bed}, #genePanelFilter: {geneSymbols: ['FGFR1','FGFR2']}, + # geneBlacklistFilter: { }, failedVariantFilter: { }, #qualityFilter: {minQuality: 50.0}, variantEffectFilter: { diff --git a/exomiser-cli/src/main/resources/examples/test-analysis-genome.yml b/exomiser-cli/src/main/resources/examples/test-analysis-genome.yml index 524affce3..64b148f8f 100644 --- a/exomiser-cli/src/main/resources/examples/test-analysis-genome.yml +++ b/exomiser-cli/src/main/resources/examples/test-analysis-genome.yml @@ -51,11 +51,11 @@ analysis: # GNOMAD_G_OTH, GNOMAD_G_SAS ] - # Possible pathogenicitySources: (POLYPHEN, MUTATION_TASTER, SIFT), (REVEL, MVP), CADD, REMM + # Possible pathogenicitySources: (POLYPHEN, MUTATION_TASTER, SIFT), (REVEL, MVP), CADD, REMM, SPLICE_AI, ALPHA_MISSENSE # REMM is trained on non-coding regulatory regions # *WARNING* if you enable CADD or REMM ensure that you have downloaded and installed the CADD/REMM tabix files # and updated their location in the application.properties. Exomiser will not run without this. - pathogenicitySources: [ REVEL, MVP, REMM ] + pathogenicitySources: [ REVEL, MVP, REMM, SPLICE_AI ] # this is the recommended order for a genome-sized analysis. # all steps are optional steps: [ @@ -66,6 +66,7 @@ analysis: # 0.501 is a good compromise to select good phenotype matches and the best protein-protein interactions hits from hiPhive priorityScoreFilter: { priorityType: HIPHIVE_PRIORITY, minPriorityScore: 0.501 }, failedVariantFilter: { }, + # geneBlacklistFilter: { }, #intervalFilter: {interval: 'chr10:123256200-123256300'}, # or for multiple intervals: #intervalFilter: {intervals: ['chr10:123256200-123256300', 'chr10:123256290-123256350']}, diff --git a/exomiser-cli/src/main/resources/examples/test-analysis-multisample.yml b/exomiser-cli/src/main/resources/examples/test-analysis-multisample.yml index 62f68f010..4b41df4e9 100644 --- a/exomiser-cli/src/main/resources/examples/test-analysis-multisample.yml +++ b/exomiser-cli/src/main/resources/examples/test-analysis-multisample.yml @@ -50,11 +50,11 @@ analysis: # GNOMAD_G_OTH, GNOMAD_G_SAS ] - # Possible pathogenicitySources: (POLYPHEN, MUTATION_TASTER, SIFT), (REVEL, MVP), CADD, REMM + # Possible pathogenicitySources: (POLYPHEN, MUTATION_TASTER, SIFT), (REVEL, MVP), CADD, REMM, SPLICE_AI, ALPHA_MISSENSE # REMM is trained on non-coding regulatory regions # *WARNING* if you enable CADD or REMM ensure that you have downloaded and installed the CADD/REMM tabix files # and updated their location in the application.properties. Exomiser will not run without this. - pathogenicitySources: [ REVEL, MVP ] + pathogenicitySources: [ REVEL, MVP, SPLICE_AI ] # this is the standard exomiser order. # all steps are optional steps: [ @@ -64,6 +64,7 @@ analysis: # or using a BED file - NOTE this should be 0-based, Exomiser otherwise uses 1-based coordinates in line with VCF #intervalFilter: {bed: /full/path/to/bed_file.bed}, #genePanelFilter: {geneSymbols: ['FGFR1','FGFR2']}, + # geneBlacklistFilter: { }, failedVariantFilter: { }, #qualityFilter: {minQuality: 50.0}, variantEffectFilter: { diff --git a/exomiser-cli/src/test/java/org/monarchinitiative/exomiser/cli/CommandLineJobReaderTest.java b/exomiser-cli/src/test/java/org/monarchinitiative/exomiser/cli/CommandLineJobReaderTest.java index 4f88d44ce..7e96e7b5b 100644 --- a/exomiser-cli/src/test/java/org/monarchinitiative/exomiser/cli/CommandLineJobReaderTest.java +++ b/exomiser-cli/src/test/java/org/monarchinitiative/exomiser/cli/CommandLineJobReaderTest.java @@ -52,8 +52,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.monarchinitiative.exomiser.core.model.pathogenicity.PathogenicitySource.MVP; -import static org.monarchinitiative.exomiser.core.model.pathogenicity.PathogenicitySource.REVEL; +import static org.monarchinitiative.exomiser.core.model.pathogenicity.PathogenicitySource.*; /** * @author Jules Jacobsen @@ -265,7 +264,7 @@ class CommandLineJobReaderTest { // FrequencySource.GNOMAD_G_OTH, FrequencySource.GNOMAD_G_SAS )) - .pathogenicitySources(ImmutableSet.of(REVEL, MVP)) + .pathogenicitySources(ImmutableSet.of(REVEL, MVP, SPLICE_AI)) .addFailedVariantFilter() .addVariantEffectFilter(ImmutableSet.of( FIVE_PRIME_UTR_EXON_VARIANT, diff --git a/exomiser-cli/src/test/resources/exome-analysis.yml b/exomiser-cli/src/test/resources/exome-analysis.yml index 76b7b3c7d..3d961633a 100644 --- a/exomiser-cli/src/test/resources/exome-analysis.yml +++ b/exomiser-cli/src/test/resources/exome-analysis.yml @@ -42,7 +42,7 @@ frequencySources: [ # REMM is trained on non-coding regulatory regions # *WARNING* if you enable CADD or REMM ensure that you have downloaded and installed the CADD/REMM tabix files # and updated their location in the application.properties. Exomiser will not run without this. -pathogenicitySources: [ REVEL, MVP ] +pathogenicitySources: [ REVEL, MVP, SPLICE_AI ] #this is the standard exomiser order. #all steps are optional steps: [ @@ -54,7 +54,8 @@ steps: [ # or using a BED file - NOTE this should be 0-based, Exomiser otherwise uses 1-based coordinates in line with VCF #intervalFilter: {bed: /full/path/to/bed_file.bed}, #genePanelFilter: {geneSymbols: ['FGFR1','FGFR2']}, - failedVariantFilter: { }, + # geneBlacklistFilter: { }, + failedVariantFilter: { }, #qualityFilter: {minQuality: 50.0}, variantEffectFilter: { remove: [ diff --git a/exomiser-cli/src/test/resources/pfeiffer-analysis-v8-12.yml b/exomiser-cli/src/test/resources/pfeiffer-analysis-v8-12.yml index 896646b95..263f2a4f2 100644 --- a/exomiser-cli/src/test/resources/pfeiffer-analysis-v8-12.yml +++ b/exomiser-cli/src/test/resources/pfeiffer-analysis-v8-12.yml @@ -54,7 +54,7 @@ analysis: # REMM is trained on non-coding regulatory regions # *WARNING* if you enable CADD or REMM ensure that you have downloaded and installed the CADD/REMM tabix files # and updated their location in the application.properties. Exomiser will not run without this. - pathogenicitySources: [ REVEL, MVP ] + pathogenicitySources: [ REVEL, MVP, SPLICE_AI ] #this is the standard exomiser order. #all steps are optional steps: [ @@ -66,6 +66,7 @@ analysis: # or using a BED file - NOTE this should be 0-based, Exomiser otherwise uses 1-based coordinates in line with VCF #intervalFilter: {bed: /full/path/to/bed_file.bed}, #genePanelFilter: {geneSymbols: ['FGFR1','FGFR2']}, + # geneBlacklistFilter: { }, failedVariantFilter: { }, #qualityFilter: {minQuality: 50.0}, variantEffectFilter: { diff --git a/exomiser-cli/src/test/resources/pfeiffer-job-phenopacket.yml b/exomiser-cli/src/test/resources/pfeiffer-job-phenopacket.yml index fda3e84e5..9e260b412 100644 --- a/exomiser-cli/src/test/resources/pfeiffer-job-phenopacket.yml +++ b/exomiser-cli/src/test/resources/pfeiffer-job-phenopacket.yml @@ -93,7 +93,7 @@ analysis: # REMM is trained on non-coding regulatory regions # *WARNING* if you enable CADD or REMM ensure that you have downloaded and installed the CADD/REMM tabix files # and updated their location in the application.properties. Exomiser will not run without this. - pathogenicitySources: [ REVEL, MVP ] + pathogenicitySources: [ REVEL, MVP, SPLICE_AI ] #this is the standard exomiser order. #all steps are optional steps: [ @@ -105,6 +105,7 @@ analysis: # or using a BED file - NOTE this should be 0-based, Exomiser otherwise uses 1-based coordinates in line with VCF #intervalFilter: {bed: /full/path/to/bed_file.bed}, #genePanelFilter: {geneSymbols: ['FGFR1','FGFR2']}, + # geneBlacklistFilter: { }, failedVariantFilter: { }, #qualityFilter: {minQuality: 50.0}, variantEffectFilter: { diff --git a/exomiser-cli/src/test/resources/pfeiffer-job-sample.yml b/exomiser-cli/src/test/resources/pfeiffer-job-sample.yml index 8e120f8a8..8cfaa47d9 100644 --- a/exomiser-cli/src/test/resources/pfeiffer-job-sample.yml +++ b/exomiser-cli/src/test/resources/pfeiffer-job-sample.yml @@ -61,7 +61,7 @@ analysis: # REMM is trained on non-coding regulatory regions # *WARNING* if you enable CADD or REMM ensure that you have downloaded and installed the CADD/REMM tabix files # and updated their location in the application.properties. Exomiser will not run without this. - pathogenicitySources: [ REVEL, MVP ] + pathogenicitySources: [ REVEL, MVP, SPLICE_AI ] #this is the standard exomiser order. #all steps are optional steps: [ @@ -73,6 +73,7 @@ analysis: # or using a BED file - NOTE this should be 0-based, Exomiser otherwise uses 1-based coordinates in line with VCF #intervalFilter: {bed: /full/path/to/bed_file.bed}, #genePanelFilter: {geneSymbols: ['FGFR1','FGFR2']}, + # geneBlacklistFilter: { }, failedVariantFilter: { }, #qualityFilter: {minQuality: 50.0}, variantEffectFilter: { diff --git a/exomiser-cli/src/test/resources/test-analysis-exome.yml b/exomiser-cli/src/test/resources/test-analysis-exome.yml index df2366c6e..b7e6c397a 100644 --- a/exomiser-cli/src/test/resources/test-analysis-exome.yml +++ b/exomiser-cli/src/test/resources/test-analysis-exome.yml @@ -55,7 +55,7 @@ analysis: # REMM is trained on non-coding regulatory regions # *WARNING* if you enable CADD or REMM ensure that you have downloaded and installed the CADD/REMM tabix files # and updated their location in the application.properties. Exomiser will not run without this. - pathogenicitySources: [ REVEL, MVP ] + pathogenicitySources: [ REVEL, MVP, SPLICE_AI ] # this is the standard exomiser order. # all steps are optional steps: [ @@ -65,6 +65,7 @@ analysis: # or using a BED file - NOTE this should be 0-based, Exomiser otherwise uses 1-based coordinates in line with VCF #intervalFilter: {bed: /full/path/to/bed_file.bed}, #genePanelFilter: {geneSymbols: ['FGFR1','FGFR2']}, + # geneBlacklistFilter: { }, failedVariantFilter: { }, #qualityFilter: {minQuality: 50.0}, variantEffectFilter: {