STAR 2-pass failed Picard validatesamfiles due to missing mate information on unmapped reads

352 views
Skip to first unread message

Zhenyu Zhang

unread,
May 10, 2016, 9:36:05 AM5/10/16
to rna-star
We used STAR 2-pass to do alignment. The resulting BAM file works well with downstream HT-Seq quantification, but Picard ValidateSamFiles gives out tons of errors:

ERROR: Record 326428580, Read name UNC12-SN629:321:C2E6WACXX:3:1101:2353:2726, Mapped mate should have mate reference name

ERROR: Record 326428580, Read name UNC12-SN629:321:C2E6WACXX:3:1101:2353:2726, Mate alignment does not match alignment start of mate

ERROR: Record 326428580, Read name UNC12-SN629:321:C2E6WACXX:3:1101:2353:2726, Mate reference index (MRNM) does not match reference index of mate

ERROR: Record 326428593, Read name UNC12-SN629:321:C2E6WACXX:3:1101:3780:2703, Mapped mate should have mate reference name


Looking into these reads in BAM file indicates that if one end of a PE pair is unmapped (such as the second read below), the RNEXT and PNEXT are not set correctly: they are 0 now instead of pointing back to it's mapped mate "chr8" and "97277402".


UNC12-SN629:321:C2E6WACXX:3:1101:2353:2726    73    chr8    97277402    255    1S47M    *    0    0    {masked sequence for phi}    #1=DDFFFGHDHHHGIIJJJJJJJIDG:=FCHHIIIHCDDDDDCDCAC    NH:i:1    HI:i:1    NM:i:0    MD:Z:47    AS:i:46    RG:Z::130718_UNC12-SN629_0321_AC2E6WACXX_GCCAAT_L003


UNC12-SN629:321:C2E6WACXX:3:1101:2353:2726    133    *    0    0    *    *    0    0    {masked sequence for phi}     +11442=D?B+<A3:+:<C<CC##########################    NH:i:0    HI:i:0    AS:i:46    nM:i:0    uT:A:4    RG:Z::130718_UNC12-SN629_0321_AC2E6WACXX_GCCAAT_L003



I couldn't find this error in the forum. Is this a known problem?


We have tried FixMateInformation, but obviously this creates new validation errors. The only way we have in mind to fix it involves sorting the file with RNAME, filling the correct mateinformation, and resorting with coordinates. That's a lot of hassle.  

Alexander Dobin

unread,
May 10, 2016, 11:37:00 AM5/10/16
to rna-star
Hi Zhenyu,

which version of STAR are you using?
Please try to use the latest patch, this problem might have been fixed.
If it still occurs, could you extract one of the problematic read pairs, check that the error still occurs, and send this read to me along with your STAR run parameters and link to the genome?

Cheers
Alex

John Poirier

unread,
May 31, 2016, 1:44:03 PM5/31/16
to rna-star
I'm seeing a similar error with 2.5.2a... Better to exc unmapped reads?

Alexander Dobin

unread,
Jun 1, 2016, 4:49:17 PM6/1/16
to rna-star
Hi John,

I did not get response to the previous e-mail - could you give me a specific example:
extract one of the problematic read pairs, check that the error still occurs, and send this read to me along with your STAR run parameters and link to the genome.
I do not see this problem in my tests. 

Cheers
Alex

hongen xu

unread,
Jul 5, 2016, 12:27:40 PM7/5/16
to rna-star
Hi Alex,

I had the same problem using STAR-2.5.2a. What information do you need to solve this problem?

below is I get from Picard ValidateSamFile.



java -jar ~/softwares/picard-tools-1.141/picard.jar ValidateSamFile  I=/mnt/scratch/hongenxu/RNAseq/STAR/017834-2.bam MODE=SUMMARY

## HISTOGRAM    java.lang.String
Error Type      Count
ERROR:MATES_ARE_SAME_END        347782
ERROR:MATE_NOT_FOUND    184721
ERROR:MISMATCH_FLAG_MATE_NEG_STRAND     204643
ERROR:MISMATCH_MATE_ALIGNMENT_START     236776
ERROR:MISMATCH_MATE_CIGAR_STRING        324
WARNING:MISSING_TAG_NM  3440869



在 2016年6月1日星期三 UTC+2下午10:49:17,Alexander Dobin写道:

Alexander Dobin

unread,
Jul 6, 2016, 4:48:30 PM7/6/16
to rna-star
Hi Hongen,

first, please extract ~1000 reads from the BAM file, check that picard still gives the error, and send the BAM file to me, e.g.:
samtools view -h A.bam | head -n 1000 | samtools view -bS - > B.bam

Cheers
Alex

hongen xu

unread,
Jul 7, 2016, 8:06:03 AM7/7/16
to rna-star
Hi Alex,

through a careful check of the pipeline, I found the errors were introduced by GATK SplitNCigarReads not by STAR. I will ask in the gatk forum. sorry for troubling you. 


Hongen

Reply all
Reply to author
Forward
0 new messages