-
Notifications
You must be signed in to change notification settings - Fork 98
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 #2016 from opencb/TASK-1070
TASK-1070
- Loading branch information
Showing
34 changed files
with
1,507 additions
and
76 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
27 changes: 27 additions & 0 deletions
27
...c/main/java/org/opencb/opencga/analysis/variant/operations/VariantPruneOperationTool.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,27 @@ | ||
package org.opencb.opencga.analysis.variant.operations; | ||
|
||
import org.opencb.opencga.core.models.common.Enums; | ||
import org.opencb.opencga.core.models.variant.VariantPruneParams; | ||
import org.opencb.opencga.core.tools.annotations.Tool; | ||
import org.opencb.opencga.core.tools.annotations.ToolParams; | ||
|
||
@Tool(id = VariantPruneOperationTool.ID, description = VariantPruneOperationTool.DESCRIPTION, | ||
type = Tool.Type.OPERATION, resource = Enums.Resource.VARIANT) | ||
public class VariantPruneOperationTool extends OperationTool { | ||
|
||
public static final String DESCRIPTION = "Prune orphan variants from studies in a project."; | ||
public static final String ID = "variant-prune"; | ||
|
||
@ToolParams | ||
protected VariantPruneParams params = new VariantPruneParams(); | ||
|
||
@Override | ||
protected void run() throws Exception { | ||
|
||
step(() -> { | ||
getVariantStorageManager().variantPrune(params.getProject(), getOutDir().toUri(), params, getToken()); | ||
}); | ||
|
||
|
||
} | ||
} |
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
39 changes: 39 additions & 0 deletions
39
opencga-core/src/main/java/org/opencb/opencga/core/models/variant/VariantPruneParams.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,39 @@ | ||
package org.opencb.opencga.core.models.variant; | ||
|
||
import org.opencb.opencga.core.tools.ToolParams; | ||
|
||
public class VariantPruneParams extends ToolParams { | ||
|
||
public static final String DESCRIPTION = "Variant prune params. Use dry-run to just generate a report with the orphan variants."; | ||
private String project; | ||
private boolean dryRun; | ||
private boolean resume; | ||
|
||
|
||
public String getProject() { | ||
return project; | ||
} | ||
|
||
public VariantPruneParams setProject(String project) { | ||
this.project = project; | ||
return this; | ||
} | ||
|
||
public boolean isDryRun() { | ||
return dryRun; | ||
} | ||
|
||
public VariantPruneParams setDryRun(boolean dryRun) { | ||
this.dryRun = dryRun; | ||
return this; | ||
} | ||
|
||
public boolean isResume() { | ||
return resume; | ||
} | ||
|
||
public VariantPruneParams setResume(boolean resume) { | ||
this.resume = resume; | ||
return this; | ||
} | ||
} |
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
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
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
Oops, something went wrong.