Thank you for your reply. Since there was one chromosome starting with a number I just added a character to it. Your code did not work for me so I did the adding manually. This is the stdout:
bedtools intersect -a Gallone_hints.bed -b reference_TE_locations.bed
***** WARNING: File Gallone_hints.bed has inconsistent naming convention for record:
c2micron 1674 4928 . 0 . b2h intron . pri=4;src=E
chrI 22231 22552 . 0 . b2h intron . mult=2;pri=4;src=E
chrI 22231 22552 . 0 . b2h intron . mult=3;pri=4;src=E
chrI 22231 22552 . 0 . b2h intron . pri=4;src=E
chrI 22231 22552 . 0 . b2h intron . pri=4;src=E
chrI 22231 22552 . 0 . b2h intron . mult=3;pri=4;src=E
chrI 22231 22552 . 0 . b2h intron . pri=4;src=E
chrI 22231 22552 . 0 . b2h intron . pri=4;src=E
chrI 22231 22552 . 0 . b2h intron . mult=6;pri=4;src=E
chrXVI 856550 856747 . 0 . b2h intron . mult=3;pri=4;src=E
chrXVI 850624 856550 . 0 . b2h intron . mult=3;pri=4;src=E
chrXVI 856550 856881 . 0 . b2h intron . mult=22;pri=4;src=E
chrXVI 850624 856550 . 0 . b2h intron . mult=22;pri=4;src=E
chrXVI 933066 933400 . 0 . b2h intron . pri=4;src=E
chrXVI 933538 933675 . 0 . b2h intron . pri=4;src=E
chrXVI 933066 933400 . 0 . b2h intron . pri=4;src=E
chrXVI 933538 933675 . 0 . b2h intron . pri=4;src=E
chrXVI 933538 933675 . 0 . b2h intron . pri=4;src=E
chrXVI 937875 937992 . 0 . b2h intron . pri=4;src=E
***** WARNING: File Gallone_hints.bed has inconsistent naming convention for record:
c2micron 1674 4928 . 0 . b2h intron . pri=4;src=E