Thank you very much for your reply, I'm not interested in simple depth but I need to quantify mismatches. I have edited the question too.
Hi all, I hope everyone is doing great. may I ask if anyone knows how can I get perbase base-depth function? I have followed the instruction in https://github.com/sstadick/perbase and downloaded it by conda install -c bioconda perbase. The help function shows that only simple-depth function is included and it doesn't support lots of options like selecting specific region or filtering according to the base quality and I need these for my analysis.
Ps: I need to quantify mismatches like A-G or T-C mismatches.
an example of the output of perbase base-depth is below
and that is why I'm interested specifically in perbase. your help is much appreciated.
Best regards, Surar.
2 answers
Hi all, I would like to share the solution if anybody has the same issue. the problem was I had installed an old version of perbase and all I needed was to reinstall the tool using conda install -c bioconda perbase=0.8.1 and now I have all the functions required. Thanks Surar
samtools depth -r 'chr1:234-456' -q 78 in.bam
Another way is to subset bam based on your requirements and pass that bam to perbase app.
Thanks cpad0112, is there any tools that filter according to single base quality from bam? because I need to exclude the low quality and N bases before the analysis.
try sambamba and filter syntax and parameters is here: https://github.com/biod/sambamba/wiki/%5Bsambamba-view%5D-Filter-expression-syntax. Base quality filtering should have been done at fastq instead at bam level. At this point, most of the filters work at mapping quality.
see also sam2tsv: http://lindenb.github.io/jvarkit/Sam2Tsv.html
Log in to answer this question.
IGVtools gives per base depth at any given position (from bam files).