# cellranger mkfastq with full path to --id flag

I have always used cellranger mkfastq to demultiplex 10x genomics runs manually, though recently the commands to do so have been incorporated into a script that should call the cellranger whenever it detects that a run is finished (and can be demultiplexed).

The main difference when calling manually compared to being called automatically by the script is from where the commands are being called.

So calling the commands manually from the directory where the samplesheet is and where the outputs shall be saved with:

/home/ngs/installed/cellranger-3.1.0/cellranger mkfastq --id=demux_10x --run=/nexusb/Novaseq/200507_A00154_0492_AHL72WDRXX --samplesheet=/nexusb/Novaseq/200507_A00154_0492_AHL72WDRXX/20200507_NovaSeq_129_Chromium_Anne_Fred_Samplesheet.csv --qc


does the job.

but now cellranger is being called (automatically) from /home/ngs. The error message that I am getting from cellranger is:

/home/ngs/installed/cellranger-3.1.0/cellranger mkfastq --id=/nexusb/Novaseq/200507_A00154_0492_AHL72WDRXX/demux_10x/ --run=/nexusb/Novaseq/200507_A00154_0492_AHL72WDRXX --samplesheet=/nexusb/Novaseq/200507_A00154_0492_AHL72WDRXX/20200507_NovaSeq_129_Chromium_Anne_Fred_Samplesheet.csv --qc
/home/ngs/installed/cellranger-3.1.0/cellranger-cs/3.1.0/bin
cellranger mkfastq (3.1.0)
-------------------------------------------------------------------------------

/home/ngs/installed/cellranger-3.1.0/cellranger-cs/3.1.0/tenkit/bin/_mkfastq: line 531: __/nexusb/Novaseq/200507_A00154_0492_AHL72WDRXX/demux_10x/.mro: No such file or directory
Martian Runtime - '3.1.0-v3.2.3'

Invalid name: /nexusb/Novaseq/200507_A00154_0492_AHL72WDRXX/demux_10x/ (only numbers, letters, dash, and underscore allowed)


According to the error message I cannot use slashes / in the --id flag.

Does anyone what I should pass to --id in order to get the outputs saved as /nexusb/Novaseq/200507_A00154_0492_AHL72WDRXX/demux_10x/?

I already know that if I just pass --id=demux_10x the outputs will be saved at /home/ngs/demux_10x. (again, I am calling the script that calls cellranger from /home/ngs/)

Obviously I could change to the desired output directory i.e. /nexusb/Novaseq/200507_A00154_0492_AHL72WDRXX/ and do --id=demux_10, though I am trying to avoid that for now.

You should be able to use the --output-dir argument to specify a folder of your choice and use --id=demux_10x as before.
• that works partially. All arguments passed to mkfastq were --id=demux_10x --output-dir=/nexusb/Novaseq/200507_A00154_0492_AHL72WDRXX/demux_10x --run=/nexusb/Novaseq/200507_A00154_0492_AHL72WDRXX --samplesheet=/nexusb/Novaseq/200507_A00154_0492_AHL72WDRXX/20200507_NovaSeq_129_Chromium_Anne_Fred_Samplesheet.csv --qc. The fastqs are being saved at /nexusb/Novaseq/200507_A00154_0492_AHL72WDRXX/demux_10 while there is still a directory demux_10x and the file __demux_10x.mro at /home/ngs (from where the script was called). Hoping these files will be moved by completion of cellranger May 11 '20 at 13:46
• The aforementioned files were not moved to the directory specified in --output-dir, even though the fastqs were saved there. On the _invocatoin file under /home/ngs/demux_10x there is an entry like interop_output_path = null,, though apparently this cannot be specified by cellranger mkfastq. Guess the only solution will be to change directory back and forth May 11 '20 at 15:23
• I remove quite a number of "such files" after my cellranger count runs, so this might be a deliberate design choice for some reason. BTW, the 10x customer service is very prompt, helped me in the course of a few hours in the past in case you would like to contact them.