Bug fixes to hapmap conversion in VariantsToVCF
This commit is contained in:
parent
43625f652e
commit
ac99437eec
|
|
@ -364,7 +364,7 @@ public class VariantContextAdaptors {
|
||||||
|
|
||||||
long end = hapmap.getEnd();
|
long end = hapmap.getEnd();
|
||||||
if ( deletionLength > 0 )
|
if ( deletionLength > 0 )
|
||||||
end += deletionLength;
|
end += (deletionLength - 1);
|
||||||
VariantContext vc = new VariantContextBuilder(name, hapmap.getChr(), hapmap.getStart(), end, alleles).id(hapmap.getName()).genotypes(genotypes).make();
|
VariantContext vc = new VariantContextBuilder(name, hapmap.getChr(), hapmap.getStart(), end, alleles).id(hapmap.getName()).genotypes(genotypes).make();
|
||||||
return vc;
|
return vc;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ public class VariantsToVCF extends RodWalker<Integer, Integer> {
|
||||||
|
|
||||||
Map<String, Allele> alleleMap = new HashMap<String, Allele>(2);
|
Map<String, Allele> alleleMap = new HashMap<String, Allele>(2);
|
||||||
alleleMap.put(RawHapMapFeature.DELETION, Allele.create(ref.getBase(), dbsnpVC.isSimpleInsertion()));
|
alleleMap.put(RawHapMapFeature.DELETION, Allele.create(ref.getBase(), dbsnpVC.isSimpleInsertion()));
|
||||||
alleleMap.put(RawHapMapFeature.INSERTION, Allele.create(ref.getBase() + ((RawHapMapFeature)record).getAlleles()[1], !dbsnpVC.isSimpleInsertion()));
|
alleleMap.put(RawHapMapFeature.INSERTION, Allele.create((char)ref.getBase() + ((RawHapMapFeature)record).getAlleles()[1], !dbsnpVC.isSimpleInsertion()));
|
||||||
hapmap.setActualAlleles(alleleMap);
|
hapmap.setActualAlleles(alleleMap);
|
||||||
|
|
||||||
// also, use the correct positioning for insertions
|
// also, use the correct positioning for insertions
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue