I've been using STAR in conjunction with RSEM to get the most accurate quantification of RNA-seq for a while now. However, in one of the recent projects, I needed to map reads to a repetitive reference, generating an alignment with many multimappers. Hisat2 is the only one that can fit the reference into available RAM. However, I later discovered that Hisat2 does not output an important tag,
HI:i:<n>, which appears to be simply an index for a particular multimapper (i.e., if the read maps to 5 places, this tag would range from 1 to 5 for individual mapping positions of the same read).
Do you know of a way to add this tag to a BAM or a SAM file? I can probably put together something in Python or Perl, but would be nice to use a ready solution, if such solution exists.
Any help is appreciated, as always.