[Bio-bwa-help] bwasw and picard fixmate problems.
Status: Beta
Brought to you by:
lh3lh3
From: Louis L. <lou...@ma...> - 2012-07-12 14:36:15
|
I'm aligning paired reads using bwasw but I'm getting results that are surprising to me. For example read1 aligns well read2 is split in 2. read2_1 has ~130bp that aligns somewhere, and read2_2 has 45bp that align somewhere else. read1 has RNEXT and RPOS set to '*' 1ead2_1 has RNEXT and RPOS set to the read1 values 1ead2_2 has RNEXT and RPOS set to the read1 values So picard doesn't like this at all since read1 doesn't have the mate ref set. It gives 'Mapped mate should have mate reference name' but shouldn't read 1 have RNEXT to read2_1 and read2_1 have RNEXT to read2_2? In anycase if I run fixmate on this (after querysorting everything) it get's worst. read1 and read2_1 now have their ref set to '*' with a position. BUT the flag unmapped is not set. This creates an invalid BAM/SAM file. If bwa creates these weird entries and fixmate can't fix them, how should I align paired reads? Here are the pre fixmate entries (I removed the actual sequences): In this example I tried with the bwasw -M option to flag the 2nd read as secondary to remove it afterwards readName 129 chr1 64636 13 158M * 0 0 XE:i:4 XF:i:3 RG:Z:NA_71_1 NM:i:0 AS:i:158 XS:i:150 readName 81 chr1 66404 28 39M7I79M5I51M2D44M25S = 64636 -1983 XE:i:6 XF:i:3 RG:Z:NA_71_1 NM:i:15 AS:i:166 XS:i:148 readName 337 chr19 108166 6 205S45M chr1 64636 0 XE:i:1 XF:i:1 RG:Z:NA_71_1 NM:i:0 AS:i:45 XS:i:34 Here is the post fixmate after I removed the secondary alignments readName 81 * 66404 28 39M7I79M5I51M2D44M25S * 64636 -1983 XE:i:6 XF:i:3 RG:Z:NA_71_1 NM:i:15 MQ:i:13 AS:i:166 XS:i:148 readName 161 * 64636 13 158M * 66404 1983 XE:i:4 XF:i:3 RG:Z:NA_71_1 NM:i:0 MQ:i:28 AS:i:158 XS:i:150 Help and thanks Louis |