Awesome!
Thanks, it worked perfectly.
Since the order won't change, I have pasted this two columns to my reference.bed file like this:
$ bedmap --echo-overlap-size reference.bed map.bed | awk '{ s=0; t=0; n=split($0, a, ";"); for(i = 1; i <= n; i++) { if(a[i] > 100) { s += a[i]; t++; } } printf("%d %d\n", s, t); }' > tmp
$ paste reference.bed tmp
Please use the formatting bar (especially the
codeoption) to present your post better. I've done it for you this time.Thanks! I will next time, sorry about that.