Skip to content

Commit

Permalink
Merge branch 'release-2.12.x' into TASK-5006
Browse files Browse the repository at this point in the history
  • Loading branch information
juanrizetta committed Nov 20, 2023
2 parents 58a2a76 + 812ccba commit 5412d66
Show file tree
Hide file tree
Showing 199 changed files with 4,362 additions and 1,629 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/manual-deploy-ext-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ jobs:
needs: build
with:
cli: python3 ./build/cloud/docker/docker-build.py push --images ext-tools --tag ${{ inputs.tag }}
secrets: inherit
secrets: inherit

9 changes: 7 additions & 2 deletions .github/workflows/pull-request-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@ name: "Pull Request Merge Workflow"
on:
pull_request:
branches:
- develop
- release-*
- "develop"
- "release-*"
types:
- closed
workflow_dispatch:

jobs:
build:
uses: opencb/java-common-libs/.github/workflows/build-java-app-workflow.yml@develop
with:
maven_opts: -P storage-hadoop,hdp3.1,RClient,opencga-storage-hadoop-deps -Dopencga.war.name=opencga -Dcheckstyle.skip -pl '!:opencga-storage-hadoop-deps-emr6.1,!:opencga-storage-hadoop-deps-hdp2.6'

delete-docker:
uses: opencb/java-common-libs/.github/workflows/delete-docker-hub-workflow.yml@develop
needs: build
with:
cli: python3 ./build/cloud/docker/docker-build.py delete --images base --tag ${{ github.head_ref }}
secrets: inherit

1 change: 1 addition & 0 deletions .github/workflows/test-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,4 @@ jobs:
commit: '${{ github.sha }}'
fail_on_test_failures: true


179 changes: 164 additions & 15 deletions opencga-analysis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.opencb.opencga</groupId>
<artifactId>opencga</artifactId>
<version>2.12.0-SNAPSHOT</version>
<version>2.12.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -42,18 +42,19 @@
<groupId>org.opencb.commons</groupId>
<artifactId>commons-datastore-core</artifactId>
</dependency>

<dependency>
<groupId>org.opencb.opencga</groupId>
<artifactId>opencga-core</artifactId>
</dependency>
<dependency>
<groupId>org.opencb.opencga</groupId>
<artifactId>opencga-catalog</artifactId>
<version>${project.parent.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.opencb.opencga</groupId>
<artifactId>opencga-storage-core</artifactId>
<version>${project.parent.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
Expand All @@ -68,18 +69,9 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<!-- Need dependency for running hadoop tests. -->
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.opencb.opencga</groupId>
<artifactId>${opencga-storage-hadoop-deps.artifactId}</artifactId>
<version>${project.parent.version}</version>
<classifier>shaded</classifier>
<scope>test</scope>
</dependency>
Expand All @@ -106,16 +98,148 @@
<version>${project.parent.version}</version>
<scope>compile</scope>
</dependency>
<!-- RGA test dependencies -->
<dependency>
<groupId>org.opencb.commons</groupId>
<artifactId>commons-lib</artifactId>
</dependency>
<dependency>
<groupId>org.opencb.commons</groupId>
<artifactId>commons-datastore-mongodb</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.opencb.commons</groupId>
<artifactId>commons-datastore-solr</artifactId>
</dependency>
<dependency>
<groupId>org.opencb.biodata</groupId>
<artifactId>biodata-formats</artifactId>
</dependency>
<dependency>
<groupId>org.opencb.biodata</groupId>
<artifactId>biodata-models</artifactId>
</dependency>
<dependency>
<groupId>org.opencb.biodata</groupId>
<artifactId>biodata-tools</artifactId>
</dependency>
<dependency>
<groupId>org.opencb.cellbase</groupId>
<artifactId>cellbase-core</artifactId>
</dependency>
<dependency>
<groupId>org.opencb.cellbase</groupId>
<artifactId>cellbase-client</artifactId>
</dependency>
<dependency>
<groupId>org.opencb.oskar</groupId>
<artifactId>oskar-analysis</artifactId>
</dependency>
<dependency>
<groupId>org.opencb.ga4gh</groupId>
<artifactId>ga4gh</artifactId>
<exclusions>
<exclusion>
<groupId>arg.apache.avro</groupId>
<artifactId>avro-ipc</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Added dependencies -->
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-core</artifactId>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
</dependency>
<dependency>
<groupId>com.github.samtools</groupId>
<artifactId>htsjdk</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-test-framework</artifactId>
</dependency>
<!-- /RGA -->

<!-- TODO Review -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand All @@ -132,6 +256,31 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>analyze</id>
<goals>
<goal>analyze-only</goal>
</goals>
<configuration>
<failOnWarning>true</failOnWarning>
<!-- This plugin is having a weird issue with biodata libraries. It fails if biodata is declared before. -->
<ignoredUsedUndeclaredDependencies>
<ignoredUsedUndeclaredDependency>
com.google.code.findbugs:jsr305:jar:3.0.2
</ignoredUsedUndeclaredDependency>
</ignoredUsedUndeclaredDependencies>
<ignoredUnusedDeclaredDependencies>
<ignoredUnusedDeclaredDependency>*</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ protected void run() throws Exception {
if (family == null || StringUtils.isEmpty(family.getId())) {
continue;
}
List<List<String>> trios = variantStorageManager.getTriosFromFamily(getStudy(), family, true, getToken());
for (List<String> trio : trios) {
String child = trio.get(2);
List<Trio> trios = variantStorageManager.getTriosFromFamily(getStudy(), family, true, getToken());
for (Trio trio : trios) {
String child = trio.getChild();
if (analysisParams.getSample().contains(child)) {
String father = trio.get(0);
String mother = trio.get(1);
String father = trio.getFather();
String mother = trio.getMother();
triosMap.put(child, new Trio(family.getId(),
"-".equals(father) ? null : father,
"-".equals(mother) ? null : mother,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1299,10 +1299,10 @@ public Integer getReleaseFilter(Query query, String sessionId) throws CatalogExc
return release;
}

public List<List<String>> getTriosFromFamily(
public List<Trio> getTriosFromFamily(
String studyFqn, Family family, VariantStorageMetadataManager metadataManager, boolean skipIncompleteFamily, String sessionId)
throws StorageEngineException, CatalogException {
List<List<String>> trios = getTrios(studyFqn, metadataManager, family.getMembers(), sessionId);
List<Trio> trios = getTrios(studyFqn, metadataManager, family.getMembers(), sessionId);
if (trios.size() == 0) {
if (skipIncompleteFamily) {
logger.debug("Skip family '" + family.getId() + "'. ");
Expand All @@ -1313,7 +1313,7 @@ public List<List<String>> getTriosFromFamily(
return trios;
}

public List<List<String>> getTriosFromSamples(
public List<Trio> getTriosFromSamples(
String studyFqn, VariantStorageMetadataManager metadataManager, Collection<String> sampleIds, String token)
throws CatalogException {
OpenCGAResult<Individual> individualResult = catalogManager.getIndividualManager()
Expand All @@ -1330,12 +1330,12 @@ public List<List<String>> getTriosFromSamples(
return getTrios(studyFqn, metadataManager, individualResult.getResults(), token);
}

public List<List<String>> getTrios(
public List<Trio> getTrios(
String studyFqn, VariantStorageMetadataManager metadataManager, List<Individual> membersList, String sessionId)
throws CatalogException {
int studyId = metadataManager.getStudyId(studyFqn);
Map<Long, Individual> membersMap = membersList.stream().collect(Collectors.toMap(Individual::getUid, i -> i));
List<List<String>> trios = new LinkedList<>();
List<Trio> trios = new LinkedList<>();
for (Individual individual : membersList) {
String fatherSample = null;
String motherSample = null;
Expand Down Expand Up @@ -1402,10 +1402,7 @@ public List<List<String>> getTrios(

// Allow one missing parent
if (childSample != null && (fatherSample != null || motherSample != null)) {
trios.add(Arrays.asList(
fatherSample == null ? "-" : fatherSample,
motherSample == null ? "-" : motherSample,
childSample));
trios.add(new Trio(fatherSample, motherSample, childSample));
}
}
return trios;
Expand Down
Loading

0 comments on commit 5412d66

Please sign in to comment.