I am trying to match the gene name in a file with a region in a bed file using bepmap, but I can not get it to work. For example, PTPN11 is a gene in the sort_gene.bed, but I do not see it in the output of the bedmap. However, I know that the gene is part of the probes.bed it just doesn't map there in bedmap. Thank you :).
bedmap --echo --skip-unmapped --delim '\t' --echo-map-id-uniq unix_sort_3column_xgen_probes.bed sort_gene.bed > answer.bed
sort_gene.bed
chr12 112418350 112418404 PTPN11
chr12 112418562 112419081 PTPN11
chr12 112418727 112418838 RPL6
chr12 112418908 112419125 PTPN11
chr12 112418913 112419125 PTPN11
chr12 112419111 112419114 PTPN11
chr12 112419111 112419114 PTPN11
chr12 112419111 112419125 PTPN11
chr12 112419111 112419125 PTPN11
chr12 112446275 112446398 PTPN11
chr12 112446275 112446398 PTPN11
chr12 112446275 112446398 PTPN11
chr12 112446275 112446398 PTPN11
chr12 112450317 112450512 PTPN11
chr12 112450317 112450512 PTPN11
chr12 112450317 112450512 PTPN11
chr12 112450317 112450512 PTPN11
chr12 112453194 112453387 PTPN11
chr12 112453194 112453387 PTPN11
chr12 112453194 112453387 PTPN11
chr12 112453194 112453387 PTPN11
chr12 112453328 112453387 PTPN11
chr12 112453328 112453387 PTPN11
chr12 112454563 112454680 PTPN11
chr12 112454563 112454680 PTPN11
chr12 112454563 112454680 PTPN11
chr12 112454563 112454680 PTPN11
chr12 112454563 112454680 PTPN11
chr12 112454563 112454680 PTPN11
chr12 112455949 112456063 PTPN11
chr12 112455949 112456063 PTPN11
chr12 112455949 112456063 PTPN11
chr12 112455949 112456063 PTPN11
chr12 112455949 112456063 PTPN11
chr12 112455949 112456063 PTPN11
chr12 112457290 112457323 PTPN11
chr12 112457290 112457486 PTPN11
chr12 112457323 112457326 PTPN11
chr12 112472943 112473040 PTPN11
chr12 112472943 112473040 PTPN11
chr12 112472943 112473040 PTPN11
chr12 112472943 112473040 PTPN11
chr12 112477650 112477730 PTPN11
chr12 112477650 112477730 PTPN11
chr12 112477650 112477730 PTPN11
chr12 112477650 112477730 PTPN11
chr12 112477856 112478015 PTPN11
chr12 112477856 112478015 PTPN11
chr12 112477856 112478015 PTPN11
chr12 112477856 112478015 PTPN11
chr12 112482073 112482205 PTPN11
chr12 112482073 112482205 PTPN11
chr12 112482073 112482205 PTPN11
chr12 112482073 112482205 PTPN11
chr12 112486474 112486629 PTPN11
chr12 112486474 112486629 PTPN11
chr12 112486474 112486630 PTPN11
chr12 112486474 112486923 PTPN11
chr12 112486630 112486633 PTPN11
chr12 112488442 112488510 PTPN11
chr12 112488442 112488510 PTPN11
chr12 112489023 112489175 PTPN11
chr12 112489023 112489175 PTPN11
chr12 112502143 112502256 PTPN11
chr12 112502143 112502256 PTPN11
chr12 112504694 112504761 PTPN11
chr12 112504694 112504796 PTPN11
chr12 112504761 112504764 PTPN11
chr12 112505824 112509913 PTPN11
unix_3column_xgen_probes.bed
(small subset of file)
chr12 112230476 112230596
chr12 112235871 112235991
chr12 112235936 112236056
chr12 112237699 112237819
chr12 112237757 112237877
chr12 112241652 112241772
chr12 112241667 112241787
chr12 112247303 112247423
chr12 112843303 112843423
chr12 112884064 112884184
chr12 112884097 112884217
chr12 112888106 112888226
chr12 112888211 112888331
chr12 112890983 112891103
chr12 112891086 112891206
chr12 112892352 112892472
chr12 112892379 112892499
chr12 112893738 112893858
chr12 112893762 112893882
chr12 112915434 112915554
chr12 112915645 112915765
chr12 112915714 112915834
chr12 112919862 112919982
chr12 112919904 112920024
chr12 112924263 112924383
chr12 112924328 112924448
chr12 112926220 112926340
chr12 112926812 112926932
chr12 112926874 112926994
chr12 112939932 112940052
chr12 112939955 112940075
chr12 112942473 112942593
Try bedtools intersect.
The genomic regions in your two files do not seem to overlap, therefore,
bedmap
will not (cannot) by default report any mapped elements.Did you follow the advice I gave in a previous answer, where you use
bedops --element-of 1
to test if there are overlaps? See: bedops command to map bed to genesI imagine other tools would not be able to repeat what
bedmap
does, either, unless there are overlaps or data you're not showing.If you want to post your files somewhere accessible (like a Public sub-folder in a Dropbox account) then I can take a closer look on this end.