Merge pull request #807 from broadinstitute/rhl_handle_cigar
Process X and = CIGAR operators
This commit is contained in:
commit
b8b23b931e
|
|
@ -101,6 +101,8 @@ public class BQSRIntegrationTest extends WalkerTest {
|
|||
|
||||
private static final String HiSeqBam = privateTestDir + "HiSeq.1mb.1RG.bam";
|
||||
private static final String HiSeqInterval = "chr1:10,000,000-10,100,000";
|
||||
private static final String SimpleCigarMatchMismatchBam = privateTestDir + "simpleCigarMatchMismatch.bam";
|
||||
private static final String SimpleCigarMatchMismatchInterval = "1:1-60";
|
||||
|
||||
@DataProvider(name = "BQSRTest")
|
||||
public Object[][] createBQSRTestData() {
|
||||
|
|
@ -112,6 +114,7 @@ public class BQSRIntegrationTest extends WalkerTest {
|
|||
{new BQSRTest(hg18Reference, HiSeqBam, HiSeqInterval, " --low_quality_tail 5", "b74e75f3c5aa90bd21af1e20f2ac8c40")},
|
||||
{new BQSRTest(hg18Reference, HiSeqBam, HiSeqInterval, " --quantizing_levels 6", "e564505aea11464de8ed72890d9ea89a")},
|
||||
{new BQSRTest(hg18Reference, HiSeqBam, HiSeqInterval, " --mismatches_context_size 4", "380d8be121ffaddd3461ee0ac3d1a76f")},
|
||||
{new BQSRTest(b36KGReference, SimpleCigarMatchMismatchBam, SimpleCigarMatchMismatchInterval, "", "56dfb2918a4cdae3ef9d705a43e85194")},
|
||||
{new BQSRTest(b36KGReference, validationDataLocation + "NA12892.SLX.SRP000031.2009_06.selected.1Mb.1RG.bam", "1:10,000,000-10,200,000", "", "0b5a8e259e997e4c7b5836d4c28e6f4d")},
|
||||
{new BQSRTest(b36KGReference, validationDataLocation + "NA19240.chr1.BFAST.SOLID.bam", "1:10,000,000-10,200,000", "", "281682124584ab384f23359934df0c3b")},
|
||||
{new BQSRTest(b36KGReference, validationDataLocation + "NA12873.454.SRP000031.2009_06.chr1.10_20mb.1RG.bam", "1:10,000,000-10,200,000", "", "0a92fdff5fd26227c29d34eda5a32f49")},
|
||||
|
|
|
|||
|
|
@ -109,11 +109,13 @@ public class ReadClippingStats extends ReadWalker<ReadClippingStats.ReadClipping
|
|||
info.nClippingEvents++;
|
||||
info.nClippedBases += elt.getLength();
|
||||
break;
|
||||
case M :
|
||||
case EQ : // sequence match
|
||||
case M : // alignment match
|
||||
case D : // deletion w.r.t. the reference
|
||||
case P : // ignore pads
|
||||
case I : // insertion w.r.t. the reference
|
||||
case N : // reference skip (looks and gets processed just like a "deletion", just different logical meaning)
|
||||
case X : // sequence mismatch
|
||||
break;
|
||||
default : throw new IllegalStateException("Case statement didn't deal with cigar op: " + elt.getOperator());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -625,7 +625,7 @@ public class BAQ {
|
|||
readI += l;
|
||||
break;
|
||||
case D : refI += l; break;
|
||||
case M :
|
||||
case M : case EQ: case X:
|
||||
for (int i = readI; i < readI + l; i++) {
|
||||
int expectedPos = refI - refOffset + (i - readI);
|
||||
baqResult.bq[i] = capBaseByBAQ( baqResult.rawQuals[i], baqResult.bq[i], baqResult.state[i], expectedPos );
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ public class BAQUnitTest extends BaseTest {
|
|||
"A?>>@>AA?@@>A?>A@?>@>>?=>?'>?=>7=?A9"));
|
||||
|
||||
// raw base qualities are low -- but they shouldn't be capped
|
||||
params.add(new BAQTest(-3, 9999993l, "36M",
|
||||
params.add(new BAQTest(-3, 9999993l, "4=13X2=3X1=4X2=4X1=2X",
|
||||
"CCACCACGCCTGGCCAATTTTTTTGTATTTTTAGTAGAGATA",
|
||||
"CCACGCTTGGCAAAGTTTTCCGTACGTTTAGCCGAG",
|
||||
"33'/(7+270&4),(&&-)$&,%7$',-/61(,6?8",
|
||||
|
|
|
|||
Loading…
Reference in New Issue