How to remove non-unique mapping reads with Hisat?
3
1
Entering edit mode
9.4 years ago
Niek De Klein ★ 2.6k

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 • 8.3k views
ADD COMMENT
1
Entering edit mode

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 REPLY
5
Entering edit mode
9.4 years ago
thomas.smith2 ▴ 120

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.

ADD COMMENT
0
Entering edit mode
9.4 years ago
vivekbhr ▴ 700

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 COMMENT
0
Entering edit mode
8.5 years ago
bimbam42 • 0

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 COMMENT

Login before adding your answer.

Traffic: 1826 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