Skip to content

Commit

Permalink
Merge branch 'develop' into TASK-7097
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfeSanahuja committed Oct 17, 2024
2 parents c53a2e7 + d8116e9 commit af4146d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,9 @@ public void tearDown() throws Exception {
}

@Test
public void creationTest() {
public void creationTest() throws IOException {
PedigreeGraph pedigreeGraph = family.getPedigreeGraph();
assertTrue(pedigreeGraph.getBase64().startsWith("iVBORw0KGgoAAAANSUhEUgAAAeA"));
assertTrue(pedigreeGraph.getBase64().endsWith("AIDB6Bwfs3Rj5UIf81hI8AAAAASUVORK5CYII="));
assertEquals(runAndGetPedigreeImageB64(family), pedigreeGraph.getBase64());
}

@Test
Expand All @@ -130,7 +129,7 @@ public void twoMemberFamilyTest() throws CatalogException {
}

@Test
public void threeMemberNoDisorderFamilyTest() throws CatalogException {
public void threeMemberNoDisorderFamilyTest() throws CatalogException, IOException {
FamilyUpdateParams updateParams = new FamilyUpdateParams();

QueryOptions queryOptions = new QueryOptions()
Expand All @@ -140,33 +139,30 @@ public void threeMemberNoDisorderFamilyTest() throws CatalogException {
.first();

PedigreeGraph pedigreeGraph = updatedFamily.getPedigreeGraph();
assertTrue(pedigreeGraph.getBase64().startsWith("iVBORw0KGgoAAAANSUhEUgAAAeAAAAH"));
assertTrue(pedigreeGraph.getBase64().endsWith("2WENFPAsd1MAAAAASUVORK5CYII="));
assertEquals(runAndGetPedigreeImageB64(updatedFamily), pedigreeGraph.getBase64());
}

@Test
public void threeGenerationFamilyTest() throws CatalogException {
public void threeGenerationFamilyTest() throws CatalogException, IOException {
Family threeGenFamily = createThreeGenerationFamily("Cos-Cos", true).first();
PedigreeGraph pedigreeGraph = threeGenFamily.getPedigreeGraph();
assertTrue(pedigreeGraph.getBase64().startsWith("iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgCA"));
assertTrue(pedigreeGraph.getBase64().endsWith("h9S2DROnwXOvwAAAABJRU5ErkJggg=="));
assertEquals(runAndGetPedigreeImageB64(threeGenFamily), pedigreeGraph.getBase64());
}

@Test
public void threeGenerationFamilyWithoutDisorderTest() throws CatalogException {
public void threeGenerationFamilyWithoutDisorderTest() throws CatalogException, IOException {
Family threeGenFamily = createThreeGenerationFamily("Hello-Hello", false).first();
PedigreeGraph pedigreeGraph = threeGenFamily.getPedigreeGraph();
assertTrue(pedigreeGraph.getBase64().startsWith("iVBORw0KGgoAAAANSUhEUgAAAeAAAAHgC"));
assertTrue(pedigreeGraph.getBase64().endsWith("wNJj9EVvh8HVQAAAABJRU5ErkJggg=="));
assertEquals(runAndGetPedigreeImageB64(threeGenFamily), pedigreeGraph.getBase64());
}

@Test
public void test2Member2GenerationFamilyTest() throws CatalogException {
public void test2Member2GenerationFamilyTest() throws CatalogException, IOException {
Family family = create2Member2GenerationDummyFamily("Colo-Colo", "father222-sample", "child2222-sample").first();

PedigreeGraph pedigreeGraph = family.getPedigreeGraph();
assertTrue(pedigreeGraph.getBase64().startsWith("iVBORw0KGgoAAAANSUhEUgAAA"));
assertTrue(pedigreeGraph.getBase64().endsWith("qkAAAAASUVORK5CYII="));

assertEquals(runAndGetPedigreeImageB64(family), pedigreeGraph.getBase64());
}

@Test
Expand Down Expand Up @@ -205,9 +201,6 @@ public void testPedigreeGraphAnalysis() throws ToolException, IOException {
false, sessionIdUser);

String b64Image = PedigreeGraphUtils.getB64Image(outDir);
MatcherAssert.assertThat(b64Image, CoreMatchers.startsWith("iVBORw0KGgoAAAANSUhEUgAAAeAAAAHg"));
MatcherAssert.assertThat(b64Image, CoreMatchers.endsWith("s3Rj5UIf81hI8AAAAASUVORK5CYII="));

assertEquals(family.getPedigreeGraph().getBase64(), b64Image);
}

Expand Down Expand Up @@ -477,4 +470,12 @@ private static DataResult<Family> create2Member2GenerationDummyFamily(String fam

return familyOpenCGAResult;
}


public String runAndGetPedigreeImageB64(Family family) throws IOException {
Path scratchDir = Paths.get(opencga.createTmpOutdir());
PedigreeGraph pedigreeGraph = PedigreeGraphUtils.getPedigreeGraph(family, opencga.getOpencgaHome(), scratchDir);
return pedigreeGraph.getBase64();

}
}
1 change: 0 additions & 1 deletion opencga-core/src/main/resources/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ analysis:
k8s.nodeSelector:
agentpool: jobs
kubernetes.io/os: linux
kubernetes.io/role: agent
# FOR ACI:
# k8s.requests:
# cpu: 2
Expand Down
15 changes: 7 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,13 @@
</modules>

<properties>
<pyopencga.version>3.3.0</pyopencga.version>
<opencgar.version>3.3.0</opencgar.version>
<cellbase.version>6.3.0</cellbase.version>
<biodata.version>3.3.0</biodata.version>
<java-common-libs.version>5.3.0</java-common-libs.version>
<iva.version>3.3.0</iva.version>

<oskar.version>0.2.0</oskar.version>
<pyopencga.version>4.0.0_dev</pyopencga.version>
<opencgar.version>4.0.0_dev</opencgar.version>
<cellbase.version>7.0.0-SNAPSHOT</cellbase.version>
<biodata.version>4.0.0-SNAPSHOT</biodata.version>
<java-common-libs.version>6.0.0-SNAPSHOT</java-common-libs.version>
<iva.version>4.0.0-SNAPSHOT</iva.version>
<oskar.version>0.2.0</oskar.version>

<jackson.version>2.14.3</jackson.version>
<jersey.version>2.30.1</jersey.version>
Expand Down

0 comments on commit af4146d

Please sign in to comment.