Small fixes for consistency in the numbers.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4103 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
7bbd67f3c4
commit
cba5f05538
|
|
@ -97,6 +97,10 @@ public class IndelConsistencyReadCounter extends ReadWalker<Integer, Integer> {
|
||||||
private static boolean containsIndel(final SAMRecord r, final VariantContext vc) {
|
private static boolean containsIndel(final SAMRecord r, final VariantContext vc) {
|
||||||
int indelStart = vc.getStart() + 1;
|
int indelStart = vc.getStart() + 1;
|
||||||
int readPos = r.getAlignmentStart();
|
int readPos = r.getAlignmentStart();
|
||||||
|
|
||||||
|
if ( vc.isInsertion() && indelStart == readPos )
|
||||||
|
return true;
|
||||||
|
|
||||||
final Cigar cigar = r.getCigar();
|
final Cigar cigar = r.getCigar();
|
||||||
|
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
|
@ -106,7 +110,6 @@ public class IndelConsistencyReadCounter extends ReadWalker<Integer, Integer> {
|
||||||
switch ( ce.getOperator() ) {
|
switch ( ce.getOperator() ) {
|
||||||
case M:
|
case M:
|
||||||
case I:
|
case I:
|
||||||
case S:
|
|
||||||
readPos += ce.getLength();
|
readPos += ce.getLength();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,9 @@ public class RealignedReadCounter extends ReadWalker<Integer, Integer> {
|
||||||
|
|
||||||
private int getIndelSize(SAMRecord read) {
|
private int getIndelSize(SAMRecord read) {
|
||||||
for ( CigarElement ce : read.getCigar().getCigarElements() ) {
|
for ( CigarElement ce : read.getCigar().getCigarElements() ) {
|
||||||
if ( ce.getOperator() == CigarOperator.I || ce.getOperator() == CigarOperator.D )
|
if ( ce.getOperator() == CigarOperator.I )
|
||||||
|
return 0;
|
||||||
|
if ( ce.getOperator() == CigarOperator.D )
|
||||||
return ce.getLength();
|
return ce.getLength();
|
||||||
}
|
}
|
||||||
logger.warn("We didn't see an indel for this read: " + read.getReadName() + " " + read.getAlignmentStart() + " " + read.getCigar());
|
logger.warn("We didn't see an indel for this read: " + read.getReadName() + " " + read.getAlignmentStart() + " " + read.getCigar());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue