Questions about the map function in RealignerTargetCreator.java

PengWeiPRCPengWeiPRC United StatesMember

Hello,

I have read the source code of RealignerTargetCreator, and got some questions in some points. I think that the first thing the map function of this tool does is traversing all the variant contexts associated with this locus and finding the longest one so as to update the variable "furthestStopPos". However, the source code below shows that the variable will be updated for every INDEL/MIXED variant context, rather than find the largest one and update it. Did I misunderstand the code or there is something wrong with this snippet?

In addition, for the expression "VariantContext vc : tracker.getValues(known)", I read the source code of ReferenceMetaDataTracker and found that the method "getValues" returned a list of all the variant contexts included in the "known" list. Does it mean that for each locus the map function has to traverse all the variants contexts no matter whether they are associated with this locus?

Thanks very much.

if ( tracker != null ) {
for ( VariantContext vc : tracker.getValues(known) ) {
switch ( vc.getType() ) {
case INDEL:
hasIndel = true;
if ( vc.isSimpleInsertion() )
hasInsertion = true;
break;
case SNP:
hasPointEvent = true;
break;
case MIXED:
hasPointEvent = true;
hasIndel = true;
if ( vc.isSimpleInsertion() )
hasInsertion = true;
break;
default:
break;
}
if ( hasIndel )
furthestStopPos = vc.getEnd();
}
}

Answers

Sign In or Register to comment.