How to count (depth) of the read last (or first) base per position and not reads per position?
I need to identify the mRNA boundaries to see events of splicing.
How to count (depth) of the read last (or first) base per position and not reads per position?
I need to identify the mRNA boundaries to see events of splicing.
Hi,
If you have your sam/bam files, you can calculate the depth using samtools.
http://www.htslib.org/doc/samtools.html
Tarek
But depth commonly means: N of reads that map in a X position.
I need N of read match end (or N of read match start) in a X position.
Dealing with CIGAR is a little troublesome, so I am asking if there is a tool or option that can do this.
TIA Christian
I once wrote a script to do that. See: https://github.com/asafpr/RNAseq_scripts/blob/master/sam_to_wiggle_coverage.py
You can run it with -f flag to count only the first position of the read, -r should read the first position of the second read or the end of the read. Please go over the script since I haven't used it for quite a while and it comes without responsibility.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.