-
Notifications
You must be signed in to change notification settings - Fork 596
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created a VariantAnnotationArgumentCollection to reduce code duplicat…
…ion and added a StandardM2Annotation group
- Loading branch information
1 parent
847048d
commit 999a1a7
Showing
21 changed files
with
135 additions
and
104 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
57 changes: 57 additions & 0 deletions
57
...institute/hellbender/cmdline/argumentcollections/VariantAnnotationArgumentCollection.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,57 @@ | ||
package org.broadinstitute.hellbender.cmdline.argumentcollections; | ||
|
||
import org.broadinstitute.barclay.argparser.Advanced; | ||
import org.broadinstitute.barclay.argparser.Argument; | ||
import org.broadinstitute.hellbender.cmdline.StandardArgumentDefinitions; | ||
import org.broadinstitute.hellbender.utils.Utils; | ||
|
||
import java.io.Serializable; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* Arguments for requesting VariantContext annotations to be processed by {@link org.broadinstitute.hellbender.tools.walkers.annotator.VariantAnnotatorEngine} | ||
* for tools that process variants objects. | ||
*/ | ||
public class VariantAnnotationArgumentCollection implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* Argument collection constructor which defines tool default annotation arguments when they are not overridden by the user | ||
* | ||
* @param defaultGroups List annotation group names to be used by default | ||
* @param defaultAnnotations List of annotation class names to be used by default | ||
* @param defaultAnnotationsToExclude List of annotation class names to exclude by default. These override the default annotations and annotation groups. | ||
*/ | ||
public VariantAnnotationArgumentCollection(List<String> defaultGroups, List<String> defaultAnnotations, List<String> defaultAnnotationsToExclude) { | ||
Utils.nonNull(defaultGroups); | ||
Utils.nonNull(defaultAnnotations); | ||
Utils.nonNull(defaultAnnotationsToExclude); | ||
|
||
annotationGroupsToUse = new ArrayList<>(defaultGroups); | ||
annotationsToUse = new ArrayList<>(defaultAnnotations); | ||
annotationsToExclude = new ArrayList<>(defaultAnnotationsToExclude); | ||
} | ||
|
||
/** | ||
* Which annotations to include in variant calls in the output. These supplement annotations provided by annotation groups. | ||
*/ | ||
@Argument(fullName=StandardArgumentDefinitions.ANNOTATION_LONG_NAME, shortName=StandardArgumentDefinitions.ANNOTATION_SHORT_NAME, doc="One or more specific annotations to add to variant calls", optional=true) | ||
public List<String> annotationsToUse = new ArrayList<>(); | ||
|
||
/** | ||
* Which annotations to exclude from output in the variant calls. Note that this argument has higher priority than the | ||
* -A or -G arguments, so these annotations will be excluded even if they are explicitly included with the other | ||
* options. | ||
*/ | ||
@Argument(fullName=StandardArgumentDefinitions.ANNOTATIONS_TO_EXCLUDE_LONG_NAME, shortName=StandardArgumentDefinitions.ANNOTATIONS_TO_EXCLUDE_SHORT_NAME, doc="One or more specific annotations to exclude from variant calls", optional=true) | ||
public List<String> annotationsToExclude = new ArrayList<>(); | ||
|
||
/** | ||
* Which groups of annotations to add to the output variant calls. | ||
* Any requirements that are not met (e.g. failing to provide a pedigree file for a pedigree-based annotation) may cause the run to fail. | ||
*/ | ||
@Argument(fullName= StandardArgumentDefinitions.ANNOTATION_GROUP_LONG_NAME, shortName=StandardArgumentDefinitions.ANNOTATION_GROUP_SHORT_NAME, doc="One or more groups of annotations to apply to variant calls", optional=true) | ||
public List<String> annotationGroupsToUse = new ArrayList<>(); | ||
|
||
} |
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
5 changes: 1 addition & 4 deletions
5
src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/BaseQuality.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
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
5 changes: 1 addition & 4 deletions
5
src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/FragmentLength.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
7 changes: 1 addition & 6 deletions
7
src/main/java/org/broadinstitute/hellbender/tools/walkers/annotator/MappingQuality.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
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
4 changes: 2 additions & 2 deletions
4
.../annotator/StandardSomaticAnnotation.java → ...s/annotator/StandardMutectAnnotation.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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package org.broadinstitute.hellbender.tools.walkers.annotator; | ||
|
||
/** | ||
* This is a marker interface used to indicate which annotations are "Standard" for MuTect only. | ||
* This is a marker interface used to indicate which annotations are "Standard" for Mutect2 only. | ||
*/ | ||
public interface StandardSomaticAnnotation { | ||
public interface StandardMutectAnnotation extends Annotation { | ||
} |
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.