Merge branch 'master' of ssh://kiran@nickel.broadinstitute.org/humgen/gsa-scr1/gsa-engineering/git/unstable
This commit is contained in:
commit
a6170c522c
66
build.xml
66
build.xml
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
<property name="build.dir" value="build" />
|
||||
<property name="dist.dir" value="dist" />
|
||||
<property name="lib.dir" value="lib" />
|
||||
<property name="external.dir" value="external" />
|
||||
<property name="public.dir" value="public" />
|
||||
<property name="private.dir" value="private" />
|
||||
|
|
@ -44,11 +45,11 @@
|
|||
<property name="queue-extensions.source.dir" value="${build.dir}/queue-extensions/src" />
|
||||
|
||||
<!-- Contracts for Java -->
|
||||
<!-- uncomment out to enable building contracts -->
|
||||
<property name="use.contracts" value="true" />
|
||||
<!-- To disable, run with -Duse.contracts=false -->
|
||||
<property name="use.contracts" value="true" />
|
||||
<property name="java.contracts" value="${build.dir}/java/contracts" />
|
||||
<property name="cofojaDir" value="settings/repository/com.google/"/>
|
||||
<property name="cofoja.jar" value="${cofojaDir}/cofoja-1.0-20110609.jar"/>
|
||||
<property name="contracts.version" value="1.0-20110609" />
|
||||
<property name="cofoja.jar" value="${lib.dir}/cofoja-${contracts.version}.jar"/>
|
||||
|
||||
<!-- where to find the tribble distro -->
|
||||
<property name="tribble.dir" value="tribble" />
|
||||
|
|
@ -101,7 +102,7 @@
|
|||
</patternset>
|
||||
|
||||
<path id="external.dependencies">
|
||||
<fileset dir="lib">
|
||||
<fileset dir="${lib.dir}">
|
||||
<patternset refid="dependency.mask" />
|
||||
</fileset>
|
||||
</path>
|
||||
|
|
@ -126,14 +127,14 @@
|
|||
<!-- ivy properties -->
|
||||
<property name="ivy.install.version" value="2.2.0"/>
|
||||
<property name="ivy.home" value="${user.home}/.ant"/>
|
||||
<property name="ivy.jar.dir" value="${ivy.home}/lib"/>
|
||||
<property name="ivy.jar.dir" value="${ivy.home}/${lib.dir}"/>
|
||||
<property name="ivy.jar.file" value="ivy-${ivy.install.version}.jar"/>
|
||||
<property name="ivy.settings.dir" value="settings"/>
|
||||
<property file="${ivy.settings.dir}/ivysettings.properties"/>
|
||||
|
||||
<mkdir dir="lib"/>
|
||||
<mkdir dir="${lib.dir}"/>
|
||||
<mkdir dir="${ivy.jar.dir}"/>
|
||||
<copy file="${cofoja.jar}" toFile="lib/cofoja.jar"/>
|
||||
|
||||
<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/${ivy.jar.file}"
|
||||
dest="${ivy.jar.dir}/${ivy.jar.file}"
|
||||
usetimestamp="true"/>
|
||||
|
|
@ -227,6 +228,10 @@
|
|||
<equals arg1="${gatk.target}" arg2="private" casesensitive="false" />
|
||||
</condition>
|
||||
|
||||
<condition property="include.contracts">
|
||||
<equals arg1="${use.contracts}" arg2="true" />
|
||||
</condition>
|
||||
|
||||
<!-- Create the build directory structure used by compile -->
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<mkdir dir="${java.classes}"/>
|
||||
|
|
@ -250,7 +255,7 @@
|
|||
<target name="init.scala.compile" depends="resolve"
|
||||
description="Initializes the scala ant tasks from scala-compiler.jar">
|
||||
<path id="scala.classpath">
|
||||
<fileset dir="lib">
|
||||
<fileset dir="${lib.dir}">
|
||||
<include name="scala-compiler-*.jar"/>
|
||||
<include name="scala-library-*.jar"/>
|
||||
</fileset>
|
||||
|
|
@ -285,7 +290,7 @@
|
|||
depends="gatk.compile.public.source,gatk.compile.private.source,gatk.compile.external.source"
|
||||
description="compile the GATK source" />
|
||||
|
||||
<target name="gatk.contracts.public" depends="gatk.compile.source">
|
||||
<target name="gatk.contracts.public" depends="gatk.compile.source" if="include.contracts">
|
||||
<javac fork="true" memoryMaximumSize="512m" srcdir="${java.public.source.dir}" destdir="${java.contracts}" debug="true" debuglevel="lines,vars,source" tempdir="${java.io.tmpdir}" >
|
||||
<classpath>
|
||||
<path refid="external.dependencies" />
|
||||
|
|
@ -297,7 +302,16 @@
|
|||
</javac>
|
||||
</target>
|
||||
|
||||
<target name="gatk.contracts.private" depends="gatk.compile.source" if="include.private">
|
||||
<target name="check.contracts.private" depends="gatk.contracts.public">
|
||||
<condition property="include.contracts.private">
|
||||
<and>
|
||||
<isset property="include.contracts" />
|
||||
<isset property="include.private" />
|
||||
</and>
|
||||
</condition>
|
||||
</target>
|
||||
|
||||
<target name="gatk.contracts.private" depends="check.contracts.private" if="include.contracts.private">
|
||||
<javac fork="true" memoryMaximumSize="512m" srcdir="${java.private.source.dir}" destdir="${java.contracts}" debug="true" debuglevel="lines,vars,source" tempdir="${java.io.tmpdir}" >
|
||||
<classpath>
|
||||
<path refid="external.dependencies" />
|
||||
|
|
@ -310,7 +324,7 @@
|
|||
</target>
|
||||
|
||||
<target name="gatk.contracts" depends="gatk.contracts.public,gatk.contracts.private"
|
||||
description="create GATK contracts" if="use.contracts" />
|
||||
description="create GATK contracts" if="include.contracts" />
|
||||
|
||||
<target name="gatk.compile" depends="tribble,init,resolve,gatk.compile.source,gatk.contracts" />
|
||||
|
||||
|
|
@ -448,7 +462,7 @@
|
|||
<target name="init.jar" depends="sting.compile,extracthelp">
|
||||
<mkdir dir="${dist.dir}"/>
|
||||
<copy todir="${dist.dir}">
|
||||
<fileset dir="lib" includes="*.jar"/>
|
||||
<fileset dir="${lib.dir}" includes="*.jar"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
|
|
@ -659,7 +673,7 @@
|
|||
<path refid="external.dependencies" />
|
||||
<pathelement location="${java.classes}"/>
|
||||
<pathelement location="${java.contracts}"/>
|
||||
<pathelement location="lib/testng-5.14.1.jar"/>
|
||||
<pathelement location="${lib.dir}/testng-5.14.1.jar"/>
|
||||
</classpath>
|
||||
<compilerarg value="-proc:none"/>
|
||||
<!--
|
||||
|
|
@ -682,7 +696,7 @@
|
|||
<path refid="scala.dependencies"/>
|
||||
<pathelement location="${scala.test.classes}"/>
|
||||
<pathelement location="${java.test.classes}"/>
|
||||
<pathelement location="lib/testng-5.14.1.jar"/>
|
||||
<pathelement location="${lib.dir}/testng-5.14.1.jar"/>
|
||||
</classpath>
|
||||
</scalac>
|
||||
</target>
|
||||
|
|
@ -722,9 +736,13 @@
|
|||
<equals arg1="${pipeline.run}" arg2="$${pipeline.run}" />
|
||||
</condition>
|
||||
|
||||
<condition property="cofoja.jvm.args" value="-javaagent:${cofoja.jar} -Dcom.google.java.contract.log.contract=false" else="">
|
||||
<isset property="include.contracts" />
|
||||
</condition>
|
||||
|
||||
<mkdir dir="${report}/@{testtype}"/>
|
||||
<echo message="Sting: Running @{testtype} test cases!"/>
|
||||
<taskdef resource="testngtasks" classpath="lib/testng-5.14.1.jar"/>
|
||||
<taskdef resource="testngtasks" classpath="${lib.dir}/testng-5.14.1.jar"/>
|
||||
<testng outputDir="${report}/@{testtype}"
|
||||
haltOnFailure="false" failureProperty="test.failure"
|
||||
verbose="2"
|
||||
|
|
@ -735,9 +753,7 @@
|
|||
<jvmarg value="-Djava.awt.headless=true" />
|
||||
<jvmarg value="-Dpipeline.run=${pipeline.run}" />
|
||||
<jvmarg value="-Djava.io.tmpdir=${java.io.tmpdir}" />
|
||||
<!-- needs to be if -->
|
||||
<!--jvmarg value="-javaagent:lib/cofoja.jar"/-->
|
||||
<!--jvmarg value="-Dcom.google.java.contract.log.contract=false"/-->
|
||||
<jvmarg line="${cofoja.jvm.args}"/>
|
||||
<!-- <jvmarg value="-Xdebug"/> -->
|
||||
<!-- <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/> -->
|
||||
<classpath>
|
||||
|
|
@ -815,7 +831,7 @@
|
|||
|
||||
<!-- copy the compiled library -->
|
||||
<target name="tribble.compile.copy" description="Copies the compiled tribble library" depends="tribble.compile" if="tribble.compile.exists">
|
||||
<copy todir="lib">
|
||||
<copy todir="${lib.dir}">
|
||||
<fileset dir="${tribble.dir}/dist" includes="*.jar"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
|
@ -823,7 +839,7 @@
|
|||
<!-- copy the precompiled library -->
|
||||
<target name="tribble.library.copy" description="Copies the precompiled tribble library" depends="tribble.init" unless="tribble.compile.exists">
|
||||
<echo message="Copying the Tribble Library..."/>
|
||||
<copy todir="lib">
|
||||
<copy todir="${lib.dir}">
|
||||
<fileset dir="settings/repository/org.broad" includes="tribble*.jar"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
|
@ -916,8 +932,8 @@
|
|||
<pathconvert property="required.picard.jars" pathsep=":">
|
||||
<fileset dir="${basedir}">
|
||||
<include name="staging" />
|
||||
<include name="lib/picard-*.*.*.jar" />
|
||||
<include name="lib/sam-*.jar" />
|
||||
<include name="${lib.dir}/picard-*.*.*.jar" />
|
||||
<include name="${lib.dir}/sam-*.jar" />
|
||||
</fileset>
|
||||
</pathconvert>
|
||||
<echo message="required.picard.jars=${required.picard.jars}" />
|
||||
|
|
@ -939,7 +955,7 @@
|
|||
<!-- Find bug tasks -->
|
||||
<!-- ******************************************************************************** -->
|
||||
<path id="findbugs.classpath">
|
||||
<fileset dir="lib" erroronmissingdir="true" includes="*.jar"/>
|
||||
<fileset dir="${lib.dir}" erroronmissingdir="true" includes="*.jar"/>
|
||||
</path>
|
||||
<target name="findbugs" depends="dist">
|
||||
<antcall target ="resolve">
|
||||
|
|
@ -964,7 +980,7 @@
|
|||
<target name="clean" description="clean up" depends="tribble.clean,clean.javadoc">
|
||||
<delete dir="out"/>
|
||||
<delete dir="${build.dir}"/>
|
||||
<delete dir="lib"/>
|
||||
<delete dir="${lib.dir}"/>
|
||||
<delete dir="staging"/>
|
||||
<delete dir="${dist.dir}"/>
|
||||
<delete dir="pipelinetests"/>
|
||||
|
|
|
|||
4
ivy.xml
4
ivy.xml
|
|
@ -63,6 +63,10 @@
|
|||
<dependency org="net.sourceforge.findbugs" name="jsr305" rev="1.3.2" conf="test"/>
|
||||
<dependency org="com.google.code.caliper" name="caliper" rev="1.0-SNAPSHOT" conf="test" />
|
||||
|
||||
<!-- 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" />
|
||||
|
||||
<!-- 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" />
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ public class AlleleCount extends VariantStratifier {
|
|||
|
||||
if (eval != null) {
|
||||
int AC = -1;
|
||||
if ( eval.hasAttribute("AC") )
|
||||
if ( eval.hasAttribute("AC") && eval.getAttribute("AC") instanceof Integer ) {
|
||||
AC = eval.getAttributeAsInt("AC");
|
||||
else if ( eval.isVariant() ) {
|
||||
} else if ( eval.isVariant() ) {
|
||||
for (Allele allele : eval.getAlternateAlleles())
|
||||
AC = Math.max(AC, eval.getChromosomeCount(allele));
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -82,19 +82,11 @@ public class VariantDataManager {
|
|||
}
|
||||
|
||||
foundZeroVarianceAnnotation = foundZeroVarianceAnnotation || (theSTD < 1E-6);
|
||||
if( annotationKeys.get(iii).toLowerCase().contains("ranksum") ) { // BUGBUG: to clean up
|
||||
for( final VariantDatum datum : data ) {
|
||||
if( datum.annotations[iii] > 0.0 ) { datum.annotations[iii] /= 3.0; }
|
||||
}
|
||||
}
|
||||
meanVector[iii] = theMean;
|
||||
varianceVector[iii] = theSTD;
|
||||
for( final VariantDatum datum : data ) {
|
||||
// Transform each data point via: (x - mean) / standard deviation
|
||||
datum.annotations[iii] = ( datum.isNull[iii] ? GenomeAnalysisEngine.getRandomGenerator().nextGaussian() : ( datum.annotations[iii] - theMean ) / theSTD );
|
||||
// Each data point is now [ (x - mean) / standard deviation ]
|
||||
if( annotationKeys.get(iii).toLowerCase().contains("ranksum") && datum.isNull[iii] && datum.annotations[iii] > 0.0 ) {
|
||||
datum.annotations[iii] /= 3.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( foundZeroVarianceAnnotation ) {
|
||||
|
|
@ -163,7 +155,7 @@ public class VariantDataManager {
|
|||
final int numBadSitesAdded = trainingData.size();
|
||||
logger.info( "Found " + numBadSitesAdded + " variants overlapping bad sites training tracks." );
|
||||
|
||||
// Next, sort the variants by the LOD coming from the positive model and add to the list the bottom X percent of variants
|
||||
// Next sort the variants by the LOD coming from the positive model and add to the list the bottom X percent of variants
|
||||
Collections.sort( data );
|
||||
final int numToAdd = Math.max( minimumNumber - trainingData.size(), Math.round((float)bottomPercentage * data.size()) );
|
||||
if( numToAdd > data.size() ) {
|
||||
|
|
@ -241,23 +233,15 @@ public class VariantDataManager {
|
|||
double value;
|
||||
|
||||
try {
|
||||
if( annotationKey.equalsIgnoreCase("QUAL") ) {
|
||||
value = vc.getPhredScaledQual();
|
||||
} else if( annotationKey.equalsIgnoreCase("DP") ) {
|
||||
value = Double.parseDouble( (String)vc.getAttribute( "DP" ) ) / Double.parseDouble( (String)vc.getAttribute( "AN" ) );
|
||||
} else {
|
||||
value = Double.parseDouble( (String)vc.getAttribute( annotationKey ) );
|
||||
if( Double.isInfinite(value) ) { value = Double.NaN; }
|
||||
if( annotationKey.equalsIgnoreCase("InbreedingCoeff") && value > 0.05 ) { value = Double.NaN; }
|
||||
if( jitter && annotationKey.equalsIgnoreCase("HRUN") ) { // Integer valued annotations must be jittered a bit to work in this GMM
|
||||
value += -0.25 + 0.5 * GenomeAnalysisEngine.getRandomGenerator().nextDouble();
|
||||
}
|
||||
if( annotationKey.equalsIgnoreCase("HaplotypeScore") && MathUtils.compareDoubles(value, 0.0, 0.0001) == 0 ) { value = -0.2 + 0.4*GenomeAnalysisEngine.getRandomGenerator().nextDouble(); }
|
||||
if( annotationKey.equalsIgnoreCase("FS") && MathUtils.compareDoubles(value, 0.0, 0.01) == 0 ) { value = -0.2 + 0.4*GenomeAnalysisEngine.getRandomGenerator().nextDouble(); }
|
||||
value = Double.parseDouble( (String)vc.getAttribute( annotationKey ) );
|
||||
if( Double.isInfinite(value) ) { value = Double.NaN; }
|
||||
if( jitter && annotationKey.equalsIgnoreCase("HRUN") ) { // Integer valued annotations must be jittered a bit to work in this GMM
|
||||
value += -0.25 + 0.5 * GenomeAnalysisEngine.getRandomGenerator().nextDouble();
|
||||
}
|
||||
|
||||
if( jitter && annotationKey.equalsIgnoreCase("HaplotypeScore") && MathUtils.compareDoubles(value, 0.0, 0.0001) == 0 ) { value = -0.2 + 0.4*GenomeAnalysisEngine.getRandomGenerator().nextDouble(); }
|
||||
if( jitter && annotationKey.equalsIgnoreCase("FS") && MathUtils.compareDoubles(value, 0.0, 0.001) == 0 ) { value = -0.2 + 0.4*GenomeAnalysisEngine.getRandomGenerator().nextDouble(); }
|
||||
} catch( Exception e ) {
|
||||
value = Double.NaN; // The VQSR works with missing data now by marginalizing over the missing dimension when evaluating Gaussians
|
||||
value = Double.NaN; // The VQSR works with missing data by marginalizing over the missing dimension when evaluating the Gaussian mixture model
|
||||
}
|
||||
|
||||
return value;
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ public class VariantRecalibrator extends RodWalker<ExpandingArrayList<VariantDat
|
|||
throw new UserException.CouldNotCreateOutputFile(RSCRIPT_FILE, "", e);
|
||||
}
|
||||
|
||||
// We make extensive use of the ggplot2 library: http://had.co.nz/ggplot2/
|
||||
// We make extensive use of the ggplot2 R library: http://had.co.nz/ggplot2/
|
||||
stream.println("library(ggplot2)");
|
||||
|
||||
createArrangeFunction( stream );
|
||||
|
|
@ -378,6 +378,7 @@ public class VariantRecalibrator extends RodWalker<ExpandingArrayList<VariantDat
|
|||
}
|
||||
}
|
||||
|
||||
// The Arrange function is how we place the 4 model plots on one page
|
||||
// from http://gettinggeneticsdone.blogspot.com/2010/03/arrange-multiple-ggplot2-plots-in-same.html
|
||||
private void createArrangeFunction( final PrintStream stream ) {
|
||||
stream.println("vp.layout <- function(x, y) viewport(layout.pos.row=x, layout.pos.col=y)");
|
||||
|
|
@ -402,5 +403,4 @@ public class VariantRecalibrator extends RodWalker<ExpandingArrayList<VariantDat
|
|||
stream.println("}");
|
||||
stream.println("}");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public class VariantRecalibratorArgumentCollection {
|
|||
@Argument(fullName="priorCounts", shortName="priorCounts", doc="The number of prior counts to use in variational Bayes algorithm.", required=false)
|
||||
public double PRIOR_COUNTS = 20.0;
|
||||
@Argument(fullName="percentBadVariants", shortName="percentBad", doc="What percentage of the worst scoring variants to use when building the Gaussian mixture model of bad variants. 0.07 means bottom 7 percent.", required=false)
|
||||
public double PERCENT_BAD_VARIANTS = 0.015;
|
||||
public double PERCENT_BAD_VARIANTS = 0.03;
|
||||
@Argument(fullName="minNumBadVariants", shortName="minNumBad", doc="The minimum amount of worst scoring variants to use when building the Gaussian mixture model of bad variants. Will override -percentBad arugment if necessary.", required=false)
|
||||
public int MIN_NUM_BAD_VARIANTS = 2000;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ public abstract class AbstractVCFCodec implements FeatureCodec, NameAwareCodec,
|
|||
loc = pos + alleles.get(0).length() - 1;
|
||||
} else if ( !isSingleNucleotideEvent(alleles) ) {
|
||||
ArrayList<Allele> newAlleles = new ArrayList<Allele>();
|
||||
loc = clipAlleles(pos, ref, alleles, newAlleles);
|
||||
loc = clipAlleles(pos, ref, alleles, newAlleles, lineNo);
|
||||
alleles = newAlleles;
|
||||
}
|
||||
|
||||
|
|
@ -504,7 +504,7 @@ public abstract class AbstractVCFCodec implements FeatureCodec, NameAwareCodec,
|
|||
* @param clippedAlleles output list of clipped alleles
|
||||
* @return a list of alleles, clipped to the reference
|
||||
*/
|
||||
protected static long clipAlleles(long position, String ref, List<Allele> unclippedAlleles, List<Allele> clippedAlleles) {
|
||||
protected static long clipAlleles(long position, String ref, List<Allele> unclippedAlleles, List<Allele> clippedAlleles, int lineNo) {
|
||||
|
||||
// Note that the computation of forward clipping here is meant only to see whether there is a common
|
||||
// base to all alleles, and to correctly compute reverse clipping,
|
||||
|
|
@ -522,6 +522,8 @@ public abstract class AbstractVCFCodec implements FeatureCodec, NameAwareCodec,
|
|||
}
|
||||
if (a.length() - reverseClipped <= forwardClipping || a.length() - forwardClipping == 0)
|
||||
clipping = false;
|
||||
else if (ref.length() == reverseClipped)
|
||||
generateException("bad alleles encountered", lineNo);
|
||||
else if (a.getBases()[a.length()-reverseClipped-1] != ref.getBytes()[ref.length()-reverseClipped-1])
|
||||
clipping = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -133,8 +133,12 @@ public class Haplotype {
|
|||
|
||||
|
||||
byte[] basesBeforeVariant = Arrays.copyOfRange(refBases,startIdxInReference,startIdxInReference+numPrefBases);
|
||||
int startAfter = startIdxInReference+numPrefBases+ refAllele.getBases().length;
|
||||
// protect against long events that overrun available reference context
|
||||
if (startAfter > refBases.length)
|
||||
startAfter = refBases.length;
|
||||
byte[] basesAfterVariant = Arrays.copyOfRange(refBases,
|
||||
startIdxInReference+numPrefBases+ refAllele.getBases().length, refBases.length);
|
||||
startAfter, refBases.length);
|
||||
|
||||
|
||||
// Create location for all haplotypes
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@ import java.io.*;
|
|||
import java.math.BigInteger;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -107,6 +111,57 @@ public abstract class BaseTest {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple generic utility class to creating TestNG data providers:
|
||||
*
|
||||
* 1: inherit this class, as in
|
||||
*
|
||||
* private class SummarizeDifferenceTest extends TestDataProvider {
|
||||
* public SummarizeDifferenceTest() {
|
||||
* super(SummarizeDifferenceTest.class);
|
||||
* }
|
||||
* ...
|
||||
* }
|
||||
*
|
||||
* Provide a reference to your class to the TestDataProvider constructor.
|
||||
*
|
||||
* 2: Create instances of your subclass. Return from it the call to getTests, providing
|
||||
* the class type of your test
|
||||
*
|
||||
* @DataProvider(name = "summaries")
|
||||
* public Object[][] createSummaries() {
|
||||
* new SummarizeDifferenceTest().addDiff("A", "A").addSummary("A:2");
|
||||
* new SummarizeDifferenceTest().addDiff("A", "B").addSummary("A:1", "B:1");
|
||||
* return SummarizeDifferenceTest.getTests(SummarizeDifferenceTest.class);
|
||||
* }
|
||||
*
|
||||
* This class magically tracks created objects of this
|
||||
*/
|
||||
public static class TestDataProvider {
|
||||
private static final Map<Class, List<Object>> tests = new HashMap<Class, List<Object>>();
|
||||
|
||||
/**
|
||||
* Create a new TestDataProvider instance bound to the class variable C
|
||||
* @param c
|
||||
*/
|
||||
public TestDataProvider(Class c) {
|
||||
if ( ! tests.containsKey(c) )
|
||||
tests.put(c, new ArrayList<Object>());
|
||||
tests.get(c).add(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all of the data providers in the form expected by TestNG of type class C
|
||||
* @param c
|
||||
* @return
|
||||
*/
|
||||
public static Object[][] getTests(Class c) {
|
||||
List<Object[]> params2 = new ArrayList<Object[]>();
|
||||
for ( Object x : tests.get(c) ) params2.add(new Object[]{x});
|
||||
return params2.toArray(new Object[][]{});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* test if the file exists
|
||||
*
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
##fileformat=VCFv4.0
|
||||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NA12878
|
||||
chr1 2646 rs62635284 G A 0.15 PASS AC=2;AF=1.00;AN=2 GT:AD:DP:GL:GQ 1/1:53,75:3:-12.40,-0.90,-0.00:9.03
|
||||
chr1 2979 rs62635286 T G 83.67 PASS AC=2;AF=1.00;AN=2 GT:AD:DP:GL:GQ 1/1:31,32:9:-33.61,-2.71,-0.00:27.09
|
||||
chr1 2981 rs62028691 A G 14.69 PASS AC=2;AF=1.00;AN=2 GT:AD:DP:GL:GQ 1/1:31,33:9:-32.12,-2.71,-0.00:27.08
|
||||
chr1 4536 rs11582131 G C 0.18 PASS AC=1;AF=0.50;AN=2 GT:AD:DP:GL:GQ 0/1:42,33:16:-41.67,-4.82,-26.29:99
|
||||
chr1 4562 rs11490464 C G 0.14 PASS AC=1;AF=0.50;AN=2 GT:AD:DP:GL:GQ 0/1:26,30:9:-19.64,-2.72,-14.87:99
|
||||
chr1 4770 rs6682375 A G 0.32 PASS AC=2;AF=1.00;AN=2 GT:AD:DP:GL:GQ 1/1:9,111:84:-306.27,-28.58,-3.46:99
|
||||
chr1 4793 rs6682385 A G 0.15 PASS AC=2;AF=1.00;AN=2 GT:AD:DP:GL:GQ 1/1:4,115:109:-350.74,-32.88,-0.10:99
|
||||
chr1 5074 rs11586607 T G 0.01 PASS AC=2;AF=1.00;AN=2 GT:AD:DP:GL:GQ 1/1:29,97:39:-130.41,-11.75,-3.82:79.31
|
||||
chr1 5137 rs62636497 A T 140.49 PASS AC=2;AF=1.00;AN=2 GT:AD:DP:GL:GQ 1/1:0,74:39:-148.99,-11.75,-0.01:99
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
##fileformat=VCFv4.0
|
||||
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NA12878
|
||||
chr1 2646 rs62635284 G A 0.15 PASS AC=2;AF=1.00;AN=2 GT:AD:DP:GL:GQ 1/1:53,75:3:-12.40,-0.90,-0.00:9.03
|
||||
chr1 2979 rs62635286 T G 83.67 CHANGED_FILTER AC=2;AF=1.00;AN=2 GT:AD:DP:GL:GQ 1/1:31,32:9:-33.61,-2.71,-0.00:27.09
|
||||
chr1 2981 rs62028691 A G 14.69 PASS AC=2;AF=1.00;AN=2 GT:AD:DP:GL:GQ 1/1:31,33:9:-32.12,-2.71,-0.00:27.08
|
||||
chr1 4536 rs11582131 G C 0.18 PASS AC=2;AF=0.50;AN=2 GT:AD:DP:GL:GQ 0/1:42,33:16:-41.67,-4.82,-26.29:99
|
||||
chr1 4562 rs11490464 C G 0.14 PASS AC=1;AF=0.50;AN=2 GT:AD:DP:GL:GQ 1/1:26,30:9:-19.64,-2.72,-14.87:99
|
||||
chr1 4770 rs6682375 A G 0.32 PASS AC=2;AF=1.00;AN=2 GT:AD:DP:GL:GQ 0/1:9,111:84:-306.27,-28.58,-3.46:99
|
||||
chr1 4793 rs6682385 A G 0.15 PASS AC=2;AF=1.00;AN=2 GT:AD:DP:GL:GQ 1/1:4,114:109:-350.74,-32.88,-0.10:99
|
||||
chr1 5074 rs11586607 T G 0.01 PASS AC=2;AF=1.00;AN=2 GT:AD:DP:GL:GQ 1/1:29,97:39:-130.41,-11.74,-3.82:79.31
|
||||
chr1 5137 rs62636497 A T 140.49 PASS AC=2;AF=1.00;AN=2 GT:AD:DP:GL:GQ 1/1:0,74:39:-148.99,-11.75,-0.01:9
|
||||
|
|
@ -26,5 +26,6 @@
|
|||
<module organisation="net.java.dev.jna" resolver="maven2-repository.dev.java.net" />
|
||||
<module organisation="com.google.code.caliper" resolver="projects" />
|
||||
<module organisation="net.sf.gridscheduler" resolver="projects" />
|
||||
<module organisation="com.google.code.cofoja" resolver="projects" />
|
||||
</modules>
|
||||
</ivysettings>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
<ivy-module version="1.0">
|
||||
<info organisation="com.google.code.cofoja" module="cofoja" revision="1.0-20110609" status="integration" publication="20110609114800" />
|
||||
</ivy-module>
|
||||
Loading…
Reference in New Issue