src/main/viz/pileuputils.js
function getArrowIndex(read: Alignment): number {
  var i, op, ops = read.cigarOps;
  if (read.getStrand() == '-') {
    for (i = 0; i < ops.length; i++) {
      op = ops[i];
      if (op.op == 'S') continue;
      if (op.op == 'M') return i;
      return -1;
    }
  } else {
    for (i = ops.length - 1; i >= 0; i--) {
      op = ops[i];
      if (op.op == 'S') continue;
      if (op.op == 'M') return i;
      return -1;
    }
  }
  return -1;
}
function getArrowIndex(read: Alignment): number {
  var i, op, ops = read.cigarOps;
  if (read.getStrand() == '-') {
    for (i = 0; i < ops.length; i++) {
      op = ops[i];
      if (op.op == 'S') continue;
      if (op.op == 'M') return i;
      return -1;
    }
  } else {
    for (i = ops.length - 1; i >= 0; i--) {
      op = ops[i];
      if (op.op == 'S') continue;
      if (op.op == 'M') return i;
      return -1;
    }
  }
  return -1;
}
function getArrowIndex ( read : Alignment ) : number { var i , op , ops = read . cigarOps ; if ( read . getStrand ( ) == '-' ) { for ( i = 0 ; i < ops . length ; i ++ ) { op = ops [ i ] ; if ( op . op == 'S' ) continue ; if ( op . op == 'M' ) return i ; return - 1 ; } } else { for ( i = ops . length - 1 ; i >= 0 ; i -- ) { op = ops [ i ] ; if ( op . op == 'S' ) continue ; if ( op . op == 'M' ) return i ; return - 1 ; } } return - 1 ; }
Determine which alignment segment to render as an arrow. This is either the first or last 'M' section, excluding soft clipping.
Determine which alignment segment to render as an arrow . This is either the first or last M section excluding soft clipping .