Bwa -N 1 -N Options, What They Mean?
1
1
Entering edit mode
11.0 years ago
dfernan ▴ 760

HI,

I am curious as what this exactly means:

bwa aln -n 1 -N ...

-n NUM Maximum edit distance if the value is INT, or the fraction of missing alignments given 2% uniform base error rate if FLOAT. In the latter case, the maximum edit distance is automatically chosen for different read lengths. [0.04]

-N Disable iterative search. All hits with no more than maxDiff differences will be found. This mode is much slower than the default.

I read the documentation of bwa but I couldn't figure out what the option -n 1 -N would mean.

Help would be appreciated.

thanks!

bwa • 6.4k views
ADD COMMENT
1
Entering edit mode

We had a very similar question before: A: What does BWA's '-n' parameter mean?

ADD REPLY
0
Entering edit mode

@Michael, thanks!

ADD REPLY
2
Entering edit mode
11.0 years ago

-n if the value in INT means the maximum edit distance. Check the link to read about edit distance: http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Dynamic/Edit/ . Basically it is total number of mismatches , insertions and deletions allowed when aligning a short read against the genome. 1 mismatch or 1 bp insertion or 1 bp deletion will count towards one edit distance.

-n if float is same as edit distance but the edit distance for a read will be chosen based on the read length. So if you specify a float value of .06, that means bwa will choose the edit distance of 6 bp for a 100 bp read and 12 bp for a 200 bp read. If your data set has reads with equal length than based on how much mismatches you want to allow you can use an INT value for -n otherwise you can choose a float value and edit distance will be calculated automatically. Also bwa assumes that some of the mismatches between read and the reference can be due to sequencing error in the read. so it allows for 2% base error rate (other than chosen edit distance) that is typical of most of the Illumina sequencers.

I am not sure about -N . I can be totally wrong on this but I think using -N means that bwa will try to find out the all the possible alignments of a read before deciding the best alignment. I think by default, once bwa finds out a good alignment of a read then it wont go looking for some other alignments that still meet the edit distance constraint but are not good as the best alignment.

I usually use default setting for bwa and it works great for me.

ADD COMMENT
1
Entering edit mode

Op didn't ask for it, but I think your interpretation of the float value for -n is incorrect, see A: What does BWA's '-n' parameter mean?

ADD REPLY
0
Entering edit mode

Based on the link in the comment above by Micheal, I think my explanation for the -n may not be correct.

ADD REPLY

Login before adding your answer.

Traffic: 1884 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6