niemasd / ViralConsensus

Fast viral consensus genome reconstruction
https://niema.net/ViralConsensus/
GNU General Public License v3.0
21 stars 2 forks source link

Use HTSlib API to set the CRAM reference #9

Closed daviesrob closed 9 months ago

daviesrob commented 9 months ago

cram_load_reference() is an internal HTSlib function, and shouldn't be called directly. Instead use hts_set_opt() to tell the CRAM reader which reference it should use.

As the (HTSlib-internal) cram/cram.h file no longer needs to be included in ViralConsensus code, the change to CXXFLAGS in commit 0b99fca can also be reverted.

niemasd commented 9 months ago

Ah, thank you so much, @daviesrob! I couldn't figure out how to use the local reference properly, and this was what I found when I dug through the source code of other tools that use htslib. I appreciate it!