Better error message for bad qual
This commit is contained in:
parent
953592421b
commit
6db3e473af
|
|
@ -425,7 +425,7 @@ public class DiploidSNPGenotypeLikelihoods implements Cloneable {
|
||||||
byte qual = p.getQual();
|
byte qual = p.getQual();
|
||||||
|
|
||||||
if ( qual > SAMUtils.MAX_PHRED_SCORE )
|
if ( qual > SAMUtils.MAX_PHRED_SCORE )
|
||||||
throw new UserException.MalformedBAM(p.getRead(), String.format("the maximum allowed quality score is %d, but a quality of %d was observed in read %s. Perhaps your BAM incorrectly encodes the quality scores in Sanger format; see http://en.wikipedia.org/wiki/FASTQ_format for more details", SAMUtils.MAX_PHRED_SCORE, qual, p.getRead().getReadName()));
|
throw new UserException.MisencodedBAM(p.getRead(), "we encountered an extremely high quality score (" + (int)qual + ")");
|
||||||
if ( capBaseQualsAtMappingQual )
|
if ( capBaseQualsAtMappingQual )
|
||||||
qual = (byte)Math.min((int)qual, p.getMappingQual());
|
qual = (byte)Math.min((int)qual, p.getMappingQual());
|
||||||
if ( (int)qual < minBaseQual )
|
if ( (int)qual < minBaseQual )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue