I am looking for an efficient/simple way for extracting genome coverage for each strand(+/- ) in a given range (for example 25-34) of read length. My input is sorted BAM file (Ribo-Seq data) and as a measure of coverage I would like to get 5' positions of each read.
bedtools genomecov solves half of problem
bedtools genomecov -d -5 -ibam my_sorted.bam -strand + -g genome.fa > output_plus.txt
but I didn't found an option to do it on a base of read length. Is there some simple solution what can be apply on command line?