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.
This commit is contained in:
Mauricio Carneiro 2011-07-26 19:29:25 -04:00
parent 81f8e05bfa
commit 321afac4e8
5 changed files with 96 additions and 45 deletions

View File

@ -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
*
* <p>
* Compares two record-oriented files, itemizing specific difference between equivalent
* records in the two files. Reports both itemized and summarized differences.
* <p>
* <b>What are the summarized differences and the DiffObjectsWalker</b>
* Compares two record-oriented files, itemizing specific difference between equivalent
* records in the two files. Reports both itemized and summarized differences.
* </p>
*
* <h3>What are the summarized differences and the DiffObjectsWalker?</h3>
*
* <p>
* The GATK contains a summarizing difference engine that compares hierarchical data structures to emit:
* <ul>
* <li>A list of specific differences between the two data structures. This is similar to saying the value in field A in record 1 in file F differences from the value in field A in record 1 in file G.
* <li>A summarized list of differences ordered by frequency of the difference. This output is similar to saying field A in 50 records in files F and G differed.
* </ul>
* <ul>
* <li>A list of specific differences between the two data structures. This is similar to saying the value in field A in record 1 in file F differences from the value in field A in record 1 in file G.
* <li>A summarized list of differences ordered by frequency of the difference. This output is similar to saying field A in 50 records in files F and G differed.
* </ul>
* </p>
*
* <p>
* 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.
* </p>
*
* <h3>Why?</h3>
*
* <p>
* <b>Why?</b>
* <p>
* 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.
* </p>
*
* <p>Understanding the output
* <p>The DiffEngine system compares to two hierarchical data structures for specific differences in the values of named
* nodes. Suppose I have two trees:
* <h2>Input</h2>
* <p>
* The DiffObjectsWalker works with BAM or VCF files.
* </p>
*
* <h2>Output</h2>
* <p>
* The DiffEngine system compares to two hierarchical data structures for specific differences in the values of named
* nodes. Suppose I have two trees:
* <pre>
* 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;
* </pre>
* <p>
* 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:
* <pre>
* 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
* </pre>
*
* <p>
* 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:
*
* <pre>
* *.B.C : 3
* *.B.E : 1
* </pre>
* <p>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.
*
* <p>
* 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.
* <p>
* 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.
* <p>
*
* <pre>
[testng] path count
[testng] *.*.*.AC 6

View File

@ -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);

View File

@ -6,10 +6,10 @@
</#macro>
<#macro headerInfo>
</#macro>
<#macro footerInfo>
<p class="see-also">See also <a href="index.html">Main index</a> | <a href="http://www.broadinstitute.org/gsa/wiki/index.php/The_Genome_Analysis_Toolkit">GATK wiki</a> | <a href="http://getsatisfaction.com/gsa">GATK support forum</a></p>
<p class="version">GATK version ${version} built at ${timestamp}.</p>
</#macro>
<#macro footerInfo>
</#macro>

View File

@ -53,19 +53,18 @@
<body>
<h1>${name}</h1>
<@headerInfo />
<h2>Brief summary</h2>
${summary}
<p class="summary">${summary}</p>
<#if author??>
<h2>Author</h2>
${author}
</#if>
<h2>Detailed description</h2>
<h2>Introduction</h2>
${description}
<#-- Create the argument summary -->
<#if arguments.all?size != 0>
<hr>
<h2>Feature specific arguments</h2>
<h2>${name} specific arguments</h2>
<table id="hor-minimalist-b">
<thead>
<tr>

View File

@ -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;
}
/*