This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to remove non-unique mapping reads with Hisat?

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 https://ccb.jhu.edu/software/hisat/manual.shtml#options. There is a Uniqueness class in here: https://github.com/infphilo/hisat/blob/master/unique.h, 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.

alignment rna-seq hisat

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.

3 answers

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: https://ccb.jhu.edu/software/hisat/index.shtml). As far as I understand it, reads/pairs with NH:i:1 have a single best alignment and are therefore "uniquely" mapped.

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.

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?

Log in to answer this question.