Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added in a VcfFuncotationFactory. #4593

Merged
merged 2 commits into from
Mar 28, 2018

Conversation

jonn-smith
Copy link
Collaborator

Fixes #4357

Need to release new copy of data sources along with this.

Fixes #4375

Need to release new copy of data sources along with this.
Copy link
Contributor

@LeeTL1220 LeeTL1220 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor stuff.... back to you @jonn-smith

@@ -812,7 +813,7 @@ private String createProgramGroupID(final SAMFileHeader header) {
final String name,
final Class<? extends Feature> featureType) {

final FeatureInput<? extends Feature> featureInput = new FeatureInput<>(name + ":" + filePath);
final FeatureInput<? extends Feature> featureInput = new FeatureInput<>(name + FEATURE_ARGUMENT_TAG_DELIMITER + filePath);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor... Can you change this to FeatureInput.FEATURE_ARGUMENT_TAG_DELIMITER and change the import statement above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

* @param gencodeFuncotations {@link List} of {@link GencodeFuncotation} that have already been created for the given {@code variant}/{@code referenceContext}/{@code featureContext}.
* @return {@link List} of {@link Funcotation} given the {@code variant}, {@code referenceContext}, and {@code featureContext}. This should never be empty.
*/
public List<Funcotation> createFuncotations(final VariantContext variant, final ReferenceContext referenceContext, final Map<String, List<Feature>> featureSourceMap, final List<GencodeFuncotation> gencodeFuncotations) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you combine this method with the one above to leverage shared code? If a data source needs gencode info, but createFuncotation(...) is called without Gencode, will an exception be thrown?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha! Yeah - I forgot to combine them.

Yeah - I'll add that in.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah - the exception gets thrown in the concrete classes implementations of createFuncotations

VCF("vcf") {
@Override
public void assertConfigFilePropertiesAreValid(final Properties configFileProperties, final Path configFilePath) {
// There is no special check required for vcf files.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a sentence of "why not" ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure.

@@ -191,13 +197,13 @@ public String getName() {
* This method should never be called on a {@link CosmicFuncotationFactory} - knowledge of the applied
* {@link GencodeFuncotation}s is required to create a {@link Funcotation} from here.
*/
public List<Funcotation> createFuncotations(final VariantContext variant, final ReferenceContext referenceContext, final List<Feature> featureList) {
protected List<Funcotation> createFuncotationsOnVariant(final VariantContext variant, final ReferenceContext referenceContext, final List<Feature> featureList) {
// TODO: this should be allowed, but with a warning to the user that only annotations with good Genome Positions can be used.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you address this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet.

Added as issue #4594

@jonn-smith jonn-smith removed the request for review from lbergelson March 27, 2018 15:21
@jonn-smith
Copy link
Collaborator Author

OK @LeeTL1220 - first round comments addressed.

@LeeTL1220
Copy link
Contributor

@jonn-smith OK by me to merge then.

@codecov-io
Copy link

codecov-io commented Mar 27, 2018

Codecov Report

Merging #4593 into master will decrease coverage by 0.002%.
The diff coverage is 77.901%.

@@               Coverage Diff               @@
##              master     #4593       +/-   ##
===============================================
- Coverage     79.839%   79.837%   -0.002%     
- Complexity     16958     16995       +37     
===============================================
  Files           1062      1063        +1     
  Lines          61680     61802      +122     
  Branches        9983     10008       +25     
===============================================
+ Hits           49245     49341       +96     
- Misses          8540      8556       +16     
- Partials        3895      3905       +10
Impacted Files Coverage Δ Complexity Δ
.../tools/funcotator/dataSources/DataSourceUtils.java 68.047% <0%> (-5.201%) 26 <0> (ø)
...ataSources/xsv/SimpleKeyXsvFuncotationFactory.java 87.5% <100%> (ø) 26 <2> (+1) ⬆️
...ataSources/xsv/LocatableXsvFuncotationFactory.java 83.871% <100%> (ø) 26 <2> (ø) ⬇️
...ncotator/mafOutput/MafOutputRendererConstants.java 98.98% <100%> (ø) 1 <0> (ø) ⬇️
...r/dataSources/cosmic/CosmicFuncotationFactory.java 81.053% <100%> (-1.053%) 21 <2> (+1)
...org/broadinstitute/hellbender/engine/GATKTool.java 91.304% <100%> (ø) 93 <1> (ø) ⬇️
...tools/funcotator/dataSources/TableFuncotation.java 60% <47.619%> (-5.306%) 20 <2> (+2)
...ools/funcotator/FuncotatorArgumentDefinitions.java 85.106% <50%> (-1.56%) 1 <0> (ø)
...dataSources/gencode/GencodeFuncotationFactory.java 80.725% <66.667%> (-0.063%) 140 <1> (-1)
...titute/hellbender/tools/funcotator/Funcotator.java 76.351% <72.727%> (-3.514%) 30 <1> (-1)
... and 8 more

@jonn-smith jonn-smith merged commit 9be98b9 into master Mar 28, 2018
@jonn-smith jonn-smith deleted the jts_funcotator_vcf_data_source_4357 branch March 28, 2018 16:15
cwhelan pushed a commit to cwhelan/gatk-linked-reads that referenced this pull request May 25, 2018
* Added in a VcfFuncotationFactory.

Fixes broadinstitute#4357 

(in conjunction with a new data sources release)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants