samtools / htslib

C library for high-throughput sequencing data formats
Other
789 stars 447 forks source link

Fix crypt4gh redirection #1577

Closed daviesrob closed 1 year ago

daviesrob commented 1 year ago

hopen() uses a ':' in mode to indicate that there are extra parameters. hts_crypt4gh_redirect() needs to add this so that the "parent" parameter is picked up by the crypt4gh plug-in.

Failing to do this caused it to re-open the file instead of reusing the existing file handle - which worked for regular files but not for things like pipes or htsget.

Problem noticed when trying to reproduce some crypt4gh-over-htsget work.