alexdobin / STAR

RNA-seq aligner
MIT License
1.86k stars 506 forks source link

2.7.5.b paired end (--runMode alignReads) only returning mate 1 in --outReadsUnmapped Fastx #1008

Open fderop opened 4 years ago

fderop commented 4 years ago

Hi Alex,

I am running STAR on the same paired-end data as described in issue #558. Thank you again for allowing paired end mapping for scATAC-seq data. When running in --runMode alignReads and --outReadsUnmapped Fastx, I noticed that STAR only returns mate 1 of the triplet. I believe the desired result is outputting of all three members of the triplet.

Example of STAR command:

    STAR \
        --runThreadN 6 \
        --runMode alignReads \
        --outSAMtype BAM SortedByCoordinate \
        --sysShell /bin/bash \
        --genomeDir "${star_reference_dir}" \
        --readFilesIn "${fastq_R1_filename}" "${fastq_R3_filename}" "${fastq_R2_filename}" \
        --alignIntronMax 1 \
        --alignMatesGapMax 1000 \
        --soloCBmatchWLtype 1MM \
        --soloCBwhitelist "${whitelist_part1_filename}" \
        --soloType CB_samTagOut \
        --soloCBlen 16 \
        --soloBarcodeReadLength 16 \
        --outSAMattributes NH HI AS nM CB CR CY \
        --outReadsUnmapped Fastx \
        --outFileNamePrefix "${bam_filename%bam}"
Aug 24 12:12:51 ..... started STAR run
Aug 24 12:12:51 ..... loading genome
Aug 24 12:13:04 ..... started mapping
Aug 24 12:42:03 ..... finished mapping
Aug 24 12:42:03 ..... started sorting BAM
Aug 24 12:45:39 ..... finished successfully

Output files:

-rwxr-xr-x 1 vsc33042 lcb 21064683367 Aug 24 12:45 vib1.Aligned.sortedByCoord.out.bam
-rwxr-xr-x 1 vsc33042 lcb     6582200 Aug 24 12:51 vib1.Aligned.sortedByCoord.out.bam.bai
-rwxr-xr-x 1 vsc33042 lcb        2006 Aug 24 12:45 vib1.Log.final.out
-rwxr-xr-x 1 vsc33042 lcb       16022 Aug 24 12:45 vib1.Log.out
-rwxr-xr-x 1 vsc33042 lcb        3668 Aug 24 12:45 vib1.Log.progress.out
-rwxr-xr-x 1 vsc33042 lcb           0 Aug 24 12:42 vib1.SJ.out.tab
-rwxr-xr-x 1 vsc33042 lcb  6303157095 Aug 24 12:42 vib1.Unmapped.out.mate1
-rwxr-xr-x 1 vsc33042 lcb           0 Aug 24 12:12 vib1.Unmapped.out.mate2
-rwxr-xr-x 1 vsc33042 lcb           0 Aug 24 12:12 vib1.Unmapped.out.mate3

As you can see, filesize for mate2 and mate3 is 0. This is not a STAR feature we are using at the moment, just letting you know that this issue exists.

Kind regards,

Florian

alexdobin commented 4 years ago

Hi Florian,

I have fixed this bug in 2.7.6a, please test it out. Thanks for reporting it!

Cheers Alex