DaehwanKimLab / hisat2

Graph-based alignment (Hierarchical Graph FM index)
GNU General Public License v3.0
473 stars 116 forks source link

Issues with --score-min values in local vs end-to-end mode #202

Closed FelixKrueger closed 5 years ago

FelixKrueger commented 5 years ago

Dear HISAT2 Team,

we have recently encountered an issue with setting the --score-min function in HISAT2.

In Bowtie2, end-to-end alignments generally have a negative alignment score, with 0 as the maximum, and positive values in --local mode, with 0 being the minimum.

It would appear that HISAT2 does not use the same system for alignment scores, but couldn't find any information about that in the documentation. Does it only use [negative to 0] values for both --no-softclip and default (local) mode?

When running HISAT2 in local mode (i.e. not using --no-softclip) using the [Bowtie2] default setting for score-min (--score-min G,20,8) I am getting gazillions of warnings containing a reference to --end-to-end mode:

Warning: minimum score function gave positive number in --end-to-end mode for read 'HWI-D00436:416:CCFY2ANXX:8:1108:7095:100659_1:N:0:_TGATACGT; setting to 0 instead
Warning: minimum score function gave positive number in --end-to-end mode for read 'HWI-D00436:416:CCFY2ANXX:8:1108:7216:100693_1:N:0:_TGATACGT; setting to 0 instead
Warning: minimum score function gave positive number in --end-to-end mode for read 'HWI-D00436:416:CCFY2ANXX:8:1108:10379:100638_1:N:0:_TGATACGT; setting to 0 instead

Would you be able to quickly clarify which type of scoring we should use for --score-min in HISAT2?

Many thanks! Felix

parkchanhee commented 5 years ago

In HISAT2, the alignment score always decreases. 0 is the best one. HISAT2 doesn't support a match bonus. Users need to design the minimum alignment score function(--score-min) get a negative value. It depends on how many mismatches(and insertion, deletion, soft-clips) are allowed. The default function (--score-min L,0,-0.2) is also ok.

FelixKrueger commented 5 years ago

Excellent, thanks for the clarification!