Bedtools Closest Error

Got this error while using bedtools closest function

Error: Type checker found wrong number of fields while tokenizing data line.
Perhaps you have extra TAB at the end of your line? Check with “cat -t”

How to solve this error in

1 Like

Hi @Ankit_Naik

This type of error means that the data either has the wrong number of columns or there is some formatting problem (extra “whitespace” eg tabs/spaces; or empty blank lines at the end).

If you haven’t solved this yet, tools in the groups under Data Manipulation, especially Text Manipulation can often help to fix problems. Examples:

  • Convert delimiters to TAB
  • Select

More help is in these FAQs:

If you cannot figure out the problem (please try first, learning how to manipulate data to meet format specifications is important), you can submit a bug report from the error dataset. Be sure to leave all tests to fix the data plus the original inputs/output undeleted, include a link to this topic in the bug report comments so we can link the two together, then post back here that you sent one in so we know when to look for it. If you already sent a bug report in – I couldn’t find it – so go ahead and send another one in after trying to fix the data yourself first.