Added the ability to update the Forum
GATKDocs looks for a key on gsa4, and updates the forum with new walker if it exists. More changes were made to the GATKDocs. Works nicely with bootstrap on and offline. Cleaned up the code as well Signed-off-by: Mauricio Carneiro <carneiro@broadinstitute.org>
This commit is contained in:
parent
46ca49b63d
commit
f3c504769b
135
ivy.xml
135
ivy.xml
|
|
@ -23,89 +23,90 @@
|
|||
-->
|
||||
|
||||
<ivy-module version="1.0">
|
||||
<info organisation="org.broadinstitute" module="Sting"/>
|
||||
<configurations defaultconfmapping="test->default">
|
||||
<conf name="default" description="the core dependencies for the GATK"/>
|
||||
<conf name="test" extends="default" description="external dependencies used for testing and metrics" />
|
||||
<conf name="scala" extends="default" description="the dependencies for scala"/>
|
||||
<conf name="queue" extends="scala" description="the dependencies for Queue"/>
|
||||
</configurations>
|
||||
<dependencies defaultconf="default">
|
||||
<dependency org="net.sf" name="sam" rev="latest.integration"/>
|
||||
<dependency org="net.sf" name="picard" rev="latest.integration"/>
|
||||
<dependency org="edu.mit.broad" name="picard-private-parts" rev="latest.integration"/>
|
||||
<info organisation="org.broadinstitute" module="Sting"/>
|
||||
<configurations defaultconfmapping="test->default">
|
||||
<conf name="default" description="the core dependencies for the GATK"/>
|
||||
<conf name="test" extends="default" description="external dependencies used for testing and metrics"/>
|
||||
<conf name="scala" extends="default" description="the dependencies for scala"/>
|
||||
<conf name="queue" extends="scala" description="the dependencies for Queue"/>
|
||||
</configurations>
|
||||
<dependencies defaultconf="default">
|
||||
<dependency org="net.sf" name="sam" rev="latest.integration"/>
|
||||
<dependency org="net.sf" name="picard" rev="latest.integration"/>
|
||||
<dependency org="edu.mit.broad" name="picard-private-parts" rev="latest.integration"/>
|
||||
|
||||
<!-- Tribble -->
|
||||
<dependency org="org.broad" name="tribble" rev="latest.integration"/>
|
||||
<!-- Tribble -->
|
||||
<dependency org="org.broad" name="tribble" rev="latest.integration"/>
|
||||
|
||||
<dependency org="log4j" name="log4j" rev="1.2.15"/>
|
||||
<dependency org="javax.mail" name="mail" rev="1.4.4"/>
|
||||
<dependency org="colt" name="colt" rev="1.2.0"/>
|
||||
<!-- <dependency org="jboss" name="javassist" rev="3.7.ga"/> -->
|
||||
<dependency org="org.simpleframework" name="simple-xml" rev="2.0.4"/>
|
||||
<dependency org="org.apache.bcel" name="bcel" rev="5.2"/>
|
||||
<dependency org="log4j" name="log4j" rev="1.2.15"/>
|
||||
<dependency org="javax.mail" name="mail" rev="1.4.4"/>
|
||||
<dependency org="colt" name="colt" rev="1.2.0"/>
|
||||
<!-- <dependency org="jboss" name="javassist" rev="3.7.ga"/> -->
|
||||
<dependency org="org.simpleframework" name="simple-xml" rev="2.0.4"/>
|
||||
<dependency org="org.apache.bcel" name="bcel" rev="5.2"/>
|
||||
|
||||
<!-- Dependencies for reflections mvn repository -->
|
||||
<dependency org="org.reflections" name="reflections" rev="0.9.5-RC2"/>
|
||||
<!-- Dependencies for reflections mvn repository -->
|
||||
<dependency org="org.reflections" name="reflections" rev="0.9.5-RC2"/>
|
||||
|
||||
<!-- Matrix package from math.nist.gov -->
|
||||
<dependency org="gov.nist" name="Jama" rev="1.0.2"/>
|
||||
<!-- Matrix package from math.nist.gov -->
|
||||
<dependency org="gov.nist" name="Jama" rev="1.0.2"/>
|
||||
|
||||
<!-- Dependencies for the graph aligner -->
|
||||
<dependency org="org.jgrapht" name="jgrapht-jdk1.5" rev="0.7.3"/>
|
||||
<!-- Dependencies for the graph aligner -->
|
||||
<dependency org="org.jgrapht" name="jgrapht-jdk1.5" rev="0.7.3"/>
|
||||
|
||||
<!-- Dependencies for the html walker documention -->
|
||||
<dependency org="org.freemarker" name="freemarker" rev="2.3.18"/>
|
||||
|
||||
<!-- Commons Dependencies -->
|
||||
<dependency org="org.apache.commons" name="commons-email" rev="1.2"/>
|
||||
<dependency org="org.apache.commons" name="commons-jexl" rev="2.1.1"/>
|
||||
<dependency org="commons-lang" name="commons-lang" rev="2.5"/>
|
||||
<dependency org="commons-logging" name="commons-logging" rev="1.1.1"/>
|
||||
<dependency org="commons-io" name="commons-io" rev="2.1"/>
|
||||
<dependency org="org.apache.commons" name="commons-math" rev="2.2" />
|
||||
<!-- Dependencies for the html walker documention -->
|
||||
<dependency org="org.freemarker" name="freemarker" rev="2.3.18"/>
|
||||
|
||||
<!-- Lucene core utilities -->
|
||||
<!-- <dependency org="org.apache.lucene" name="lucene-core" rev="3.0.3"/> -->
|
||||
<!-- Commons Dependencies -->
|
||||
<dependency org="org.apache.commons" name="commons-email" rev="1.2"/>
|
||||
<dependency org="org.apache.commons" name="commons-jexl" rev="2.1.1"/>
|
||||
<dependency org="commons-lang" name="commons-lang" rev="2.5"/>
|
||||
<dependency org="commons-logging" name="commons-logging" rev="1.1.1"/>
|
||||
<dependency org="commons-io" name="commons-io" rev="2.1"/>
|
||||
<dependency org="org.apache.commons" name="commons-math" rev="2.2"/>
|
||||
|
||||
<!-- Dependencies for LSF, DRMAA, and other C libraries -->
|
||||
<dependency org="net.java.dev.jna" name="jna" rev="3.2.7"/>
|
||||
<!-- Lucene core utilities -->
|
||||
<!-- <dependency org="org.apache.lucene" name="lucene-core" rev="3.0.3"/> -->
|
||||
|
||||
<!-- Dependencies for amazon.com S3 support -->
|
||||
<dependency org="net.java.dev.jets3t" name="jets3t" rev="0.8.1"/>
|
||||
<!-- Dependencies for LSF, DRMAA, and other C libraries -->
|
||||
<dependency org="net.java.dev.jna" name="jna" rev="3.2.7"/>
|
||||
|
||||
<!-- Dependencies for GridEngine -->
|
||||
<dependency org="net.sf.gridscheduler" name="drmaa" rev="latest.integration"/>
|
||||
<!-- Dependencies for amazon.com S3 support -->
|
||||
<dependency org="net.java.dev.jets3t" name="jets3t" rev="0.8.1"/>
|
||||
|
||||
<!-- Scala dependancies -->
|
||||
<dependency org="org.scala-lang" name="scala-compiler" rev="2.8.1"/>
|
||||
<dependency org="org.scala-lang" name="scala-library" rev="2.8.1"/>
|
||||
<!-- Dependencies for GridEngine -->
|
||||
<dependency org="net.sf.gridscheduler" name="drmaa" rev="latest.integration"/>
|
||||
|
||||
<!-- testing and evaluation dependencies -->
|
||||
<dependency org="org.testng" name="testng" rev="5.14.1" conf="test" />
|
||||
<dependency org="org.uncommons" name="reportng" rev="1.1.2" conf="test" />
|
||||
<dependency org="com.google.code.caliper" name="caliper" rev="1.0-SNAPSHOT" conf="test" />
|
||||
<!-- Scala dependancies -->
|
||||
<dependency org="org.scala-lang" name="scala-compiler" rev="2.8.1"/>
|
||||
<dependency org="org.scala-lang" name="scala-library" rev="2.8.1"/>
|
||||
|
||||
<!-- Contracts for Java and dependencies -->
|
||||
<dependency org="com.google.code.cofoja" name="cofoja" rev="1.0-20110609" />
|
||||
<dependency org="asm" name="asm-all" rev="3.3.1" />
|
||||
<!-- testing and evaluation dependencies -->
|
||||
<dependency org="org.testng" name="testng" rev="5.14.1" conf="test"/>
|
||||
<dependency org="org.uncommons" name="reportng" rev="1.1.2" conf="test"/>
|
||||
<dependency org="com.google.code.caliper" name="caliper" rev="1.0-SNAPSHOT" conf="test"/>
|
||||
|
||||
<!-- POI, for reading pipeline files -->
|
||||
<dependency org="org.apache.poi" name="poi" rev="3.8-beta3" />
|
||||
<dependency org="org.apache.poi" name="poi-ooxml" rev="3.8-beta3" />
|
||||
<!-- Contracts for Java and dependencies -->
|
||||
<dependency org="com.google.code.cofoja" name="cofoja" rev="1.0-20110609"/>
|
||||
<dependency org="asm" name="asm-all" rev="3.3.1"/>
|
||||
|
||||
<!-- snpEff annotator for pipelines -->
|
||||
<dependency org="net.sf.snpeff" name="snpeff" rev="2.0.5" />
|
||||
<!-- POI, for reading pipeline files -->
|
||||
<dependency org="org.apache.poi" name="poi" rev="3.8-beta3"/>
|
||||
<dependency org="org.apache.poi" name="poi-ooxml" rev="3.8-beta3"/>
|
||||
|
||||
<!-- MongoDB for the GXDB project -->
|
||||
<dependency org="org.mongodb" name="mongo-java-driver" rev="2.7.3"/>
|
||||
<!-- snpEff annotator for pipelines -->
|
||||
<dependency org="net.sf.snpeff" name="snpeff" rev="2.0.5"/>
|
||||
|
||||
<!-- GSON for talking to the REST API on Vanilla Forums -->
|
||||
<dependency org="com.google.code.gson" name="gson" rev="2.2.2"/>
|
||||
<!-- MongoDB for the GXDB project -->
|
||||
<dependency org="org.mongodb" name="mongo-java-driver" rev="2.7.3"/>
|
||||
|
||||
<!-- Exclude dependencies on sun libraries where the downloads aren't available but included in the jvm. -->
|
||||
<exclude org="javax.servlet" />
|
||||
<exclude org="javax.jms" />
|
||||
<exclude org="com.sun.*" />
|
||||
</dependencies>
|
||||
<!-- GSON and HTTP for talking to the REST API on Vanilla Forums -->
|
||||
<dependency org="com.google.code.gson" name="gson" rev="2.2.2"/>
|
||||
<dependency org="org.apache.httpcomponents" name="httpclient" rev="4.1.1"/>
|
||||
|
||||
<!-- Exclude dependencies on sun libraries where the downloads aren't available but included in the jvm. -->
|
||||
<exclude org="javax.servlet"/>
|
||||
<exclude org="javax.jms"/>
|
||||
<exclude org="com.sun.*"/>
|
||||
</dependencies>
|
||||
</ivy-module>
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public class GATKDocUtils {
|
|||
/**
|
||||
* The URL root for RELEASED GATKDOC units
|
||||
*/
|
||||
public final static String URL_ROOT_FOR_RELEASE_GATKDOCS = "http://www.broadinstitute.org/gsa/gatkdocs/release/";
|
||||
public final static String URL_ROOT_FOR_RELEASE_GATKDOCS = "http://www.broadinstitute.org/gatk/gatkdocs/";
|
||||
/**
|
||||
* The URL root for STABLE GATKDOC units
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -41,12 +41,16 @@ import org.broadinstitute.sting.gatk.CommandLineGATK;
|
|||
import org.broadinstitute.sting.gatk.walkers.qc.DocumentationTest;
|
||||
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
|
||||
import org.broadinstitute.sting.utils.exceptions.UserException;
|
||||
import org.broadinstitute.sting.utils.text.XReadLines;
|
||||
|
||||
import java.io.*;
|
||||
import java.lang.annotation.Annotation;
|
||||
<<<<<<< HEAD
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
=======
|
||||
>>>>>>> Added the ability to update the Forum
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
@ -82,6 +86,7 @@ public class GATKDoclet {
|
|||
*/
|
||||
final protected static File DESTINATION_DIR = new File("gatkdocs");
|
||||
|
||||
final private static String FORUM_KEY_FILE = "/local/gsa-engineering/gatkdocs_publisher/forum.key";
|
||||
// ----------------------------------------------------------------------
|
||||
//
|
||||
// Global variables that are set on the command line by javadoc
|
||||
|
|
@ -142,7 +147,7 @@ public class GATKDoclet {
|
|||
buildTimestamp = options[1];
|
||||
if (options[0].equals("-absolute-version"))
|
||||
absoluteVersion = options[1];
|
||||
if (options[0].equals("-include-hidden"))
|
||||
if (options[0].equals("-include -hidden"))
|
||||
showHiddenFeatures = true;
|
||||
if (options[0].equals("-test"))
|
||||
testOnly = true;
|
||||
|
|
@ -151,6 +156,7 @@ public class GATKDoclet {
|
|||
// process the docs
|
||||
new GATKDoclet().processDocs(rootDoc);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -216,6 +222,15 @@ public class GATKDoclet {
|
|||
}
|
||||
|
||||
processIndex(cfg, new ArrayList<GATKDocWorkUnit>(myWorkUnits));
|
||||
|
||||
File forumKeyFile = new File(FORUM_KEY_FILE);
|
||||
if (forumKeyFile.exists()) {
|
||||
String forumKey = null;
|
||||
// Read ing a one-line file so we can do a for loop
|
||||
for (String line : new XReadLines(forumKeyFile))
|
||||
forumKey = line;
|
||||
updateForum(myWorkUnits, forumKey);
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (IOException e) {
|
||||
|
|
@ -223,6 +238,31 @@ public class GATKDoclet {
|
|||
}
|
||||
}
|
||||
|
||||
private void updateForum(Set<GATKDocWorkUnit> docWorkUnits, String forumKey) {
|
||||
//first get list of posts that need to be added
|
||||
List<String> old = ForumAPIUtils.getPostedTools(forumKey);
|
||||
|
||||
for (String s : old)
|
||||
System.out.println(s);
|
||||
|
||||
System.out.printf("Forum has %d items%n", old.size());
|
||||
System.out.printf("Docs have %d items%n", docWorkUnits.size());
|
||||
|
||||
List<GATKDocWorkUnit> toAdd = new ArrayList<GATKDocWorkUnit>();
|
||||
for (GATKDocWorkUnit tool : docWorkUnits) {
|
||||
if (!old.contains(tool.name)) {
|
||||
System.out.println("WILL POST: " + tool.name + " TO FORUM");
|
||||
toAdd.add(tool);
|
||||
}
|
||||
}
|
||||
|
||||
//update using list
|
||||
for (GATKDocWorkUnit tool : toAdd) {
|
||||
//if ( tool.name.equals("ApplyRecalibration") )
|
||||
ForumAPIUtils.postToForum(tool, forumKey);
|
||||
}
|
||||
}
|
||||
|
||||
private void processCategories(Map<Category, List<Map<String, String>>> getCategories, Set<GATKDocWorkUnit> classes) throws IOException {
|
||||
List<Object> categories = new LinkedList<Object>();
|
||||
for (Category cat : getCategories.keySet()) {
|
||||
|
|
@ -248,7 +288,6 @@ public class GATKDoclet {
|
|||
posts.add(properties);
|
||||
}
|
||||
|
||||
writeJson(DESTINATION_DIR + "/posts.json", posts);
|
||||
}
|
||||
|
||||
private void writeJson(String filename, Object source) throws IOException {
|
||||
|
|
@ -261,40 +300,6 @@ public class GATKDoclet {
|
|||
|
||||
}
|
||||
|
||||
public static void postRestJson(String URL, String json) {
|
||||
try {
|
||||
URL url = new URL(URL);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setDoOutput(true);
|
||||
conn.setRequestMethod("POST");
|
||||
conn.setRequestProperty("Content-Type", "application/json");
|
||||
|
||||
OutputStream os = conn.getOutputStream();
|
||||
os.write(json.getBytes());
|
||||
os.flush();
|
||||
|
||||
if (conn.getResponseCode() != HttpURLConnection.HTTP_CREATED) {
|
||||
throw new RuntimeException("Failed : HTTP error code : "
|
||||
+ conn.getResponseCode());
|
||||
}
|
||||
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(
|
||||
(conn.getInputStream())));
|
||||
|
||||
String output;
|
||||
System.out.println("Output from Server .... \n");
|
||||
while ((output = br.readLine()) != null) {
|
||||
System.out.println(output);
|
||||
}
|
||||
|
||||
conn.disconnect();
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the set of all GATKDocWorkUnits that we are going to generate docs for.
|
||||
*
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -71,17 +71,8 @@
|
|||
|
||||
<div class="row-fluid">
|
||||
<#if isIndex>
|
||||
<section class="span4">
|
||||
<aside class="well">
|
||||
<h2>About GATKdocs</h2>
|
||||
|
||||
<p>He is some text describing the docs, what it is and stuf...nalysis ready SNP and indel
|
||||
calls
|
||||
with hand filtering when VQSR is not possib. nalysis ready SNP and indel calls with hand
|
||||
filtering when VQSR is not possib </p>
|
||||
</aside>
|
||||
</section>
|
||||
<div class="span8">
|
||||
<?php printGATKDocsNav(); ?>
|
||||
<div class="span9">
|
||||
</#if>
|
||||
|
||||
</#macro>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,27 @@
|
|||
<!--
|
||||
~ Copyright (c) 2012, 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.
|
||||
-->
|
||||
|
||||
<#include "common.html"/>
|
||||
|
||||
<#macro emitGroup group>
|
||||
|
|
@ -40,7 +64,8 @@
|
|||
|
||||
<@makeHeader title="GATK documentation index" isIndex=true />
|
||||
<h1>GATK documentation index
|
||||
<small>${version}</small></h1>
|
||||
<small>${version}</small>
|
||||
</h1>
|
||||
<hr>
|
||||
<#list groups?sort_by("name") as group>
|
||||
<@emitGroup group=group/>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,27 @@
|
|||
<!--
|
||||
~ Copyright (c) 2012, 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.
|
||||
-->
|
||||
|
||||
<#include "common.html"/>
|
||||
|
||||
<#macro argumentlist name myargs>
|
||||
|
|
@ -13,8 +37,7 @@
|
|||
<td>${arg.summary}</td>
|
||||
</tr>
|
||||
<#--
|
||||
<
|
||||
td>${arg.required}</td>
|
||||
<td>${arg.required}</td>
|
||||
-->
|
||||
</#list>
|
||||
</#if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue