Made the fact to add condition clearer.
Added variables for window and slide. Also changed checks (while loops) and increments accordingly.
Added comment on need to rethink reverse strand gradient check
added gradient checks
Started new loop for dir = 1;
introduced "run" variable for gradient calculation instead of "seq(xx:xy)";
added check on "gradient still positive" rule to account for i > N
Reintroduced low value check