I have a bedgraph file with 4 columns - Chr, Start, End, Value.
I want to go through the 4th column and sum each row in that column until I have reached a certain value then print that row.
so for instance - Sum column until you a reached a value of 100 then print that entire line
I have done a little scripting but I just can't think how to do this. If someone could help me with an AWK command that would do this that would be great. If you ha the time to break down & explain the command a little that would be a bonus!