liulab-dfci / TRUST4

TCR and BCR assembly from RNA-seq data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unrecognized option '--UMI--barcode': annotatorArgs improperly concatenated

ejohnson643 opened this issue · comments

Hi! I discovered a wonderful bug. If you make a TRUST4 call with the --UMI specified before the --barcode as in the example below, the annotatorArgs in run-trust4 becomes --UMI--barcode because line 195 of run-trust4: $annotatorArgs .= "--barcode" ; is missing a space before the --barcode. This causes the program to quit with the error /usr/local/bin/TRUST4/annotator: unrecognized option '--UMI--barcode'.

Example script that generates the error:

run-trust4 \
    -f $ref_dir/hg38_bcrtcr.fa \
    --ref $ref_dir/human_IMGT+C.fa \
    -u $gdTCR_dir/fastqs/scTCR_control*_R2_*.fastq.gz \
    --UMI $gdTCR_dir/fastqs/scTCR_control*_R1_*fastq.gz \    ## This coming before --barcode generates the error.
    --barcode $gdTCR_dir/fastqs/scTCR_control*_R1_*fastq.gz \
    --readFormat bc:0:15,um:16:25,r1:0:25 \
    --barcodeWhitelist $ref_dir/737K-august-2016.txt \
    -t 24 \
    # --stage 2 \
    -o $gdTCR_dir/output/control/

Thank you for reporting this issue! It is a bug in the run-trust4 wrapper where I forgot to add the space before --barcode for annotator. I just pushed the fix to the repo, and it should be fine now. Since you only need to rerun from the annotation stage with the new code, you can add the option "--stage 2" to skip running the first few stages in TRUST4.