SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to extract mapped and unmapped raw reads from bwa's sam file ? vaibhavvsk Bioinformatics 11 02-07-2013 09:01 AM
BWA - number of sequences aligned Cbon Bioinformatics 7 05-13-2012 03:45 PM
BWA & Reverse Sequences dp05yk Bioinformatics 1 06-14-2011 07:15 PM
BWA: reference sequences longer than 4GB ElMichael Bioinformatics 1 06-06-2011 12:22 PM
BWA and masking sequences... spindrift Bioinformatics 4 02-17-2010 10:20 AM

Reply
 
Thread Tools
Old 07-04-2011, 12:59 AM   #1
history_of_robots
Junior Member
 
Location: Caltech

Join Date: May 2011
Posts: 9
Default BWA on raw sequences?

Hi guys,

I previously run Bowtie on short read sequences in raw format (i.e. one sequence per lane with no other lines in the file). I want to compare the alignment by Bowtie to BWA. I looked through BWA manual (http://bio-bwa.sourceforge.net/bwa.shtml) and it seems to me that only fastq input format is acceptable. Is it so? And if it is so, can I make a fake fastq with mock ID and quality lines and expect BWA to work appropriately?

Also, I am not sure if I should use 'bwa aln' or 'bwa samse'. I want to produce SAM in the end, so it seems that I need to use samse. However I don't see how I can control any of the parameters with samse. I would like to discard alignments that map to more than one place in the genome, not to allow any gaps, at most allow one mismatch and run the program on 4 cores and produce SAM. It's really easy with Bowtie, but is it something that I can do with BWA?

thanks
__________________
"Letís start with the three fundamental Rules of Robotics...."
history_of_robots is offline   Reply With Quote
Old 07-05-2011, 08:25 AM   #2
swbarnes2
Senior Member
 
Location: San Diego

Join Date: May 2008
Posts: 912
Default

You run aln, then samse.

aln with -e 0 -n 1 -t 4 should turn off gaps, only allow one mismatch, and run on 4 threads. After you run samse on the output, you can filter the .sam file with grep, or whatever. XT:A:U will be in the unique lines, XT:A:R lines are repetative.
swbarnes2 is offline   Reply With Quote
Old 03-12-2012, 03:16 AM   #3
nxtgenkid10
Member
 
Location: india

Join Date: Feb 2011
Posts: 16
Default bwa alignment how

I like to know how to run bwa to align my pe reads to the reference genome

first i tried to create the reference of the bac genome bwa index -a is /Reference/ref.fa

I tried the following command to align
bwa sampe /DATA/Read1.fastq /DATA/Read2.fastq

But i couldn t find an option to put my reference sequence for alignment

and should i use bwa aln also if so y and how?

Thanks
nxtgenkid10 is offline   Reply With Quote
Old 03-12-2012, 08:22 AM   #4
swbarnes2
Senior Member
 
Location: San Diego

Join Date: May 2008
Posts: 912
Default

Sampe clearly takes five files as input, not just two, and yes, the name of the reference is the first of those inputs.

The method for using bwa is you index the sequence (you only have to do this one no matter how many different datasets you align to that genome). Then you use bwa aln to make intermediate files, and sampe or samse to turn those intermediate files into .sams. Aln can be the most time consuming step; that's the one where you really ought to use the -t option to utilize multiple processors, if you have them.

Also, .sams are huge, you really ought to pipe the output of sampe into samtools view to convert it to a .bam right away. You can always convert it (or more likely, a small part of it) back to .sam with samtools view later if you need to eyeball something.
swbarnes2 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 11:08 AM.


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