<p>You should be able to use the <code>--output-dir</code> argument to specify a folder of your choice and use <code>--id=demux_10x</code> as before.</p>

CC BY-SA 4.0
2020-05-11T13:46:32.047Z
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
BCArg
CC BY-SA 4.0
2020-05-11T15:23:12.453Z
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
BCArg
CC BY-SA 4.0
2020-05-12T07:09:40.167Z
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.
haci
CC BY-SA 4.0
2020-05-08T17:03:40.327Z
2020-05-08T17:03:40.327Z
haci
<p>I suspect the error message is a bit exaggerated.  Try removing the slash at the end of your --id</p>

CC BY-SA 4.0
2020-05-10T16:03:06.500Z
tried that way too though it did not work
BCArg
CC BY-SA 4.0
2020-05-08T16:24:04.603Z
2020-05-08T16:24:04.603Z
swbarnes2
<p>I have always used <code>cellranger mkfastq</code> to demultiplex 10x genomics runs manually, though recently the commands to do so have been incorporated into a script that should call the <code>cellranger</code> whenever it detects that a run is finished (and can be demultiplexed).</p>

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

<p>So calling the commands manually <strong>from the directory where the samplesheet is and where the outputs shall be saved</strong> with:</p>

<pre><code>/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 
</code></pre>

<p>does the job.</p>

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

<pre><code>/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)
Copyright (c) 2019 10x Genomics, Inc.  All rights reserved.
-------------------------------------------------------------------------------

/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)
</code></pre>

<p>According to the error message I cannot use slashes <code>/</code> in the <code>--id</code> flag.</p>

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

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

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

<rna-seq><10x-genomics><cellranger><demultiplexing>
cellranger mkfastq with full path to --id flag
# cellranger mkfastq with full path to --id flag

(Asked by: username_0 on 2020-05-08)

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)
Copyright (c) 2019 10x Genomics, Inc.  All rights reserved.
-------------------------------------------------------------------------------

/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.

**Tags:** rna-seq, 10x-genomics, cellranger, demultiplexing

---

## 2 answers

### Answer by username_1 on 2020-05-08. Score: 1

You should be able to use the `--output-dir` argument to specify a folder of your choice and use `--id=demux_10x` as before.

> **Comments:**
> **username_0**: 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  
> **username_0**: 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  
> **username_1**: 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.  

---

### Answer by username_2 on 2020-05-08. Score: 0

I suspect the error message is a bit exaggerated. Try removing the slash at the end of your --id

> **Comments:**
> **username_0**: tried that way too though it did not work  

---

