Hello all!
I wish you read this post are safe and good luck.
I have one question about plotting coverage plot.
Many tools have a fragment length option such as -FL or -L. In this length option, if I shorten to only 1bp, where is this 1bp of mapped read? 5' or 3' or middle sequence ?
The reason why I have a question about that is I want to draw coverage plot centered only 5' sequence. But I have no idea setting fragment option. There is no detailed explanation about length!
So, I want to make BAM files converting to only 5' sequnece included. Is it possible to convert original BAM file to conserve BAM format? If not, is there any good suggestion about plotting with only 5' of mapped reads? I couldn't find those tools such as samtools and sambamba.
Thank you for reading!
I think the best tool for your use case would be bedtools genomecov with options
-ibam -bg -5
. It will read an .bam file and output the coverage of read 5' ends in bedgraph format (which you can easily load in a genome browser).