Skip to content

Commit

Permalink
test: fix JUnit tests, #TASK-5282, #TASK-5278
Browse files Browse the repository at this point in the history
On branch TASK-5278
Changes to be committed:
	modified:   opencga-analysis/src/test/java/org/opencb/opencga/analysis/variant/VariantAnalysisTest.java
  • Loading branch information
jtarraga committed Jun 13, 2024
1 parent 5644023 commit 8da3dea
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@
import org.opencb.opencga.core.models.cohort.CohortUpdateParams;
import org.opencb.opencga.core.models.common.AnnotationSet;
import org.opencb.opencga.core.models.family.Family;
import org.opencb.opencga.core.models.family.FamilyQualityControl;
import org.opencb.opencga.core.models.family.FamilyUpdateParams;
import org.opencb.opencga.core.models.file.File;
import org.opencb.opencga.core.models.individual.Individual;
import org.opencb.opencga.core.models.individual.IndividualInternal;
Expand Down Expand Up @@ -1081,6 +1083,10 @@ public void testFamilyQcDefaultHaploidCall() throws Exception {
params.setFamily("f1");
params.setRelatednessMaf("1000G:ALL>0.1");

// Reset family QC
catalogManager.getFamilyManager().update(STUDY, params.getFamily(), new FamilyUpdateParams()
.setQualityControl(new FamilyQualityControl()), new QueryOptions(), token);

toolRunner.execute(FamilyQcAnalysis.class, params, new ObjectMap(ParamConstants.STUDY_PARAM, STUDY), outDir, null, token);

OpenCGAResult<Family> results = catalogManager.getFamilyManager().search(STUDY, new Query("id", "f1"), QueryOptions.empty(), token);
Expand All @@ -1100,6 +1106,10 @@ public void testFamilyQcHaploidCall() throws Exception {
params.setRelatednessMaf("1000G:ALL>0.1");
params.setHaploidCallMode(HAPLOID_CALL_MODE_HAPLOID_VALUE);

// Reset family QC
catalogManager.getFamilyManager().update(STUDY, params.getFamily(), new FamilyUpdateParams()
.setQualityControl(new FamilyQualityControl()), new QueryOptions(), token);

toolRunner.execute(FamilyQcAnalysis.class, params, new ObjectMap(ParamConstants.STUDY_PARAM, STUDY), outDir, null, token);

OpenCGAResult<Family> results = catalogManager.getFamilyManager().search(STUDY, new Query("id", "f1"), QueryOptions.empty(), token);
Expand All @@ -1119,6 +1129,10 @@ public void testFamilyQcMissingHaploidCall() throws Exception {
params.setRelatednessMaf("1000G:ALL>0.1");
params.setHaploidCallMode(HAPLOID_CALL_MODE_MISSING_VALUE);

// Reset family QC
catalogManager.getFamilyManager().update(STUDY, params.getFamily(), new FamilyUpdateParams()
.setQualityControl(new FamilyQualityControl()), new QueryOptions(), token);

toolRunner.execute(FamilyQcAnalysis.class, params, new ObjectMap(ParamConstants.STUDY_PARAM, STUDY), outDir, null, token);

OpenCGAResult<Family> results = catalogManager.getFamilyManager().search(STUDY, new Query("id", "f1"), QueryOptions.empty(), token);
Expand All @@ -1138,6 +1152,10 @@ public void testFamilyQcReferenceHaploidCall() throws Exception {
params.setRelatednessMaf("1000G:ALL>0.1");
params.setHaploidCallMode(HAPLOID_CALL_MODE_REF_VALUE);

// Reset family QC
catalogManager.getFamilyManager().update(STUDY, params.getFamily(), new FamilyUpdateParams()
.setQualityControl(new FamilyQualityControl()), new QueryOptions(), token);

toolRunner.execute(FamilyQcAnalysis.class, params, new ObjectMap(ParamConstants.STUDY_PARAM, STUDY), outDir, null, token);

OpenCGAResult<Family> results = catalogManager.getFamilyManager().search(STUDY, new Query("id", "f1"), QueryOptions.empty(), token);
Expand Down

0 comments on commit 8da3dea

Please sign in to comment.