SEQanswers (
-   Bioinformatics (
-   -   Enable pairing in a bam file separately aligned by lanes (

ty23991 02-11-2016 12:04 PM

Enable pairing in a bam file separately aligned by lanes
Hi all,
I aligned paired end exome seq R1 and R2 fastq files separately as single end reads. Then I combined two resultant bam files using samtools cat and then sorted them by sequence.

However, this would obviously not enable pairing / not change the flags for paired reads.

Any suggestions how to enable pairing of the reads in the file ?

GenoMax 02-11-2016 12:17 PM

Aligning sequences in pairs provides spatial context to aligners (not sure which one you used). Just do the alignment again this time using both reads. You can then merge the resulting bam files if the same sample ran in more than one lane.

ty23991 02-11-2016 12:54 PM

I used bowtie2
I have two separate bam files. If i understand your suggestion correctly, i align those files (converting them to fastq) and run the paired reads alignment. right ?

Brian Bushnell 02-11-2016 02:20 PM

Ignore your aligned bam files, and start over with the original fastq files. Align them together at the same time, telling the aligner to use them as R1 and R2 of pairs. That will generate a single paired sam/bam output file that you should subsequently use.

ty23991 02-11-2016 03:09 PM

That is for sure a normal practice. I am wondering why sometimes single read alignment yields better alignment rate compared to paired end alignment ?

Brian Bushnell 02-11-2016 04:07 PM

I've never seen that happen, and there is no reason it should happen. If it does, it probably indicates a problem with the alignment program.

All times are GMT -8. The time now is 07:29 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2021, vBulletin Solutions, Inc.