From e71255d3c29b848c41a763dbbb4111721421c0d3 Mon Sep 17 00:00:00 2001 From: Mark DePristo Date: Thu, 11 Aug 2011 11:01:21 -0400 Subject: [PATCH] GATKDocsExample walker -- Shows the best practice for documentating a walker with the GATKdocs -- See http://www.broadinstitute.org/gsa/wiki/index.php/GATKdocs#Writing_GATKdocs_for_your_walkers for a brief discussion --- .../sting/gatk/examples/GATKDocsExample.java | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 public/java/src/org/broadinstitute/sting/gatk/examples/GATKDocsExample.java diff --git a/public/java/src/org/broadinstitute/sting/gatk/examples/GATKDocsExample.java b/public/java/src/org/broadinstitute/sting/gatk/examples/GATKDocsExample.java new file mode 100644 index 000000000..4541a0537 --- /dev/null +++ b/public/java/src/org/broadinstitute/sting/gatk/examples/GATKDocsExample.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2011, The Broad Institute + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +package org.broadinstitute.sting.gatk.examples; + +import org.broadinstitute.sting.commandline.Argument; +import org.broadinstitute.sting.commandline.ArgumentCollection; +import org.broadinstitute.sting.gatk.arguments.StandardVariantContextInputArgumentCollection; +import org.broadinstitute.sting.gatk.contexts.AlignmentContext; +import org.broadinstitute.sting.gatk.contexts.ReferenceContext; +import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker; +import org.broadinstitute.sting.gatk.walkers.RodWalker; + +/** + * [Short one sentence description of this walker] + * + *

+ * [Functionality of this walker] + *

+ * + *

Input

+ *

+ * [Input description] + *

+ * + *

Output

+ *

+ * [Output description] + *

+ * + *

Examples

+ *
+ *    java
+ *      -jar GenomeAnalysisTK.jar
+ *      -T $WalkerName
+ *  
+ * + * @author Your Name + * @since Date created + */ +public class GATKDocsExample extends RodWalker { + /** + * Put detailed documentation about the argument here. No need to duplicate the summary information + * in doc annotation field, as that will be added before this text in the documentation page. + * + * Notes: + * + */ + @Argument(fullName="full", shortName="short", doc="Brief summary of argument [~ 80 characters of text]", required=false) + private boolean myWalkerArgument = false; + + public Integer map(RefMetaDataTracker tracker, ReferenceContext ref, AlignmentContext context) { return 0; } + public Integer reduceInit() { return 0; } + public Integer reduce(Integer value, Integer sum) { return value + sum; } + public void onTraversalDone(Integer result) { } +}