-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-3.x.x' into TASK-6754
- Loading branch information
Showing
18 changed files
with
822 additions
and
25 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
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
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
59 changes: 59 additions & 0 deletions
59
.../storage/core/variant/annotation/annotators/extensions/VariantAnnotatorExtensionTask.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,59 @@ | ||
package org.opencb.opencga.storage.core.variant.annotation.annotators.extensions; | ||
|
||
import org.opencb.biodata.models.variant.avro.VariantAnnotation; | ||
import org.opencb.commons.datastore.core.ObjectMap; | ||
import org.opencb.commons.run.Task; | ||
|
||
import java.net.URI; | ||
import java.util.List; | ||
|
||
public interface VariantAnnotatorExtensionTask extends Task<VariantAnnotation, VariantAnnotation> { | ||
|
||
/** | ||
* Set up the annotator extension. | ||
* This method will be called before any other method. It might generate extra files or data needed for the annotation. | ||
* | ||
* @param output Output directory where the annotator extension should write the files | ||
* @return List of URIs of generated files (if any) | ||
* @throws Exception if the annotator extension set up fails | ||
*/ | ||
List<URI> setup(URI output) throws Exception; | ||
|
||
/** | ||
* Check if the annotator extension is available for the given options. | ||
* @throws IllegalArgumentException if the annotator extension is not available | ||
*/ | ||
void checkAvailable() throws IllegalArgumentException; | ||
|
||
/** | ||
* Check if the annotator extension is available for the given options. Do not throw any exception if the extension is not available. | ||
* @return true if the annotator extension is available | ||
*/ | ||
default boolean isAvailable() { | ||
try { | ||
checkAvailable(); | ||
return true; | ||
} catch (IllegalArgumentException e) { | ||
return false; | ||
} | ||
} | ||
|
||
@Override | ||
default void pre() throws Exception { | ||
Task.super.pre(); | ||
checkAvailable(); | ||
} | ||
|
||
/** | ||
* Get the options for the annotator extension. | ||
* @return Options for the annotator extension | ||
*/ | ||
ObjectMap getOptions(); | ||
|
||
/** | ||
* Get the metadata for the annotator extension. | ||
* @return Metadata for the annotator extension | ||
*/ | ||
ObjectMap getMetadata(); | ||
|
||
} |
Oops, something went wrong.