cellranger aggr and it failed with the following errors even when my
aggr.csv file was accurate:
raise StageException(message) martian.StageException: Could not generate .cloupe file:
The above errors are due to the formatting of the input CSV file. Listed below are the most frequently observed issues:
- Missing new-line character at the end of file (\n)
- NonWordChars at the beginning of the file (eg: 357, 273, 277)
You can verify this by using
od -c command on your input CSV files. Please see an example below:
You can enter the commands below to fix this by adding the new line and by truncating all ASCII characters except standard text, linefeed, and space characters, respectively.
echo $'' >> file.csv
tr -cd '\11\12\40-\176' < file.csv > aggr.csv
In the above, be sure to replace
file.csvwith the original input CSV file name.
Use the resulting formatted
aggr.csv file as input to the
cellranger aggr pipeline to resolve this issue. In rare cases, there could be CTRL-M characters too. This article here describes a few ways to remove CTRL-M characters from files in UNIX.
If you are using Cell Ranger versions 4 and earlier you might encounter a PREFLIGHT sample definition error while running
cellranger countfor a Feature Barcode dataset even if the fields in
feature_ref.csv files are accurate.
[error] Libraries csv file must contain the following comma-delimited fields: "fastqs, sample, library_type".
[error] Feature reference contains non-ascii characters.
These errors are also related to CSV formatting. The solution proposed for the CLOUPE_PREPROCESS error also applies to resolve this issue. Alternatively, for this sample definition error in
cellranger count, you can upgrade to Cell Ranger v6 and later.
Products: Single Cell Gene Expression