SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract reference and aligned sequences from BAM file basing on VCF file floem7 Bioinformatics 3 01-19-2015 03:08 AM
RG tags in merged BAM files, muliple lanes one sample cow_girl Bioinformatics 17 08-27-2013 11:28 PM
Extract aligned reads from a BAM file above a certain threshold The Snow Bioinformatics 4 07-29-2013 02:02 AM
FastQ to aligned BAM file Question - Galaxy Zapages Bioinformatics 4 05-27-2013 10:09 AM
Extract aligned sequence coordinates from SAM or BAM file pirates.genome Bioinformatics 5 08-20-2012 08:06 AM

Reply
 
Thread Tools
Old 02-11-2016, 11:04 AM   #1
ty23991
Member
 
Location: New York NY

Join Date: May 2015
Posts: 24
Default 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 ?
ty23991 is offline   Reply With Quote
Old 02-11-2016, 11:17 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,077
Default

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.
GenoMax is offline   Reply With Quote
Old 02-11-2016, 11:54 AM   #3
ty23991
Member
 
Location: New York NY

Join Date: May 2015
Posts: 24
Default

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 ?
ty23991 is offline   Reply With Quote
Old 02-11-2016, 01:20 PM   #4
Brian Bushnell
Super Moderator
 
Location: Walnut Creek, CA

Join Date: Jan 2014
Posts: 2,707
Default

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.
Brian Bushnell is offline   Reply With Quote
Old 02-11-2016, 02:09 PM   #5
ty23991
Member
 
Location: New York NY

Join Date: May 2015
Posts: 24
Default

That is for sure a normal practice. I am wondering why sometimes single read alignment yields better alignment rate compared to paired end alignment ?
ty23991 is offline   Reply With Quote
Old 02-11-2016, 03:07 PM   #6
Brian Bushnell
Super Moderator
 
Location: Walnut Creek, CA

Join Date: Jan 2014
Posts: 2,707
Default

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.
Brian Bushnell is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 03:48 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO