[Debian-med-packaging] Question about htslib usage in blat / libucsc source

Andreas Tille andreas at an3as.eu
Wed Jan 22 16:26:02 GMT 2020


Hi John,

in bug #922860 [1] we discussed the use of private interfaces of htslib.

I'm currently trying to package blat which is very tricky since it
contains non-free parts, a private copy of htslib (eliminating this is
my current intention) and upstream who insists that using a code copy of
an old version is the right way to go for them.  But I think, even than
ist not a good idea to use the private interface which is done here:

   https://github.com/ucscGenomeBrowser/kent/blob/master/src/lib/bamFile.c
   
   (Lines 10-12)

I even tried to comment these lines but then I get:


bamFile.c: In function ‘bamFetchAlreadyOpen’:
bamFile.c:190:24: warning: implicit declaration of function ‘cram_get_Md5’; did you mean ‘cram_get_refs’? [-Wimplicit-function-declaration]
  190 |     char *md5String =  cram_get_Md5(samfile);
      |                        ^~~~~~~~~~~~
      |                        cram_get_refs
bamFile.c:190:24: warning: initialization of ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
bamFile.c:197:25: warning: implicit declaration of function ‘cram_get_ref_url’; did you mean ‘cram_get_refs’? [-Wimplicit-function-declaration]
  197 |         char *refPath = cram_get_ref_url(samfile);
      |                         ^~~~~~~~~~~~~~~~
      |                         cram_get_refs
bamFile.c:197:25: warning: initialization of ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
bamFile.c:198:26: warning: implicit declaration of function ‘cram_get_cache_dir’; did you mean ‘cram_set_header’? [-Wimplicit-function-declaration]
  198 |         char *cacheDir = cram_get_cache_dir(samfile);
      |                          ^~~~~~~~~~~~~~~~~~
      |                          cram_set_header
bamFile.c:198:26: warning: initialization of ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
bamFile.c: In function ‘bamAndIndexFetchPlus’:
bamFile.c:240:5: warning: implicit declaration of function ‘cram_set_cache_url’ [-Wimplicit-function-declaration]
  240 |     cram_set_cache_url(fh, cacheDir, refUrl);
      |     ^~~~~~~~~~~~~~~~~~
bamFile.c: In function ‘bamGetTargetCount’:
bamFile.c:264:21: error: ‘SAM_hdr’ {aka ‘struct sam_hdr_t’} has no member named ‘nref’
  264 |     tCount = cramHdr->nref;
      |                     ^~
make[2]: *** [../inc/common.mk:419: bamFile.o] Error 1


I admit I do not know htslib myself.  Would you be able to suggest a
patch for these calls to avoid accessing the private interface?

Kind regards

       Andreas.


[1] https://bugs.debian.org/922860
[2] https://github.com/ucscGenomeBrowser/kent/issues/13

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list