SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
TopHat and uniquely aligned reads bgibb Bioinformatics 13 10-02-2013 09:45 PM
Bowtie - only 4.12% reads aligned to transcriptome mcek RNA Sequencing 0 11-15-2011 02:10 AM
How to retrieve un-aligned reads from Bowtie shuang Bioinformatics 1 10-17-2011 01:35 PM
a question for the percentage of aligned reads chenwb SOLiD 1 03-18-2011 07:58 AM
ShortRead R package Aligned Read Output?? nazanin Bioinformatics 0 01-30-2011 11:34 PM

Reply
 
Thread Tools
Old 10-25-2010, 06:59 AM   #1
ramouz87
Member
 
Location: Doha, Qatar

Join Date: Oct 2009
Posts: 35
Default how to get perfects aligned reads instead of real read

Hi,
Is there any way to modify a SAM/BAM in order to have real reads replaced by the perfect reads(replacing wrong bases with the right bases in the ref) ?
for example:
REF : ACTGTGTCCTGTACTG
READ: TCTGTGTCCTTTACTG

the REF sequence will be showed instead of the real read.

One solution is to fetch the postion of each read(chr:start-end) and fetch the proprer reads from the reference but i'm wondering if there's a better way to do that directely using samtools/awk ?
The desired output is bam or fastq
Thanks in advance
Best,
Ramzi
__________________
Research Scientist - Bioinformatics
Sidra Medical and Research Center
ramouz87 is offline   Reply With Quote
Old 10-25-2010, 07:39 AM   #2
nilshomer
Nils Homer
 
nilshomer's Avatar
 
Location: Boston, MA, USA

Join Date: Nov 2008
Posts: 1,285
Default

Quote:
Originally Posted by ramouz87 View Post
Hi,
Is there any way to modify a SAM/BAM in order to have real reads replaced by the perfect reads(replacing wrong bases with the right bases in the ref) ?
for example:
REF : ACTGTGTCCTGTACTG
READ: TCTGTGTCCTTTACTG

the REF sequence will be showed instead of the real read.

One solution is to fetch the postion of each read(chr:start-end) and fetch the proprer reads from the reference but i'm wondering if there's a better way to do that directely using samtools/awk ?
The desired output is bam or fastq
Thanks in advance
Best,
Ramzi
Use the cigar field and the MD tag (if available) to convert the read into the reference without having to search a reference FASTA file. I will leave it to you as an exercise, though you can checkout the bio-samtools (written in perl).
nilshomer is offline   Reply With Quote
Reply

Tags
bam, cigar, fastq, sam

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 05:23 PM.


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