# the case of 3 regions ABC that are in the input file as ACB as it goes now when processing C there
# will be no merge with A as B is needed to bridge the two. When it comes time to process B it will
# be merged with A but that will exit the loop and the merge with C will be missed.
+ #TODO: QForAli - Are we going to require sorted region files to have this even work?
for regionEntry in regionList:
if regionEntry[0] == "#":
if "pvalue" in regionEntry:
# implementing a triangular smooth
smoothArray = array("f", [0.] * length)
+ #TODO: QForAli - really? We're going to insert MANUFACTURED data (0.0's) and use them in the calculation
+ # (probably) just to avoid IndexError exceptions. Then we are going to completely ignore adjusting the
+ # last 2 elements of the array for (probably) the same issue. Is this how erange is dealing with the
+ # edge cases?
for pos in range(2,length -2):
smoothArray[pos] = (seqArray[pos -2] + 2 * seqArray[pos - 1] + 3 * seqArray[pos] + 2 * seqArray[pos + 1] + seqArray[pos + 2]) / 9.0