Hello Everyone,
I am trying to run bedtools intersect to find which genes are present in each of the locations I have in a bed file.
No matter what I do I get an error like:
Error: unable to open file or unable to determine types for file temp.bed
I was trying to intersect with a bed file from table browser but even if I try to intersect this file with itself I get the above error.
I am using the command:
bedtools intersect -a temp.bed -b temp.bed
There are no white spaces in b/w and it is tab delimited properly.
Anyone knows what is going on?
Thank You
My file is like this (temp.bed):
chr1 213296337 213296346
chr2 25466989 25466991
chr2 198267293 198267295
chr4 106155869 106155898
chr4 106155869 106155898
chr4 106156040 106156077
chr4 106156604 106156689
chr4 106156604 106156614
chr4 130626272 130626278
chr7 50467731 50467743
chr7 101845055 101845144
chr7 101870826 101870827
chr7 101891788 101891789
chr7 148512684 148512708
chr8 32273913 32273915
chr8 117862888 117862895
chr8 117868550 117868555
chr8 117868561 117868565
chr8 117868562 117868565
chr8 117868562 117868565
chr9 21968208 21968246
chr9 139391118 139391119
chr11 118352462 118352463
chr12 11803035 11803036
chr17 7579292 7579322
chr18 62519039 62519105
chr19 32655439 32655531
chr19 45303778 45303780
chr19 45303921 45303922
chr20 55611177 55611287
chr21 36259110 36259114
chr21 36421116 36421146
chrX 15808821 15808822
chrX 15827406 15827407
chrX 15827404 15827408
chrX 39923803 39923812
chrX 39930429 39930484
chrX 39930433 39930446
chrX 39930433 39930447
chrX 39930575 39930580
chrX 39931816 39931845
chrX 44918176 44918249
chrX 44928977 44928978
chrX 123184866 123184968
chrX 123184867 123184870
chrX 123184993 123184995
chrX 123185031 123185034
chrX 123195741 123195782
chrX 123199698 123199768
chrX 123228015 123228031
chrX 129147408 129147413
chrX 129162905 129162911
chrX 129162905 129162911
chrX 129162905 129162912
chrX 129162907 129162911
chrX 129162905 129162911
chrX 129162911 129162912
chrX 129162911 129162916
chrX 129162912 129162917
chrX 129162912 129162917
chrX 129162912 129162917
chrX 129162912 129162921
chrX 129162912 129162921
chrX 129162969 129162971
chrX 129162977 129162978
chrMT 5431 5440
chrGL000241.1 2336 2346
Thank You that seemed to do the trick, there was indeed a space.
I was doing print chr,"\t",start,"\t",stop while generating it in python, changing it to print chr+"\t"+start+"\t"+stop fixed it.