I'm trying to do a bedtools compare on a couple of bed files. One of the bed files keeps throwing this error:
Error: unable to open file or unable to determine types for file
My file is as follows:
chr1     810865      3198369
chr1     844270      845356
chr1     882432      10373009
chr1     1104962     1173985
chr1     2616309     2617058
chr1     3056425     3245459
chr1     4704545     5447621
I have checked that the start position is before the end position. I have added and removed column headings chrom, "start" and "end" (also tried 'chromStart' and 'chromEnd'. But no joy. I had originally created this bed file from a tab delimited file from R. Does anyone know what has gone wrong?
Try:
perl -p -i -e 's/ /\t/g' bed_file.txtfor converting white spaces to tabs and rerun bedtools.Have you ensured that you're always using tabs to separate the columns? I've seen a couple files with spaces randomly thrown in and that tends to break things.
As others have suggested, this is most likely caused by the file having spaces in place of tabs. I note you mention this table was written in R, where the default separator for write.table is indeed a space. I have this function in my
.Rprofileto make writing bioinformatic-sy table easier:Error: unable to open file or unable to determine types for file
Hi i am trying to run this commands bedtools intersect -a Ec_k12.gff -b target_genes.txt -f 0.5 -wa -wb > genes_with_coordinates.bed and i am getting this error even after following given steps regarding this error on biostars/google. please help me if anyone know how to solve it? and the error is -
thank you !