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.