From 321afac4e8ebc3a6db2c0e9b00094f0dfe12f0e6 Mon Sep 17 00:00:00 2001 From: Mauricio Carneiro Date: Tue, 26 Jul 2011 19:29:25 -0400 Subject: [PATCH] Updates to the help layout. *New style.css, new template for the walker auto-generated html. Short description is no longer repeated in the long description of the walker. *Updated DiffObjectsWalker and ContigStatsWalker as "reference" documented walkers. --- .../walkers/diffengine/DiffObjectsWalker.java | 74 +++++++++++-------- .../help/GenericDocumentationHandler.java | 2 +- settings/helpTemplates/common.html | 6 +- settings/helpTemplates/generic.template.html | 7 +- settings/helpTemplates/style.css | 52 +++++++++++-- 5 files changed, 96 insertions(+), 45 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffObjectsWalker.java b/public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffObjectsWalker.java index b679f967a..f43d1342d 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffObjectsWalker.java +++ b/public/java/src/org/broadinstitute/sting/gatk/walkers/diffengine/DiffObjectsWalker.java @@ -25,7 +25,6 @@ package org.broadinstitute.sting.gatk.walkers.diffengine; import org.broadinstitute.sting.commandline.Argument; -import org.broadinstitute.sting.commandline.Hidden; import org.broadinstitute.sting.commandline.Output; import org.broadinstitute.sting.gatk.contexts.AlignmentContext; import org.broadinstitute.sting.gatk.contexts.ReferenceContext; @@ -35,34 +34,45 @@ import org.broadinstitute.sting.gatk.walkers.RodWalker; import java.io.File; import java.io.PrintStream; -import java.util.Arrays; import java.util.List; /** * A generic engine for comparing tree-structured objects + * *

- * Compares two record-oriented files, itemizing specific difference between equivalent - * records in the two files. Reports both itemized and summarized differences. - *

- * What are the summarized differences and the DiffObjectsWalker + * Compares two record-oriented files, itemizing specific difference between equivalent + * records in the two files. Reports both itemized and summarized differences. + *

+ * + *

What are the summarized differences and the DiffObjectsWalker?

+ * *

* The GATK contains a summarizing difference engine that compares hierarchical data structures to emit: - *

+ * + *

* *

- * The GATK contains a private walker DiffObjects that allows you access to the DiffEngine capabilities on the command line. Simply provide the walker with the master and test files and it will emit summarized differences for you. + * The GATK contains a private walker DiffObjects that allows you access to the DiffEngine capabilities on the command line. Simply provide the walker with the master and test files and it will emit summarized differences for you. + *

+ * + *

Why?

* *

- * Why? - *

- * The reason for this system is that it allows you to compare two structured files -- such as BAMs and VCFs -- for common differences among them. This is primarily useful in regression testing or optimization, where you want to ensure that the differences are those that you expect and not any others. + * The reason for this system is that it allows you to compare two structured files -- such as BAMs and VCFs -- for common differences among them. This is primarily useful in regression testing or optimization, where you want to ensure that the differences are those that you expect and not any others. + *

* - *

Understanding the output - *

The DiffEngine system compares to two hierarchical data structures for specific differences in the values of named - * nodes. Suppose I have two trees: + *

Input

+ *

+ * The DiffObjectsWalker works with BAM or VCF files. + *

+ * + *

Output

+ *

+ * The DiffEngine system compares to two hierarchical data structures for specific differences in the values of named + * nodes. Suppose I have two trees: *

  *     Tree1=(A=1 B=(C=2 D=3))
  *     Tree2=(A=1 B=(C=3 D=3 E=4))
@@ -70,33 +80,37 @@ import java.util.List;
  * 
*

* where every node in the tree is named, or is a raw value (here all leaf values are integers). The DiffEngine - * traverses these data structures by name, identifies equivalent nodes by fully qualified names - * (Tree1.A is distinct from Tree2.A, and determines where their values are equal (Tree1.A=1, Tree2.A=1, so they are). - * These itemized differences are listed as: + * traverses these data structures by name, identifies equivalent nodes by fully qualified names + * (Tree1.A is distinct from Tree2.A, and determines where their values are equal (Tree1.A=1, Tree2.A=1, so they are). + * These itemized differences are listed as: *

  *     Tree1.B.C=2 != Tree2.B.C=3
  *     Tree1.B.C=2 != Tree3.B.C=4
  *     Tree2.B.C=3 != Tree3.B.C=4
  *     Tree1.B.E=MISSING != Tree2.B.E=4
  * 
+ * *

- * This conceptually very similar to the output of the unix command line tool diff. What's nice about DiffEngine though - * is that it computes similarity among the itemized differences and displays the count of differences names - * in the system. In the above example, the field C is not equal three times, while the missing E in Tree1 occurs - * only once. So the summary is: + * This conceptually very similar to the output of the unix command line tool diff. What's nice about DiffEngine though + * is that it computes similarity among the itemized differences and displays the count of differences names + * in the system. In the above example, the field C is not equal three times, while the missing E in Tree1 occurs + * only once. So the summary is: * *

  *     *.B.C : 3
  *     *.B.E : 1
  * 
- *

where the * operator indicates that any named field matches. This output is sorted by counts, and provides an - * immediate picture of the commonly occurring differences among the files. + * *

- * Below is a detailed example of two VCF fields that differ because of a bug in the AC, AF, and AN counting routines, - * detected by the integrationtest integration (more below). You can see that in the although there are many specific - * instances of these differences between the two files, the summarized differences provide an immediate picture that - * the AC, AF, and AN fields are the major causes of the differences. + * where the * operator indicates that any named field matches. This output is sorted by counts, and provides an + * immediate picture of the commonly occurring differences among the files. *

+ * Below is a detailed example of two VCF fields that differ because of a bug in the AC, AF, and AN counting routines, + * detected by the integrationtest integration (more below). You can see that in the although there are many specific + * instances of these differences between the two files, the summarized differences provide an immediate picture that + * the AC, AF, and AN fields are the major causes of the differences. + *

+ * *

    [testng] path                                                             count
    [testng] *.*.*.AC                                                         6
diff --git a/public/java/src/org/broadinstitute/sting/utils/help/GenericDocumentationHandler.java b/public/java/src/org/broadinstitute/sting/utils/help/GenericDocumentationHandler.java
index fd1048844..c69345816 100644
--- a/public/java/src/org/broadinstitute/sting/utils/help/GenericDocumentationHandler.java
+++ b/public/java/src/org/broadinstitute/sting/utils/help/GenericDocumentationHandler.java
@@ -92,7 +92,7 @@ public class GenericDocumentationHandler extends DocumentedGATKFeatureHandler {
         for(Tag tag: classdoc.firstSentenceTags())
             summaryBuilder.append(tag.text());
         root.put("summary", summaryBuilder.toString());
-        root.put("description", classdoc.commentText());
+        root.put("description", classdoc.commentText().substring(summaryBuilder.toString().length()));
         root.put("timestamp", toProcess.buildTimestamp);
         root.put("version", toProcess.absoluteVersion);
 
diff --git a/settings/helpTemplates/common.html b/settings/helpTemplates/common.html
index ebc060d0a..1554a1d40 100644
--- a/settings/helpTemplates/common.html
+++ b/settings/helpTemplates/common.html
@@ -6,10 +6,10 @@
 
 
 <#macro headerInfo>
+
+
+<#macro footerInfo>
     

See also Main index | GATK wiki | GATK support forum

GATK version ${version} built at ${timestamp}.

-<#macro footerInfo> - - diff --git a/settings/helpTemplates/generic.template.html b/settings/helpTemplates/generic.template.html index ca0d1e76f..032407164 100644 --- a/settings/helpTemplates/generic.template.html +++ b/settings/helpTemplates/generic.template.html @@ -53,19 +53,18 @@

${name}

<@headerInfo /> -

Brief summary

- ${summary} +

${summary}

<#if author??>

Author

${author} -

Detailed description

+

Introduction

${description} <#-- Create the argument summary --> <#if arguments.all?size != 0>
-

Feature specific arguments

+

${name} specific arguments

diff --git a/settings/helpTemplates/style.css b/settings/helpTemplates/style.css index 79f409f55..1d7bcc576 100644 --- a/settings/helpTemplates/style.css +++ b/settings/helpTemplates/style.css @@ -14,29 +14,67 @@ p, ul, ol, dl, dt, dd, td font-size: 12pt; } -p.version, p.see-also +p { - font-size: 8pt; + margin-left: 1em; } -h1, h2, h3 +p.summary +{ + margin-left: 2em; + margin-top: -20pt; + font-style: italic; +} + +p.see-also +{ + font-size: 10pt; + margin-left: 0em; + margin-top: 3em; + text-align: center; +} + +p.version +{ + font-size: 8pt; + margin-left: 0em; + margin-top: -8pt; + text-align: center; +} + + +h1, h2, h3, h4 { font-family: Corbel, Arial, Helvetica, Sans-Serif; font-weight: bold; text-align: left; - color: #669; } h1 { font-size: 32pt; letter-spacing: -2px; + color: #669; } -h3 +h2 { - font-size: 16pt; - font-weight: normal; + font-size: 16pt; + font-weight: bold; + margin-top: 2em; + color: #669; +} + +h3 +{ + font-size: 12pt; + margin-left: 1em; + color: #000; +} + +hr +{ + margin-top: 4em; } /*