-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #429 from tcezard/EVA3496_merge_split_only_job
EVA-3496 - Add new job for running only the MERGE and SPLIT
- Loading branch information
Showing
6 changed files
with
132 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
.../clustering/configuration/batch/jobs/ResolveMergeThenSplitCandidatesJobConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright 2020 EMBL - European Bioinformatics Institute | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package uk.ac.ebi.eva.accession.clustering.configuration.batch.jobs; | ||
|
||
import org.springframework.batch.core.Job; | ||
import org.springframework.batch.core.Step; | ||
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing; | ||
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; | ||
import org.springframework.batch.core.launch.support.RunIdIncrementer; | ||
import org.springframework.beans.factory.annotation.Qualifier; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import static uk.ac.ebi.eva.accession.clustering.configuration.BeanNames.CLEAR_RS_MERGE_AND_SPLIT_CANDIDATES_STEP; | ||
import static uk.ac.ebi.eva.accession.clustering.configuration.BeanNames.RESOLVE_MERGE_THEN_SPLIT_CANDIDATE_JOB; | ||
import static uk.ac.ebi.eva.accession.clustering.configuration.BeanNames.PROCESS_RS_MERGE_CANDIDATES_STEP; | ||
import static uk.ac.ebi.eva.accession.clustering.configuration.BeanNames.PROCESS_RS_SPLIT_CANDIDATES_STEP; | ||
|
||
@Configuration | ||
@EnableBatchProcessing | ||
public class ResolveMergeThenSplitCandidatesJobConfiguration { | ||
// Should be run after split or merge candidates have been processed in the step @see PROCESS_REMAPPED_VARIANTS_WITH_RS_JOB | ||
// This job should only be run in parallel across instances | ||
@Bean(RESOLVE_MERGE_THEN_SPLIT_CANDIDATE_JOB) | ||
public Job clusteringFromMongoJob( | ||
@Qualifier(PROCESS_RS_MERGE_CANDIDATES_STEP) Step processRSMergeCandidatesStep, | ||
@Qualifier(PROCESS_RS_SPLIT_CANDIDATES_STEP) Step processRSSplitCandidatesStep, | ||
@Qualifier(CLEAR_RS_MERGE_AND_SPLIT_CANDIDATES_STEP) Step clearRSMergeAndSplitCandidatesStep, | ||
JobBuilderFactory jobBuilderFactory) { | ||
return jobBuilderFactory.get(RESOLVE_MERGE_THEN_SPLIT_CANDIDATE_JOB) | ||
.incrementer(new RunIdIncrementer()) | ||
.start(processRSMergeCandidatesStep) | ||
.next(processRSSplitCandidatesStep) | ||
.next(clearRSMergeAndSplitCandidatesStep) | ||
.build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
...n-clustering/src/test/resources/test-data/submittedVariantOperationEntityMongoReader.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"submittedVariantOperationEntity": [ | ||
{ | ||
"_id" : "RSMC_GCA_000000001.1_HASH", | ||
"eventType" : "RS_MERGE_CANDIDATES", | ||
"accession" : NumberLong("2222222222"), | ||
"reason" : "RS mismatch with 1111111111", | ||
"inactiveObjects" : [ | ||
{ | ||
"seq" : "GCA_000000001.1", | ||
"tax" : 3000, | ||
"study" : "PRJEB00001", | ||
"contig" : "CM000001.2", | ||
"start" : NumberLong(3000), | ||
"ref" : "C", | ||
"alt" : "T", | ||
"rs" : NumberLong("2222222222"), | ||
"evidence" : true, | ||
"asmMatch" : true, | ||
"allelesMatch" : true, | ||
"validated" : false, | ||
"hashedMessage" : "45BD2A41D4C295DF0A85A54D6CB72C2BBABB0C7D", | ||
"accession" : NumberLong(1000000000), | ||
"version" : 1, | ||
"createdDate" : ISODate("2022-04-26T08:33:26.562Z") | ||
}, | ||
{ | ||
"seq" : "GCA_000000001.1", | ||
"tax" : 3000, | ||
"study" : "PRJEB00002", | ||
"contig" : "CM000001.2", | ||
"start" : NumberLong(3000), | ||
"ref" : "C", | ||
"alt" : "T", | ||
"rs" : NumberLong("2222222222"), | ||
"remappedFrom" : "GCA_000003205.6", | ||
"remappedDate" : ISODate("2021-08-12T02:53:48.966Z"), | ||
"remappingId" : "E076D09482EF2504D3168AABB13BC94172A92C27", | ||
"hashedMessage" : "C2C9770AE529AFD445CC15458CBA2C71F7A82DB8", | ||
"accession" : NumberLong(1000000001), | ||
"version" : 1, | ||
"createdDate" : ISODate("2014-11-10T14:58:00Z") | ||
}, | ||
{ | ||
"seq" : "GCA_000000001.1", | ||
"tax" : 3000, | ||
"study" : "PRJEB38336", | ||
"contig" : "CM000001.2", | ||
"start" : NumberLong(3000), | ||
"ref" : "C", | ||
"alt" : "T", | ||
"rs" : NumberLong("1111111111"), | ||
"evidence" : true, | ||
"asmMatch" : true, | ||
"allelesMatch" : true, | ||
"validated" : false, | ||
"remappedFrom" : "GCA_000000000.1", | ||
"remappedDate" : ISODate("2021-08-11T22:03:44.689Z"), | ||
"remappingId" : "778BEEA595920286BA9CC9ECF13442A69F9DA73B", | ||
"hashedMessage" : "581F717670A07D8D032E234212E0D74599943D44", | ||
"accession" : NumberLong(1000000002), | ||
"version" : 1, | ||
"createdDate" : ISODate("2020-11-26T22:56:39.129Z") | ||
} | ||
], | ||
"createdDate" : ISODate("2023-05-07T04:52:59.110Z") | ||
} | ||
] | ||
} |