interim commit
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3240 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
f0fe2ea530
commit
121163dd49
|
|
@ -27,6 +27,7 @@ import java.util.*;
|
||||||
* @Author chartl
|
* @Author chartl
|
||||||
* @Date Apr 21, 2010
|
* @Date Apr 21, 2010
|
||||||
*/
|
*/
|
||||||
|
@Reference(window=@Window(start=-40,stop=40))
|
||||||
public class IndelDBRateWalker extends RodWalker<OverlapTable,OverlapTabulator> {
|
public class IndelDBRateWalker extends RodWalker<OverlapTable,OverlapTabulator> {
|
||||||
|
|
||||||
@Argument(fullName="indelWindow",doc="size of the window in which to look for indels; max 40",required=false)
|
@Argument(fullName="indelWindow",doc="size of the window in which to look for indels; max 40",required=false)
|
||||||
|
|
@ -125,7 +126,7 @@ public class IndelDBRateWalker extends RodWalker<OverlapTable,OverlapTabulator>
|
||||||
}
|
}
|
||||||
// step 3: see if there are any contexts left; if so then they must be within the window
|
// step 3: see if there are any contexts left; if so then they must be within the window
|
||||||
if ( ! compContexts.isEmpty() ) {
|
if ( ! compContexts.isEmpty() ) {
|
||||||
return nonEmptyOverlapTable();
|
return nonEmptyOverlapTable(ref);
|
||||||
} else {
|
} else {
|
||||||
return emptyOverlapTable();
|
return emptyOverlapTable();
|
||||||
}
|
}
|
||||||
|
|
@ -138,14 +139,14 @@ public class IndelDBRateWalker extends RodWalker<OverlapTable,OverlapTabulator>
|
||||||
return ot;
|
return ot;
|
||||||
}
|
}
|
||||||
|
|
||||||
public OverlapTable nonEmptyOverlapTable() {
|
public OverlapTable nonEmptyOverlapTable(ReferenceContext ref) {
|
||||||
if ( vcfWriter != null ) {
|
if ( vcfWriter != null ) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while ( i < compContexts.size() && compContexts.get(i).getLocation().isBefore(evalContexts.get(0).getLocation())) {
|
while ( i < compContexts.size() && compContexts.get(i).getLocation().isBefore(evalContexts.get(0).getLocation())) {
|
||||||
vcfWriter.addRecord(VariantContextAdaptors.toVCF(compContexts.get(i),(char)compContexts.get(i).getReference().getBases()[0]));
|
vcfWriter.addRecord(VariantContextAdaptors.toVCF(compContexts.get(i),(char)compContexts.get(i).getReference().getBases()[0]));
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
vcfWriter.addRecord(VariantContextAdaptors.toVCF(evalContexts.get(0),(char) evalContexts.get(0).getReference().getBases()[0]));
|
vcfWriter.addRecord(VariantContextAdaptors.toVCF(evalContexts.get(0),ref.getBase()));
|
||||||
while ( i < compContexts.size() && compContexts.get(i).getLocation().distance(evalContexts.get(0).getLocation()) <= indelWindow) {
|
while ( i < compContexts.size() && compContexts.get(i).getLocation().distance(evalContexts.get(0).getLocation()) <= indelWindow) {
|
||||||
vcfWriter.addRecord(VariantContextAdaptors.toVCF(compContexts.get(i),(char) compContexts.get(i).getReference().getBases()[0]));
|
vcfWriter.addRecord(VariantContextAdaptors.toVCF(compContexts.get(i),(char) compContexts.get(i).getReference().getBases()[0]));
|
||||||
i++;
|
i++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue