Question: How to remove non-unique mapping reads with Hisat?
gravatar for Niek De Klein
3.8 years ago by
Niek De Klein2.5k
Niek De Klein2.5k wrote:

Is there an option in Hisat that is similar to g/--max-multihits in Tophat? I can not find it in the parameter list on There is a Uniqueness class in here:, but when I grep for that class or the bestIsUnique function in the Hisat source folder I can't find it used anywhere.

Or would it work to use samtools view -q 1?

If anyone else is interested, I e-mailed the author and he said:

"One possible solution is to use the next best alignment score (ZS:i:, previously XS:i:).  If the next alignment score is the same as the primary alignment score (AS:i:), that means there are at least two equivalent alignments found by HISAT.  This additional SAM field (ZS:i:) is only available at HISAT github, which I’ll include in the next release of HISAT."

rna-seq alignment hisat • 4.6k views
ADD COMMENTlink modified 2.9 years ago by bimbam420 • written 3.8 years ago by Niek De Klein2.5k

I am currently not using Hisat after finding that it's treatment of multi-mappers is somewhat lacking. I guess this is some kind of speed vs. accuracy trade-off. Personally I prefer an algorithm that is slower but guarantees to find the best N mappings in the genome.

ADD REPLYlink modified 3.8 years ago • written 3.8 years ago by Christian2.8k
gravatar for thomas.smith2
3.8 years ago by
United Kingdom
thomas.smith290 wrote:

The most recent release of hisat (v0.1.6) uses NH tags in the BAM to specify the number of alignments for the read/pair (see release notes: As far as I understand it, reads/pairs with NH:i:1 have a single best alignment and are therefore "uniquely" mapped.

ADD COMMENTlink written 3.8 years ago by thomas.smith290
gravatar for vivekbhr
3.8 years ago by
vivekbhr510 wrote:

There is the -k option to inquire a given number of alignments as output. However,since HISAT doesn't finds/reports alignments in a specific order, the -k cutoff won't necessarily give you "best" alignments. So I would not recommend using -k 1 if you want to find the best unique alignment for each read, but it's faster if you want to know whether a reads aligns or not.

Hope this helps.

ADD COMMENTlink modified 3.8 years ago • written 3.8 years ago by vivekbhr510
gravatar for bimbam42
2.9 years ago by
bimbam420 wrote:

Hej but doesn't -k 1 mean that it will go for the first hit rather than the best? Does this also apply for HISAT2?

ADD COMMENTlink modified 2.9 years ago • written 2.9 years ago by bimbam420
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1052 users visited in the last hour