After fixing a few glitches and bugs, this version finally works as intended

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1952 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
asivache 2009-10-31 04:59:58 +00:00
parent 7d0ac7c6f2
commit 4b0796ba58
1 changed files with 4 additions and 2 deletions

View File

@ -624,6 +624,7 @@ public class IndelGenotyperV2Walker extends ReadWalker<Integer,Integer> {
//if ( pos == 3534096 ) System.out.println("pos="+pos +" total reads: "+context.getReads().size());
Iterator<ExpandedSAMRecord> read_iter = context.getReads().iterator();
while ( read_iter.hasNext() ) {
ExpandedSAMRecord rec = read_iter.next();
SAMRecord read = rec.getSAMRecord();
@ -631,6 +632,7 @@ public class IndelGenotyperV2Walker extends ReadWalker<Integer,Integer> {
byte[] quals = rec.getExpandedQuals();
int mm = rec.getMMCount();
if( read.getAlignmentStart() > pos || read.getAlignmentEnd() < pos ) continue;
long local_right = right; // end of nqs window for this particular read. May need to be advanced further right
@ -638,9 +640,9 @@ public class IndelGenotyperV2Walker extends ReadWalker<Integer,Integer> {
// automatically since flags/quals are set to -1 there
boolean read_has_a_variant = false;
boolean read_has_consensus = ( consensus_indel!= null && consensus_indel.getReadSet().contains(read) );
boolean read_has_consensus = ( consensus_indel!= null && consensus_indel.getReadSet().contains(rec) );
for ( IndelVariant v : variants ) {
if ( v.getReadSet().contains(read) ) {
if ( v.getReadSet().contains(rec) ) {
read_has_a_variant = true;
local_right += v.lengthOnRef();
break;