Hi all,
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?
2 answers
With alfred it would be a single command:
alfred qc -b hg38.twist.bed -r hg38.fa -j qc.json.gz -o qc.tsv.gz wes.bam
Depending on the WES kit, off-target reads are often close to target regions. That's why, alfred calculates directly on target (+/-0bp) and then gradually extends target regions. The JSON while can be uploaded at https://www.gear-genomics.com/alfred/ for interactive browsing or on the command-line:
zgrep "^OT" qc.tsv.gz
for the first question, please see Picard tools like CollectHsMetrics:
For second question we need more information to make a clear judgment on the sample
Log in to answer this question.
better/faster ?: