I forget why I thought that the VariantAnnotator couldn't run multi-threaded because it works just fine. Now you can specify -nt with VA.
This commit is contained in:
parent
b15b62157a
commit
4f7fa3009a
|
|
@ -82,7 +82,7 @@ import java.util.*;
|
||||||
@Allows(value={DataSource.READS, DataSource.REFERENCE})
|
@Allows(value={DataSource.READS, DataSource.REFERENCE})
|
||||||
@Reference(window=@Window(start=-50,stop=50))
|
@Reference(window=@Window(start=-50,stop=50))
|
||||||
@By(DataSource.REFERENCE)
|
@By(DataSource.REFERENCE)
|
||||||
public class VariantAnnotator extends RodWalker<Integer, Integer> implements AnnotatorCompatible {
|
public class VariantAnnotator extends RodWalker<Integer, Integer> implements AnnotatorCompatible, TreeReducible<Integer> {
|
||||||
|
|
||||||
@ArgumentCollection
|
@ArgumentCollection
|
||||||
protected StandardVariantContextInputArgumentCollection variantCollection = new StandardVariantContextInputArgumentCollection();
|
protected StandardVariantContextInputArgumentCollection variantCollection = new StandardVariantContextInputArgumentCollection();
|
||||||
|
|
@ -275,14 +275,6 @@ public class VariantAnnotator extends RodWalker<Integer, Integer> implements Ann
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize the number of loci processed to zero.
|
|
||||||
*
|
|
||||||
* @return 0
|
|
||||||
*/
|
|
||||||
public Integer reduceInit() { return 0; }
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We want reads that span deletions
|
* We want reads that span deletions
|
||||||
*
|
*
|
||||||
|
|
@ -323,15 +315,15 @@ public class VariantAnnotator extends RodWalker<Integer, Integer> implements Ann
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@Override
|
||||||
* Increment the number of loci processed.
|
public Integer reduceInit() { return 0; }
|
||||||
*
|
|
||||||
* @param value result of the map.
|
@Override
|
||||||
* @param sum accumulator for the reduce.
|
public Integer reduce(Integer value, Integer sum) { return value + sum; }
|
||||||
* @return the new number of loci processed.
|
|
||||||
*/
|
@Override
|
||||||
public Integer reduce(Integer value, Integer sum) {
|
public Integer treeReduce(Integer lhs, Integer rhs) {
|
||||||
return sum + value;
|
return lhs + rhs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testTabixAnnotations() {
|
public void testTabixAnnotationsAndParallelism() {
|
||||||
final String MD5 = "99938d1e197b8f10c408cac490a00a62";
|
final String MD5 = "99938d1e197b8f10c408cac490a00a62";
|
||||||
for ( String file : Arrays.asList("CEU.exon.2010_03.sites.vcf", "CEU.exon.2010_03.sites.vcf.gz")) {
|
for ( String file : Arrays.asList("CEU.exon.2010_03.sites.vcf", "CEU.exon.2010_03.sites.vcf.gz")) {
|
||||||
WalkerTestSpec spec = new WalkerTestSpec(
|
WalkerTestSpec spec = new WalkerTestSpec(
|
||||||
|
|
@ -159,6 +159,12 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
|
||||||
Arrays.asList(MD5));
|
Arrays.asList(MD5));
|
||||||
executeTest("Testing lookup vcf tabix vs. vcf tribble", spec);
|
executeTest("Testing lookup vcf tabix vs. vcf tribble", spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WalkerTestSpec spec = new WalkerTestSpec(
|
||||||
|
baseTestString() + " -A HomopolymerRun -nt 2 --variant:vcf " + validationDataLocation + "CEU.exon.2010_03.sites.vcf -L " + validationDataLocation + "CEU.exon.2010_03.sites.vcf --no_cmdline_in_header", 1,
|
||||||
|
Arrays.asList(MD5));
|
||||||
|
|
||||||
|
executeTest("Testing lookup vcf tabix vs. vcf tribble plus parallelism", spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue