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?


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.

  • $\begingroup$ 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. $\endgroup$
    – Jan
    Sep 11 '19 at 11:04

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.

  • $\begingroup$ 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? $\endgroup$
    – haci
    Sep 11 '19 at 12:27
  • 1
    $\begingroup$ I found it in the analyze section of the MiXCR docs, under the optional parameters. $\endgroup$
    – Jan
    Sep 11 '19 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.