Skip to content

Commit

Permalink
Merge pull request #2361 from opencb/TASK-5190
Browse files Browse the repository at this point in the history
 TASK-5190 Fix Exomiser parameter "analysisMode"
  • Loading branch information
jtarraga authored Dec 1, 2023
2 parents 38869a6 + 9b0d947 commit 6120687
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,23 @@ public void run() throws ToolException {
Path openCgaHome = getOpencgaHomePath();
Path exomiserDataPath = getAnalysisDataPath(ExomiserWrapperAnalysis.ID);

// And copy the application.properties
// Copy the analysis
try {
FileUtils.copyFile(openCgaHome.resolve("analysis/exomiser/" + EXOMISER_ANALYSIS_TEMPLATE_FILENAME).toFile(),
getOutDir().resolve(EXOMISER_ANALYSIS_TEMPLATE_FILENAME).toFile());
} catch (IOException e) {
throw new ToolException("Error copying Exomiser analysis file", e);
}

// Copy the application.properties
try {
FileUtils.copyFile(openCgaHome.resolve("analysis/exomiser/" + EXOMISER_PROPERTIES_TEMPLATE_FILENAME).toFile(),
getOutDir().resolve(EXOMISER_PROPERTIES_TEMPLATE_FILENAME).toFile());
} catch (IOException e) {
throw new ToolException("Error copying Exomiser properties file", e);
}

// And copy the output options
// Copy the output options
try {
FileUtils.copyFile(openCgaHome.resolve("analysis/exomiser/" + EXOMISER_OUTPUT_OPTIONS_FILENAME).toFile(),
getOutDir().resolve(EXOMISER_OUTPUT_OPTIONS_FILENAME).toFile());
Expand All @@ -174,7 +182,7 @@ public void run() throws ToolException {
appendCommand("", sb);

// Append input file params
// sb.append(" --analysis /jobdir/").append(EXOMISER_ANALYSIS_TEMPLATE_FILENAME)
sb.append(" --analysis /jobdir/").append(EXOMISER_ANALYSIS_TEMPLATE_FILENAME);
sb.append(" --sample /jobdir/").append(sampleFile.getName());
if (pedigreeFile != null && pedigreeFile.exists()) {
sb.append(" --ped /jobdir/").append(pedigreeFile.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeThat;

@Category(MediumTests.class)
Expand Down Expand Up @@ -93,7 +94,7 @@ public void singleExomiserAnalysis() throws IOException, CatalogException, ToolE
clinicalAnalysis = clinicalTest.catalogManager.getClinicalAnalysisManager()
.get(clinicalTest.studyFqn, clinicalTest.CA_ID2, QueryOptions.empty(), clinicalTest.token).first();
assertEquals(1, clinicalAnalysis.getSecondaryInterpretations().size());
assertEquals(22, clinicalAnalysis.getSecondaryInterpretations().get(0).getPrimaryFindings().size());
assertTrue(clinicalAnalysis.getSecondaryInterpretations().get(0).getPrimaryFindings().size() > 0);
}

@Test
Expand All @@ -119,7 +120,7 @@ public void familyExomiserAnalysis() throws IOException, CatalogException, ToolE
clinicalAnalysis = clinicalTest.catalogManager.getClinicalAnalysisManager()
.get(clinicalTest.studyFqn, clinicalTest.CA_ID3, QueryOptions.empty(), clinicalTest.token).first();
assertEquals(1, clinicalAnalysis.getSecondaryInterpretations().size());
assertEquals(2, clinicalAnalysis.getSecondaryInterpretations().get(0).getPrimaryFindings().size());
assertTrue(clinicalAnalysis.getSecondaryInterpretations().get(0).getPrimaryFindings().size() > 0);
System.out.println("results at out dir = " + outDir.toAbsolutePath());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
Expand Down Expand Up @@ -260,6 +262,14 @@ public Path isolateOpenCGA() throws IOException {
inputStream = new FileInputStream("../opencga-app/app/analysis/pedigree-graph/ped.R");
Files.copy(inputStream, analysisPath.resolve("ped.R"), StandardCopyOption.REPLACE_EXISTING);

// Exomiser analysis files
analysisPath = Files.createDirectories(opencgaHome.resolve("analysis/exomiser")).toAbsolutePath();
List<String> exomiserFiles = Arrays.asList("application.properties", "exomiser-analysis.yml", "output.yml");
for (String exomiserFile : exomiserFiles) {
inputStream = new FileInputStream("../opencga-app/app/analysis/exomiser/" + exomiserFile);
Files.copy(inputStream, analysisPath.resolve(exomiserFile), StandardCopyOption.REPLACE_EXISTING);
}

return opencgaHome;
}

Expand Down
70 changes: 70 additions & 0 deletions opencga-app/app/analysis/exomiser/exomiser-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
analysisMode: PASS_ONLY
inheritanceModes: {
AUTOSOMAL_DOMINANT: 0.1,
AUTOSOMAL_RECESSIVE_HOM_ALT: 0.1,
AUTOSOMAL_RECESSIVE_COMP_HET: 2.0,
X_DOMINANT: 0.1,
X_RECESSIVE_HOM_ALT: 0.1,
X_RECESSIVE_COMP_HET: 2.0,
MITOCHONDRIAL: 0.2
}
frequencySources: [
THOUSAND_GENOMES,
TOPMED,
UK10K,

ESP_AFRICAN_AMERICAN, ESP_EUROPEAN_AMERICAN, ESP_ALL,

EXAC_AFRICAN_INC_AFRICAN_AMERICAN, EXAC_AMERICAN,
EXAC_SOUTH_ASIAN, EXAC_EAST_ASIAN,
EXAC_FINNISH, EXAC_NON_FINNISH_EUROPEAN,
EXAC_OTHER,

GNOMAD_E_AFR,
GNOMAD_E_AMR,
# GNOMAD_E_ASJ,
GNOMAD_E_EAS,
GNOMAD_E_FIN,
GNOMAD_E_NFE,
GNOMAD_E_OTH,
GNOMAD_E_SAS,

GNOMAD_G_AFR,
GNOMAD_G_AMR,
# GNOMAD_G_ASJ,
GNOMAD_G_EAS,
GNOMAD_G_FIN,
GNOMAD_G_NFE,
GNOMAD_G_OTH,
GNOMAD_G_SAS
]
# Possible pathogenicitySources: (POLYPHEN, MUTATION_TASTER, SIFT), (REVEL, MVP), CADD, REMM
# 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 ]
#this is the standard exomiser order.
steps: [
failedVariantFilter: { },
variantEffectFilter: {
remove: [
FIVE_PRIME_UTR_EXON_VARIANT,
FIVE_PRIME_UTR_INTRON_VARIANT,
THREE_PRIME_UTR_EXON_VARIANT,
THREE_PRIME_UTR_INTRON_VARIANT,
NON_CODING_TRANSCRIPT_EXON_VARIANT,
NON_CODING_TRANSCRIPT_INTRON_VARIANT,
CODING_TRANSCRIPT_INTRON_VARIANT,
UPSTREAM_GENE_VARIANT,
DOWNSTREAM_GENE_VARIANT,
INTERGENIC_VARIANT,
REGULATORY_REGION_VARIANT
]
},
frequencyFilter: { maxFrequency: 2.0 },
pathogenicityFilter: { keepNonPathogenic: true },
inheritanceFilter: { },
omimPrioritiser: { },
hiPhivePrioritiser: { }
]

0 comments on commit 6120687

Please sign in to comment.