LIBS is totally busted for deletions. Putting a check in AD for bad pileup event bases so that we don't produce busted alleles. We must fix LIBS ASAP.
This commit is contained in:
parent
dcc972a557
commit
3d476487c6
|
|
@ -318,6 +318,7 @@ public class LocusIteratorByState extends LocusIterator {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (op == CigarOperator.D) {
|
if (op == CigarOperator.D) {
|
||||||
|
// TODO -- LIBS is totally busted for deletions so that reads with Ds right before Is in their CIGAR are broken; must fix
|
||||||
if (readInfo.includeReadsWithDeletionAtLoci()) { // only add deletions to the pileup if we are authorized to do so
|
if (readInfo.includeReadsWithDeletionAtLoci()) { // only add deletions to the pileup if we are authorized to do so
|
||||||
pile.add(new PileupElement(read, readOffset, true, isBeforeDeletion, isAfterDeletion, isBeforeInsertion, isAfterInsertion, isNextToSoftClip, null, nextOp == CigarOperator.D ? nextElementLength : -1));
|
pile.add(new PileupElement(read, readOffset, true, isBeforeDeletion, isAfterDeletion, isBeforeInsertion, isAfterInsertion, isNextToSoftClip, null, nextOp == CigarOperator.D ? nextElementLength : -1));
|
||||||
size++;
|
size++;
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,11 @@ public class DepthPerAlleleBySample extends GenotypeAnnotation implements Standa
|
||||||
for ( PileupElement p : pileup ) {
|
for ( PileupElement p : pileup ) {
|
||||||
if ( p.isBeforeInsertion() ) {
|
if ( p.isBeforeInsertion() ) {
|
||||||
|
|
||||||
final Allele insertion = Allele.create((char)refBase + p.getEventBases(), false);
|
final String eventBases = p.getEventBases();
|
||||||
|
if ( eventBases == null )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
final Allele insertion = Allele.create((char)refBase + eventBases, false);
|
||||||
if ( alleleCounts.containsKey(insertion) ) {
|
if ( alleleCounts.containsKey(insertion) ) {
|
||||||
alleleCounts.put(insertion, alleleCounts.get(insertion)+1);
|
alleleCounts.put(insertion, alleleCounts.get(insertion)+1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue