My samples have been sequenced with the Twist Exome 2.0 sequencing panel, and I want to assess how efficient the sequencing has been. By efficient, I mean examining metrics such as the uniformity (fold-80 score), coverage, on/off-target % etc. as documented in their webpage. I checked the % off-target as follows:
Count the # of reads in the bam file (
samtools view -c "$dir/$base.bam)
Count the # of reads that intersect with the bed region (
bedtools intersect -a "$dir/$base.bam" -b $bed -u | samtools view -c -)
Calculate the % off-target rate as (
bc -l <<< "(1 - ($bed_reads / $total_reads)) * 100")
I have two questions:
- Is there a cleaner/simpler way to calculate the off-target rate? I know I can calculate the on-target rate with
bedtools coverage, but I am not sure of how to calculate the off-target rate with a single command line.
- I obtained an off-target rate of approximately 20-25% for my samples. Is this within the "good" off-target % range?