Question: I'm running cellranger mkfastq and get this error, "[error] Formatting error in sample sheet". How do I solve this?
Answer: There are a few ways you could solve this problem. In a text editor, you could save the cellranger sample sheet CSV as plain UTF-8 to avoid UTF-8 encodings, e.g. BOM. In MS Excel, when saving, you could select the "Comma Separated Values (.csv)" option to avoid UTF-8 encodings. If you continue to run into the same error, try creating a fresh simple sample sheet in a text editor, such as SublimeText or BBEdit. In SublimeText, use the "Save with Encoding" option. See screenshots below of Sublime Text, BBEdit and Microsoft Excel (Mac versions).
The most common underlying issue that gives rise to this error is "UTF-8 with BOM" encoding. BOM stands for "byte order mark" and it is usually invisible when viewing the text in a graphical text editor, such as those mentioned above. There are other approaches to solving this error, e.g. given in this article, but here we provide two solutions within reach for most researchers.
Disclaimer: This article is provided for instructional purposes only. 10x Genomics does not support or guarantee the solution.