milaboratory / mixcr

MiXCR is an ultimate software platform for analysis of Next-Generation Sequencing (NGS) data for immune profiling.

Home Page:https://mixcr.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mapping MiXCR clones back to fastq reads

Januaryyiyue opened this issue · comments

Hello,

Is there a way to map the MiXCR clones to their specific reads from the input fastq.gz file? Thanks!

Hi, yes.

Suppose you are using mixcr analyze command. Then you should add the following parameters:

mixcr analyze milab-human-rna-ig-umi-multiplex \
-Malign.parameters.saveOriginalReads=true \
-Massemble.clnaOutput=true \
--add-step exportAlignments \
--prepend-export-alignments-field -descrsR1 \
--prepend-export-alignments-field -descrsR2 \
input_R1.fastq.gz \
input_R2.fastq.gz \
results

You will receive a results.alignments.tsv file with descrsR1 and descrsR2 columns. Instead of a results.clns file, you'll get a results.clna file containing information on both alignments and clones.

Furthermore, by using:

mixcr exportAlignments \
    -cloneId \
    results.clna \
    results.alignmentsClones.tsv

You will obtain results.alignmentsClones.tsv which provides details on both the read header from the original FASTQ file and a cloneId corresponding to the ID in the clonotype table. Records with cloneId -1 were not utilized in the clonotype assembly.

You can also read #1470