Created
February 2, 2018 17:33
-
-
Save srividya22/13f18be50692b931e1a03ba1ccacbfbf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Links: | |
http://quinlanlab.org/tutorials/bedtools/bedtools.html | |
Use Case 1: Given a.bam and b.regions.bed. how to get the parts of b.regions.bed that are not covered by a.bam? | |
Answer: | |
bedtools genomecov -ibam aln.bam -bga \ | |
| awk '$4==0' | | |
| bedtools intersect -a regions -b - > foo | |
Option -bga Report depth in BedGraph format, as above (i.e., -bg). However with this option, regions with zero coverage are also reported. This allows one to quickly extract all regions of a genome with 0 coverage by applying: “grep -w 0$” to the output. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment