Fixed an issue where asking for the alternate alleles at hom-ref sites would result in an array out-of-bounds exception.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3292 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
a462b5e1e7
commit
510b3efcc2
|
|
@ -147,13 +147,15 @@ public class VCFSubsetWalker extends RodWalker<ArrayList<VCFRecord>, VCFWriter>
|
|||
VCFRecord subset = subsetRecord(record);
|
||||
|
||||
boolean isVariant = false;
|
||||
for ( VCFGenotypeEncoding ge : subset.getVCFGenotypeRecords().get(0).getAlleles() ) {
|
||||
if (!record.getReference().equals(ge.getBases())) {
|
||||
isVariant = true;
|
||||
|
||||
if (subset.getVCFGenotypeRecords().size() > 0) {
|
||||
for ( VCFGenotypeEncoding ge : subset.getVCFGenotypeRecords().get(0).getAlleles() ) {
|
||||
if (!record.getReference().equals(ge.getBases())) {
|
||||
isVariant = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//if (isVariant && !subset.isFiltered()) {
|
||||
if ((isVariant || INCLUDE_NON_VARIANTS) && (!subset.isFiltered() || INCLUDE_FILTERED)) {
|
||||
if (vwriter != null) {
|
||||
vwriter.addRecord(subset);
|
||||
|
|
|
|||
Loading…
Reference in New Issue