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

Add DeprecatedFeature annotation. #8100

Merged
merged 2 commits into from
Dec 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ repositories {

final htsjdkVersion = System.getProperty('htsjdk.version','3.0.1')
final picardVersion = System.getProperty('picard.version','2.27.5')
final barclayVersion = System.getProperty('barclay.version','4.0.2')
final barclayVersion = System.getProperty('barclay.version','4.1.0')
final sparkVersion = System.getProperty('spark.version', '2.4.5')
final scalaVersion = System.getProperty('scala.version', '2.11')
final hadoopVersion = System.getProperty('hadoop.version', '3.3.1')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import java.util.Map;

/**
* When a tool is removed from GATK (after having been @Deprecated for a suitable period), an entry should
* be added to this list to issue a message when the user tries to run that tool.
* When a tool is removed from GATK (after having been tagged with @DeprecatedFeature for a suitable period), an
* entry should be added to this list to issue a message when the user tries to run that tool.
*
* NOTE: Picard tools should be listed here as well, since by definition such tools will not be found in
* the Picard jar.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import htsjdk.variant.variantcontext.VariantContext;
import org.broadinstitute.barclay.argparser.Advanced;
import org.broadinstitute.barclay.argparser.Argument;
import org.broadinstitute.barclay.argparser.DeprecatedFeature;
import org.broadinstitute.hellbender.engine.FeatureInput;
import org.broadinstitute.hellbender.exceptions.GATKException;
import org.broadinstitute.hellbender.utils.variant.HomoSapiensConstants;
Expand Down Expand Up @@ -61,7 +62,7 @@ public GenotypeCalculationArgumentCollection clone() {
/**
* As of version 4.1.0.0, this argument is no longer needed because the new qual score is now on by default. See GATK 3.3 release notes for more details.
Copy link
Member

Choose a reason for hiding this comment

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

Does javadoc on arguments get output in our docs at all?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it gets included in the full text description.

*/
@Deprecated
@DeprecatedFeature(detail="New qual score is on by default")
@Argument(fullName = "use-new-qual-calculator", shortName = "new-qual", doc = "Use the new AF model instead of the so-called exact model", optional = true)
public boolean useNewAFCalculator = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.broadinstitute.barclay.argparser.Advanced;
import org.broadinstitute.barclay.argparser.Argument;
import org.broadinstitute.barclay.argparser.DeprecatedFeature;
import org.broadinstitute.barclay.argparser.Hidden;
import org.broadinstitute.hellbender.tools.walkers.haplotypecaller.readthreading.ReadThreadingAssembler;

Expand Down Expand Up @@ -32,7 +33,7 @@ public class HaplotypeCallerReadThreadingAssemblerArgumentCollection extends Rea
/**
* As of version 3.3, this argument is no longer needed because dangling end recovery is now the default behavior. See GATK 3.3 release notes for more details.
*/
@Deprecated
@DeprecatedFeature
Copy link
Member

Choose a reason for hiding this comment

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

This has been deprecated since 3.3... maybe we can remove it.

Copy link
Member

Choose a reason for hiding this comment

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

Can we put the reason in the description?

@Argument(fullName= RECOVER_DANGLING_HEADS_LONG_NAME, doc="This argument is deprecated since version 3.3", optional = true)
public boolean DEPRECATED_RecoverDanglingHeads = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.broadinstitute.barclay.argparser.Advanced;
import org.broadinstitute.barclay.argparser.Argument;
import org.broadinstitute.barclay.argparser.ArgumentCollection;
import org.broadinstitute.barclay.argparser.DeprecatedFeature;
import org.broadinstitute.hellbender.cmdline.ReadFilterArgumentDefinitions;
import org.broadinstitute.hellbender.engine.FeatureInput;
import org.broadinstitute.hellbender.tools.walkers.haplotypecaller.FlowBasedAlignmentArgumentCollection;
Expand Down Expand Up @@ -115,7 +116,7 @@ public ReadThreadingAssembler createReadThreadingAssembler(){
public File f1r2TarGz;

// As of GATK 4.1, any sample not specified as the normal is considered a tumor sample
@Deprecated
@DeprecatedFeature
Copy link
Member

Choose a reason for hiding this comment

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

Should we move the reason into here?

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. Done.

@Argument(fullName = TUMOR_SAMPLE_LONG_NAME, shortName = TUMOR_SAMPLE_SHORT_NAME, doc = "BAM sample name of tumor. May be URL-encoded as output by GetSampleName with -encode argument.", optional = true)
protected String tumorSample = null;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.broadinstitute.hellbender.utils.help;

import org.broadinstitute.barclay.help.DocWorkUnit;
import org.broadinstitute.barclay.help.GSONWorkUnit;

/**
Expand All @@ -11,6 +12,10 @@ public class GATKGSONWorkUnit extends GSONWorkUnit {

private String walkerType;

public GATKGSONWorkUnit(DocWorkUnit workUnit) {
super(workUnit);
}

public void setWalkerType(final String walkerType){
this.walkerType = walkerType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected GSONWorkUnit createGSONWorkUnit(
final List<Map<String, String>> groupMaps,
final List<Map<String, String>> featureMaps)
{
GATKGSONWorkUnit gatkGSONWorkUnit = new GATKGSONWorkUnit();
GATKGSONWorkUnit gatkGSONWorkUnit = new GATKGSONWorkUnit(workUnit);
gatkGSONWorkUnit.setWalkerType((String)workUnit.getRootMap().get(WALKER_TYPE_MAP_ENTRY));
return gatkGSONWorkUnit;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ <h4>${group.name}</h4>
<td>**EXPERIMENTAL** ${datum.summary} </td>
<#elseif datum.beta?? && datum.beta == "true">
<td>**BETA** ${datum.summary}</td>
<#elseif datum.deprecated?? && datum.deprecated == "true">
<td>**DEPRECATED** ${datum.summary}</a></td>
<#else>
<td>${datum.summary}</td>
</#if>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@

<#include "common.html"/>

<#macro flagDeprecated arg>
<#if arg.deprecated == true> (Deprecated)</#if>
</#macro>

<#macro flagDeprecatedWithReason arg>
<#if arg.deprecated == true>
<#if arg.deprecationDetail??>
This argument is deprecated. ${arg.deprecationDetail}</br>
<#else>
This argument is deprecated.</br>
</#if>
</#if>
</#macro>


<#macro argumentlist name myargs>
<#if myargs?size != 0>
<tr>
Expand All @@ -56,7 +71,7 @@
<#else>
<td></td>
</#if>
<td>${arg.summary}</td>
<td><@flagDeprecated arg=arg/>${arg.summary}</td>
</tr>
</#list>
</#if>
Expand All @@ -68,7 +83,7 @@ <h3><a name="${arg.name}">${arg.name} </a>
<#if arg.synonyms?? && arg.synonyms != "NA"> / <small>${arg.synonyms}</small></#if>
</h3>
<p class="args">
<b>${arg.summary}</b><br />
<b><@flagDeprecated arg=arg/>${arg.summary}</b><br />
${arg.fulltext}
</p>
<#if arg.otherArgumentRequired != "NA">
Expand Down Expand Up @@ -132,6 +147,8 @@ <h3>Browse tools by category</h3>
<h1>**BETA** ${name}</h1>
<#elseif experimental?? && experimental == true>
<h1>**EXPERIMENTAL** ${name}</h1>
<#elseif deprecated?? && deprecated == true>
<h1>**DEPRECATED** ${name} ${deprecationDetail}</h1>
<#else>
<h1>${name}</h1>
</#if>
Expand Down