Renaming for consistency
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3049 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
4c4d048f14
commit
4d4db7fe63
|
|
@ -13,7 +13,7 @@ public class ClusteredSnps {
|
|||
throw new IllegalArgumentException("Window and threshold values need to be positive values");
|
||||
}
|
||||
|
||||
public boolean filter(VariantContextWindow contextWindow) {
|
||||
public boolean filter(FiltrationContextWindow contextWindow) {
|
||||
|
||||
FiltrationContext[] variants = contextWindow.getWindow(snpThreshold-1, snpThreshold-1);
|
||||
for (int i = 0; i < snpThreshold; i++) {
|
||||
|
|
@ -28,4 +28,4 @@ public class ClusteredSnps {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import java.util.*;
|
|||
* @version 0.1
|
||||
*/
|
||||
|
||||
public class VariantContextWindow {
|
||||
public class FiltrationContextWindow {
|
||||
|
||||
/**
|
||||
* The variants.
|
||||
|
|
@ -48,7 +48,7 @@ public class VariantContextWindow {
|
|||
* Contructor for a variant context.
|
||||
* @param firstVariants the first set of variants, comprising the right half of the window
|
||||
*/
|
||||
public VariantContextWindow(List<FiltrationContext> firstVariants) {
|
||||
public FiltrationContextWindow(List<FiltrationContext> firstVariants) {
|
||||
int windowSize = (firstVariants == null ? 1 : 2 * firstVariants.size() + 1);
|
||||
currentContext = (firstVariants == null ? 0 : firstVariants.size());
|
||||
window.addAll(firstVariants);
|
||||
|
|
@ -99,4 +99,4 @@ public class VariantContextWindow {
|
|||
window.removeFirst();
|
||||
window.addLast(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -55,7 +55,7 @@ public class VariantFiltrationWalker extends RodWalker<Integer, Integer> {
|
|||
}
|
||||
|
||||
// the structures necessary to initialize and maintain a windowed context
|
||||
private VariantContextWindow variantContextWindow;
|
||||
private FiltrationContextWindow variantContextWindow;
|
||||
private static final int windowSize = 10; // 10 variants on either end of the current one
|
||||
private ArrayList<FiltrationContext> windowInitializer = new ArrayList<FiltrationContext>();
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ public class VariantFiltrationWalker extends RodWalker<Integer, Integer> {
|
|||
if ( windowInitializer != null ) {
|
||||
windowInitializer.add(varContext);
|
||||
if ( windowInitializer.size() == windowSize ) {
|
||||
variantContextWindow = new VariantContextWindow(windowInitializer);
|
||||
variantContextWindow = new FiltrationContextWindow(windowInitializer);
|
||||
windowInitializer = null;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -194,7 +194,7 @@ public class VariantFiltrationWalker extends RodWalker<Integer, Integer> {
|
|||
if ( windowInitializer != null ) {
|
||||
while ( windowInitializer.size() < windowSize )
|
||||
windowInitializer.add(null);
|
||||
variantContextWindow = new VariantContextWindow(windowInitializer);
|
||||
variantContextWindow = new FiltrationContextWindow(windowInitializer);
|
||||
}
|
||||
for (int i=0; i < windowSize; i++) {
|
||||
variantContextWindow.moveWindow(null);
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@ import org.broadinstitute.sting.gatk.contexts.*;
|
|||
import org.broadinstitute.sting.gatk.refdata.*;
|
||||
import org.broadinstitute.sting.gatk.refdata.utils.RODRecordList;
|
||||
import org.broadinstitute.sting.gatk.walkers.*;
|
||||
import org.broadinstitute.sting.gatk.walkers.filters.ClusteredSnps;
|
||||
import org.broadinstitute.sting.gatk.walkers.filters.VariantContextWindow;
|
||||
import org.broadinstitute.sting.gatk.datasources.simpleDataSources.ReferenceOrderedDataSource;
|
||||
import org.broadinstitute.sting.utils.*;
|
||||
import org.broadinstitute.sting.utils.genotype.vcf.*;
|
||||
|
|
@ -134,4 +132,4 @@ public class VCFSelectWalker extends RodWalker<Integer, Integer> {
|
|||
if ( writer != null )
|
||||
writer.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue