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:

  1. Count the # of reads in the bam file (samtools view -c "$dir/$base.bam)

  2. Count the # of reads that intersect with the bed region (bedtools intersect -a "$dir/$base.bam" -b $bed -u | samtools view -c -)

  3. Calculate the % off-target rate as (bc -l <<< "(1 - ($bed_reads / $total_reads)) * 100")

I have two questions:

  1. 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.
  2. I obtained an off-target rate of approximately 20-25% for my samples. Is this within the "good" off-target % range?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.