Merged bug fix from Stable into Unstable
This commit is contained in:
commit
252e0f3d0a
|
|
@ -361,6 +361,10 @@ public class IndelGenotypeLikelihoodsCalculationModel extends GenotypeLikelihood
|
||||||
final int hsize = (int)ref.getWindow().size()-Math.abs(eventLength)-1;
|
final int hsize = (int)ref.getWindow().size()-Math.abs(eventLength)-1;
|
||||||
final int numPrefBases= ref.getLocus().getStart()-ref.getWindow().getStart()+1;
|
final int numPrefBases= ref.getLocus().getStart()-ref.getWindow().getStart()+1;
|
||||||
|
|
||||||
|
if (hsize <=0) {
|
||||||
|
logger.warn(String.format("Warning: event at location %s can't be genotyped, skipping",loc.toString()));
|
||||||
|
return null;
|
||||||
|
}
|
||||||
haplotypeMap = Haplotype.makeHaplotypeListFromAlleles(alleleList, loc.getStart(),
|
haplotypeMap = Haplotype.makeHaplotypeListFromAlleles(alleleList, loc.getStart(),
|
||||||
ref, hsize, numPrefBases);
|
ref, hsize, numPrefBases);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,7 @@ public class GenomeLocParser {
|
||||||
return vglHelper(exceptOnError, String.format("Unknown contig %s", contig));
|
return vglHelper(exceptOnError, String.format("Unknown contig %s", contig));
|
||||||
|
|
||||||
if (stop < start)
|
if (stop < start)
|
||||||
return vglHelper(exceptOnError, String.format("The stop position %d is less than start %d", stop, start));
|
return vglHelper(exceptOnError, String.format("The stop position %d is less than start %d in contig %s", stop, start, contig));
|
||||||
|
|
||||||
if (contigIndex < 0)
|
if (contigIndex < 0)
|
||||||
return vglHelper(exceptOnError, String.format("The contig index %d is less than 0", contigIndex));
|
return vglHelper(exceptOnError, String.format("The contig index %d is less than 0", contigIndex));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue