Last active
September 5, 2022 10:42
-
-
Save elowy01/43b617f8eb4b9e47927dbfac56d37136 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# merge | |
bedtools merge -i ifile.bed -c 4 -o collapse # print the merged feature names (4th column) | |
# intersect | |
$ cat A.bed | |
chr1 10 20 | |
chr1 30 40 | |
$ cat B.bed | |
chr1 15 20 | |
$ bedtools intersect -a A.bed -b B.bed -wa # print only intersecting entry in A.bed | |
chr1 10 20 | |
$ bedtools intersect -a A.bed -b B.bed -wa -wb # print both intersecting entries in A.bed and B.bed | |
chr1 10 20 chr1 15 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment