CountCovariates now sorts the list of standard covariate classes coming from PackageUtils.getClassesImplementingInterface(). As a result some of the integration tests now make use of -standard
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2817 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
6652b992f7
commit
0b1e243a7b
|
|
@ -165,14 +165,25 @@ public class CovariateCounterWalker extends LocusWalker<Integer, PrintStream> {
|
||||||
}
|
}
|
||||||
// Next add the standard covariates if -standard was specified by the user
|
// Next add the standard covariates if -standard was specified by the user
|
||||||
if( USE_STANDARD_COVARIATES ) {
|
if( USE_STANDARD_COVARIATES ) {
|
||||||
|
// We want the standard covariates to appear in a consistent order but the packageUtils method gives a random order
|
||||||
|
// A list of Classes can't be sorted, but a list of Class names can be
|
||||||
|
final List<String> standardClassNames = new ArrayList<String>();
|
||||||
for( Class<?> covClass : standardClasses ) {
|
for( Class<?> covClass : standardClasses ) {
|
||||||
try {
|
standardClassNames.add( covClass.getName() );
|
||||||
final Covariate covariate = (Covariate)covClass.newInstance();
|
}
|
||||||
requestedCovariates.add( covariate );
|
Collections.sort(standardClassNames); // Sort the list of class names
|
||||||
} catch ( InstantiationException e ) {
|
for( String className : standardClassNames ) {
|
||||||
throw new StingException( String.format("Can not instantiate covariate class '%s': must be concrete class.", covClass.getSimpleName()) );
|
for( Class<?> covClass : standardClasses ) { // Find the class that matches this class name
|
||||||
} catch ( IllegalAccessException e ) {
|
if( covClass.getName().equals( className ) ) {
|
||||||
throw new StingException( String.format("Can not instantiate covariate class '%s': must have no-arg constructor.", covClass.getSimpleName()) );
|
try {
|
||||||
|
final Covariate covariate = (Covariate)covClass.newInstance();
|
||||||
|
requestedCovariates.add( covariate );
|
||||||
|
} catch ( InstantiationException e ) {
|
||||||
|
throw new StingException( String.format("Can not instantiate covariate class '%s': must be concrete class.", covClass.getSimpleName()) );
|
||||||
|
} catch ( IllegalAccessException e ) {
|
||||||
|
throw new StingException( String.format("Can not instantiate covariate class '%s': must have no-arg constructor.", covClass.getSimpleName()) );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public class VariantEvalWalker extends RodWalker<Integer, Integer> {
|
||||||
@Argument(shortName="printVariants", doc="If true, prints the variants in all of the variant tracks that are examined", required=false)
|
@Argument(shortName="printVariants", doc="If true, prints the variants in all of the variant tracks that are examined", required=false)
|
||||||
public boolean printVariants = false;
|
public boolean printVariants = false;
|
||||||
|
|
||||||
@Argument(shortName="badHWEThreshold", doc="Only sites with deviations froim Hardy-Weinberg equilibrium with P-values < than this threshold are flagged", required=false)
|
@Argument(shortName="badHWEThreshold", doc="Only sites with deviations from Hardy-Weinberg equilibrium with P-values < than this threshold are flagged", required=false)
|
||||||
public double badHWEThreshold = 1e-3;
|
public double badHWEThreshold = 1e-3;
|
||||||
|
|
||||||
@Argument(fullName="evalContainsGenotypes", shortName = "G", doc="If true, the input list of variants will be treated as a genotyping file, containing assertions of actual genotype values for a particular person. Analyses that only make sense on at the population level will be disabled, while those operating on genotypes will be enabled", required=false)
|
@Argument(fullName="evalContainsGenotypes", shortName = "G", doc="If true, the input list of variants will be treated as a genotyping file, containing assertions of actual genotype values for a particular person. Analyses that only make sense on at the population level will be disabled, while those operating on genotypes will be enabled", required=false)
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import org.reflections.scanners.SubTypesScanner;
|
||||||
import org.reflections.util.AbstractConfiguration;
|
import org.reflections.util.AbstractConfiguration;
|
||||||
import org.reflections.util.ClasspathHelper;
|
import org.reflections.util.ClasspathHelper;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
|
||||||
|
|
@ -123,10 +123,7 @@ public class RecalibrationWalkersIntegrationTest extends WalkerTest {
|
||||||
" --DBSNP /humgen/gsa-scr1/GATK_Data/dbsnp_129_b36.rod" +
|
" --DBSNP /humgen/gsa-scr1/GATK_Data/dbsnp_129_b36.rod" +
|
||||||
" -T CountCovariates" +
|
" -T CountCovariates" +
|
||||||
" -I " + bam +
|
" -I " + bam +
|
||||||
" -cov ReadGroupCovariate" +
|
" -standard" +
|
||||||
" -cov QualityScoreCovariate" +
|
|
||||||
" -cov CycleCovariate" +
|
|
||||||
" -cov DinucCovariate" +
|
|
||||||
" -U" +
|
" -U" +
|
||||||
" -L 1:10,000,000-20,000,000" +
|
" -L 1:10,000,000-20,000,000" +
|
||||||
" --solid_recal_mode REMOVE_REF_BIAS" +
|
" --solid_recal_mode REMOVE_REF_BIAS" +
|
||||||
|
|
@ -184,10 +181,7 @@ public class RecalibrationWalkersIntegrationTest extends WalkerTest {
|
||||||
" -T CountCovariates" +
|
" -T CountCovariates" +
|
||||||
" -I " + bam +
|
" -I " + bam +
|
||||||
" -L 1:10,000,000-10,200,000" +
|
" -L 1:10,000,000-10,200,000" +
|
||||||
" -cov ReadGroupCovariate" +
|
" -standard" +
|
||||||
" -cov QualityScoreCovariate" +
|
|
||||||
" -cov CycleCovariate" +
|
|
||||||
" -cov DinucCovariate" +
|
|
||||||
" --solid_recal_mode SET_Q_ZERO" +
|
" --solid_recal_mode SET_Q_ZERO" +
|
||||||
" -recalFile %s",
|
" -recalFile %s",
|
||||||
1, // just one output file
|
1, // just one output file
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue