Un-reinventing the wheel. --sleep argument removed.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2227 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
938017d887
commit
dec0a781c2
|
|
@ -64,10 +64,6 @@ public class GATKArgumentCollection {
|
|||
@Argument(fullName = "intervals", shortName = "L", doc = "A list of genomic intervals over which to operate. Can be explicitly specified on the command line or in a file.", required = false)
|
||||
public List<String> intervals = null;
|
||||
|
||||
@ElementList(required = false)
|
||||
@Argument(fullName = "sleep", doc = "If provided, the engine will sleep for this number of milliseconds before starting the analysis -- useful for debugging", required = false)
|
||||
public long sleep = 0;
|
||||
|
||||
@Element(required = false)
|
||||
@Argument(fullName = "reference_sequence", shortName = "R", doc = "Reference sequence file", required = false)
|
||||
public File referenceFile = null;
|
||||
|
|
@ -223,9 +219,6 @@ public class GATKArgumentCollection {
|
|||
if (other.walkerArgs.size() != walkerArgs.size()) {
|
||||
return false;
|
||||
}
|
||||
if (other.sleep != sleep) {
|
||||
return false;
|
||||
}
|
||||
for (String s : walkerArgs.keySet()) {
|
||||
if (!other.walkerArgs.containsKey(s)) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -136,14 +136,6 @@ public class GenomeAnalysisEngine {
|
|||
// save our argument parameter
|
||||
this.argCollection = args;
|
||||
|
||||
if ( args.sleep > 0 ) {
|
||||
try {
|
||||
Thread.sleep(args.sleep);
|
||||
} catch ( InterruptedException e ) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare the data for traversal.
|
||||
initializeDataSources(my_walker, filters, argCollection);
|
||||
|
||||
|
|
|
|||
|
|
@ -33,13 +33,6 @@ public class SecondBaseSkew implements VariantAnnotation {
|
|||
public String annotate(ReferenceContext ref, ReadBackedPileup pileup, Variation variation, List<Genotype> genotypes) {
|
||||
if ( variation.isSNP() && variation.isBiallelic() ) {
|
||||
char snp = variation.getAlternativeBaseForSNP();
|
||||
// try {
|
||||
// System.out.printf("snp %c, alt is %c%n", snp, getNonref(genotypes, ref.getBase()));
|
||||
// } catch (IllegalStateException e) {
|
||||
// System.out.printf("%s is not biallelic%n", variation.toString());
|
||||
// return null;
|
||||
// }
|
||||
|
||||
Pair<Integer,Double> depthProp = getSecondaryPileupNonrefEstimator(ref.getBase(), pileup, snp);
|
||||
if ( depthProp == null ) {
|
||||
return null;
|
||||
|
|
@ -79,21 +72,10 @@ public class SecondBaseSkew implements VariantAnnotation {
|
|||
}
|
||||
|
||||
if ( variantDepth > 0 ) {
|
||||
//System.out.printf("%d %d %d %d%n", primaryPileup.length, secondaryPileup.length, variantDepth, variantsWithRefSecondBase );
|
||||
double biasedProportion = ( 1.0 + variantsWithRefSecondBase )/(1.0 + variantDepth );
|
||||
return new Pair<Integer,Double>(variantDepth+1, biasedProportion);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private char getNonref(List<Genotype> genotypes, char ref) {
|
||||
for ( Genotype g : genotypes ) {
|
||||
if ( g.isVariant(ref) ) {
|
||||
return g.toVariation(ref).getAlternativeBaseForSNP();
|
||||
}
|
||||
}
|
||||
|
||||
throw new IllegalStateException("List of genotypes did not contain a variant.");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue