<p>Currently in MiXCR SERIES 4 you can use <code>--dont-split-files </code> parameter here.
Please check our new documentation portal:
<a href="https://docs.milaboratories.com/mixcr/reference/mixcr-export/#clonotype-tables" rel="nofollow noreferrer">https://docs.milaboratories.com/mixcr/reference/mixcr-export/#clonotype-tables</a></p>
<p>Also now we support presets that allow to perform analysis for a lot of standard protocols using a one line command.</p>

CC BY-SA 4.0
2023-01-24T15:15:05.500Z
2023-01-24T15:15:05.500Z
Mark Izraelson
<p>After finding the correct entry in the MiXCR documentation (thanks to haci), I learned that the parameter <code>--receptor-type</code> is responsible for which sequences will be returned.</p>

<p>The default for this parameter when using mixcr analyze is <code>--receptor-type xcr</code>, and stands for 'all chains', thus returning such a vast output. Changing this parameter to e.g. BCR solved my issue.</p>

CC BY-SA 4.0
2019-09-11T12:27:49.673Z
Where can I find the default value for the --receptor-type parameter? I cannot find it in the manual, can you please point out the relevant section?
haci
CC BY-SA 4.0
2019-09-11T13:49:13.960Z
I found it in the analyze section of the [MiXCR docs](https://mixcr.readthedocs.io/en/master/analyze.html), under the optional parameters.
Jan
CC BY-SA 4.0
2019-09-11T11:25:15.443Z
2019-09-11T11:25:15.443Z
Jan
<p>This is from the <a href="https://buildmedia.readthedocs.org/media/pdf/mixcr/develop/mixcr.pdf" rel="nofollow noreferrer">MiXCR documentation</a>:</p>

<pre><code>Under the hood analyze amplicon is equivalent to the execution of the following
MiXCR actions options:
&gt; mixcr align -s hs -p kAligner2 input_R1.fastq input_R2.fastq alignments.vdjca
... Building alignments
&gt; mixcr assemble alignments.vdjca clones.clns
... Assembling clones
&gt; mixcr exportClones --chains IGH clones.clns clones.txt
... Exporting clones to tab-delimited file
</code></pre>

<p>So when using <code>analyze amplicon</code>, you are using <code>mixcr exportClones</code> under the hood and not <code>exportAlignments</code>, hence the difference in output.</p>

<p>I believe what you are experiencing results from a bug, please see this <a href="https://github.com/milaboratory/mixcr/issues/454" rel="nofollow noreferrer">issue</a>. If this is the case, all these files should be the same according to the bug report. Fortunately the developers have already addressed the bug in version 3.0.3.</p>

CC BY-SA 4.0
2019-09-11T11:04:12.843Z
As I was already running version 3.0.9 of mixcr, the bug you found (which corresponds to my observation) should have been fixed. However, although running `mixcr exportClones prefix.clna clones.txt` returns only one file as expected, the same is not true for me when using the `analyze amplicon` command. So, even though those commands are supposed to be equivalent, their output suggests otherwise for me.
Jan
CC BY-SA 4.0
2019-09-10T19:20:41.987Z
2019-09-10T19:32:02.567Z
2019-09-10T19:32:02.567Z
haci
<p>I am using following command from MiXCR to both align, assemble and export my input files:</p>

<pre><code>mixcr analyze amplicon \
    -s hsa \
    --starting-material rna \
    --5-end no-v-primers \
    --3-end c-primers \
    --adapters adapters-present \
    --export "-aaFeature CDR1 -nFeature CDR1 -aaFeature CDR2 \
              -nFeature CDR2 -aaFeature CDR3 -nFeature CDR3 \
              -aaFeature VGene -cGenes -count" \
    --assemble "-OassemblingFeatures=[CDR1,CDR2,CDR3]" \
    INPUT_FILE.fasta analysis_name
</code></pre>

<p>Unfortunately, this creates multiple output file (analysis_name.clonotypes.ALL.txt, analysis_name.clonotypes.IGH.txt, etc.), which stands in contrast to the output of the <code>mixcr exportAlignments</code> command.</p>

<p>How can I export a single txt file instead, while still using the <code>mixcr analyze</code> command?</p>

<phylogenetics><fasta><bash>
MiXCR: only create a single export file for all clonotypes
# MiXCR: only create a single export file for all clonotypes

(Asked by: username_0 on 2019-09-10)

I am using following command from MiXCR to both align, assemble and export my input files:
mixcr analyze amplicon \
    -s hsa \
    --starting-material rna \
    --5-end no-v-primers \
    --3-end c-primers \
    --adapters adapters-present \
    --export "-aaFeature CDR1 -nFeature CDR1 -aaFeature CDR2 \
              -nFeature CDR2 -aaFeature CDR3 -nFeature CDR3 \
              -aaFeature VGene -cGenes -count" \
    --assemble "-OassemblingFeatures=[CDR1,CDR2,CDR3]" \
    INPUT_FILE.fasta analysis_name

Unfortunately, this creates multiple output file (analysis_name.clonotypes.ALL.txt, analysis_name.clonotypes.IGH.txt, etc.), which stands in contrast to the output of the mixcr exportAlignments command.
How can I export a single txt file instead, while still using the mixcr analyze command?

**Tags:** phylogenetics, fasta, bash

---

## 3 answers

### Answer by username_2 on 2019-09-10. Score: 3 | Accepted answer

This is from the MiXCR documentation:
Under the hood analyze amplicon is equivalent to the execution of the following
MiXCR actions options:
> mixcr align -s hs -p kAligner2 input_R1.fastq input_R2.fastq alignments.vdjca
... Building alignments
> mixcr assemble alignments.vdjca clones.clns
... Assembling clones
> mixcr exportClones --chains IGH clones.clns clones.txt
... Exporting clones to tab-delimited file

So when using analyze amplicon, you are using mixcr exportClones under the hood and not exportAlignments, hence the difference in output.
I believe what you are experiencing results from a bug, please see this issue. If this is the case, all these files should be the same according to the bug report. Fortunately the developers have already addressed the bug in version 3.0.3.

> **Comments:**
> **username_0**: As I was already running version 3.0.9 of mixcr, the bug you found (which corresponds to my observation) should have been fixed. However, although running `mixcr exportClones prefix.clna clones.txt` returns only one file as expected, the same is not true for me when using the `analyze amplicon` command. So, even though those commands are supposed to be equivalent, their output suggests otherwise for me.  

---

### Answer by username_1 on 2023-01-24. Score: 3

Currently in MiXCR SERIES 4 you can use `--dont-split-files`  parameter here.
Please check our new documentation portal:
<https://docs.milaboratories.com/mixcr/reference/mixcr-export/#clonotype-tables>

Also now we support presets that allow to perform analysis for a lot of standard protocols using a one line command.


---

### Answer by username_0 on 2019-09-11. Score: 2

After finding the correct entry in the MiXCR documentation (thanks to haci), I learned that the parameter `--receptor-type` is responsible for which sequences will be returned.

The default for this parameter when using mixcr analyze is `--receptor-type xcr`, and stands for 'all chains', thus returning such a vast output. Changing this parameter to e.g. BCR solved my issue.

> **Comments:**
> **username_2**: Where can I find the default value for the --receptor-type parameter? I cannot find it in the manual, can you please point out the relevant section?  
> **username_0**: I found it in the analyze section of the [MiXCR docs](https://mixcr.readthedocs.io/en/master/analyze.html), under the optional parameters.  

---

