Hello there,
I used the multiIntersectBed tool to find the overlapping regions between 5 BED files below, which has a common region of overlap between chr22:24,119,495-24,126,702 involving 4 BED files.
When I ran multiIntersectBed, I noticed two things: (1) It identified the region of overlap between chr22:24,115,623-24,126,702 involving only 2 BED files; (2) The output was not sorted by chromosome, which prompted me to think that may be it was not sorting the contents of multiple files correctly.
When I create BED files with the entries from chr22 only, then the overlap result looks OK.
Below, I show the contents of all BED files, and how I ran multiIntersectBed tool, and the output file content.
Could you please take a look and let me know what is going on?
Thank you,
Elizabeth
> cat a.bed
22 24115623 24126702
> cat b.bed
1 28496 109092
> cat c.bed
1 564190 569884
22 23057818 23332540
22 23332541 24809382
22 24809383 25035966
> cat d.bed
6 162733091 162787714
22 24119495 24129657
> cat e.bed
3 60231378 60335915
4 1534933 2243243
22 19940225 20492436
22 20704584 21465947
22 21649054 23280752
22 23280753 24800557
22 24800558 24888638
> ~/bedtools-2.17.0/bin/multiIntersectBed -header -names a b c d e -i a.bed b.bed c.bed d.bed e.bed > overlap.txt
> cat overlap.txt
chrom start end num list a b c d e
1 28496 109092 1 b 0 1 0 0 0
1 564190 569884 1 c 0 0 1 0 0
22 23057818 23332540 1 c 0 0 1 0 0
22 23332541 24115623 1 c 0 0 1 0 0
22 24115623 24126702 2 a,c 1 0 1 0 0
22 24126702 24809382 1 c 0 0 1 0 0
22 24809383 25035966 1 c 0 0 1 0 0
3 60231378 60335915 1 e 0 0 0 0 1
4 1534933 2243243 1 e 0 0 0 0 1
22 19940225 20492436 1 e 0 0 0 0 1
22 20704584 21465947 1 e 0 0 0 0 1
22 21649054 23280752 1 e 0 0 0 0 1
22 23280753 24800557 1 e 0 0 0 0 1
22 24800558 24888638 1 e 0 0 0 0 1
6 162733091 162787714 1 d 0 0 0 1 0
22 24119495 24129657 1 d 0 0 0 1 0
============= Testing with BED files with chr22 only ==============
> cat a.bed
chr22 24115623 24126702
> cat b.bed
chr22 23057818 23332540
chr22 23332541 24809382
chr22 24809383 25035966
> cat c.bed
chr22 24119495 24129657
> cat d.bed
chr22 19940225 20492436
chr22 20704584 21465947
chr22 21649054 23280752
chr22 23280753 24800557
chr22 24800558 24888638
> ~/bedtools-2.17.0/bin/multiIntersectBed -header -names a b c d -i a.bed b.bed c.bed d.bed > overlap.txt
> cat overlap.txt
chrom start end num list a b c d
chr22 19940225 20492436 1 d 0 0 0 1
chr22 20704584 21465947 1 d 0 0 0 1
chr22 21649054 23057818 1 d 0 0 0 1
chr22 23057818 23280752 2 b,d 0 1 0 1
chr22 23280752 23280753 1 b 0 1 0 0
chr22 23280753 23332540 2 b,d 0 1 0 1
chr22 23332540 23332541 1 d 0 0 0 1
chr22 23332541 24115623 2 b,d 0 1 0 1
chr22 24115623 24119495 3 a,b,d 1 1 0 1
chr22 24119495 24126702 4 a,b,c,d 1 1 1 1
chr22 24126702 24129657 3 b,c,d 0 1 1 1
chr22 24129657 24800557 2 b,d 0 1 0 1
chr22 24800557 24800558 1 b 0 1 0 0
chr22 24800558 24809382 2 b,d 0 1 0 1
chr22 24809382 24809383 1 d 0 0 0 1
chr22 24809383 24888638 2 b,d 0 1 0 1
chr22 24888638 25035966 1 b 0 1 0 0
--
You received this message because you are subscribed to the Google Groups "bedtools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bedtools-discu...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.