ccounts 0.1.0a0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ccounts might be problematic. Click here for more details.

Files changed (231) hide show
  1. ccounts-0.1.0a0/HTSCODECS_LICENSE.md +45 -0
  2. ccounts-0.1.0a0/HTSLIB_LICENSE.txt +69 -0
  3. ccounts-0.1.0a0/LICENSE +21 -0
  4. ccounts-0.1.0a0/MANIFEST.in +20 -0
  5. ccounts-0.1.0a0/PKG-INFO +21 -0
  6. ccounts-0.1.0a0/README.md +10 -0
  7. ccounts-0.1.0a0/ZLIB_LICENSE.txt +22 -0
  8. ccounts-0.1.0a0/pyproject.toml +44 -0
  9. ccounts-0.1.0a0/setup.cfg +4 -0
  10. ccounts-0.1.0a0/setup.py +67 -0
  11. ccounts-0.1.0a0/src/ccounts/__init__.py +15 -0
  12. ccounts-0.1.0a0/src/ccounts/_native.pyx +440 -0
  13. ccounts-0.1.0a0/src/ccounts/blacklistRanges.py +13350 -0
  14. ccounts-0.1.0a0/src/ccounts/counting.py +579 -0
  15. ccounts-0.1.0a0/src/ccounts/fragmentLength.pxi +132 -0
  16. ccounts-0.1.0a0/src/ccounts/fragmentLength.py +280 -0
  17. ccounts-0.1.0a0/src/ccounts/genomes.py +6876 -0
  18. ccounts-0.1.0a0/src/ccounts/native/barcode_selection.h +122 -0
  19. ccounts-0.1.0a0/src/ccounts/native/countsBackend.c +1207 -0
  20. ccounts-0.1.0a0/src/ccounts/native/countsBackend.h +67 -0
  21. ccounts-0.1.0a0/src/ccounts/normalization.py +256 -0
  22. ccounts-0.1.0a0/src/ccounts/pairedFragmentLength.pxi +196 -0
  23. ccounts-0.1.0a0/src/ccounts/sources.py +433 -0
  24. ccounts-0.1.0a0/src/ccounts/transforms.py +49 -0
  25. ccounts-0.1.0a0/src/ccounts.egg-info/PKG-INFO +21 -0
  26. ccounts-0.1.0a0/src/ccounts.egg-info/SOURCES.txt +229 -0
  27. ccounts-0.1.0a0/src/ccounts.egg-info/dependency_links.txt +1 -0
  28. ccounts-0.1.0a0/src/ccounts.egg-info/requires.txt +12 -0
  29. ccounts-0.1.0a0/src/ccounts.egg-info/top_level.txt +1 -0
  30. ccounts-0.1.0a0/tests/conftest.py +21 -0
  31. ccounts-0.1.0a0/tests/data/allow.txt +1 -0
  32. ccounts-0.1.0a0/tests/data/barcodes.fragments.tsv +3 -0
  33. ccounts-0.1.0a0/tests/data/cancellation.fragments.tsv +2 -0
  34. ccounts-0.1.0a0/tests/data/cells.tsv +4 -0
  35. ccounts-0.1.0a0/tests/data/counts-csc.h5ad +0 -0
  36. ccounts-0.1.0a0/tests/data/counts-csr.h5ad +0 -0
  37. ccounts-0.1.0a0/tests/data/counts-dense.h5ad +0 -0
  38. ccounts-0.1.0a0/tests/data/endpoints.bam +0 -0
  39. ccounts-0.1.0a0/tests/data/endpoints.bam.bai +0 -0
  40. ccounts-0.1.0a0/tests/data/events.bam +0 -0
  41. ccounts-0.1.0a0/tests/data/events.bam.bai +0 -0
  42. ccounts-0.1.0a0/tests/data/events.fragments.tsv +4 -0
  43. ccounts-0.1.0a0/tests/data/genome.sizes +2 -0
  44. ccounts-0.1.0a0/tests/data/precision.fragments.tsv +4 -0
  45. ccounts-0.1.0a0/tests/data/signal.bedGraph +3 -0
  46. ccounts-0.1.0a0/tests/testCounts.py +157 -0
  47. ccounts-0.1.0a0/tests/testFragmentLength.py +128 -0
  48. ccounts-0.1.0a0/vendor/htslib/.cirrus.yml +216 -0
  49. ccounts-0.1.0a0/vendor/htslib/.gitattributes +37 -0
  50. ccounts-0.1.0a0/vendor/htslib/.gitignore +87 -0
  51. ccounts-0.1.0a0/vendor/htslib/.gitmodules +4 -0
  52. ccounts-0.1.0a0/vendor/htslib/INSTALL +358 -0
  53. ccounts-0.1.0a0/vendor/htslib/LICENSE +69 -0
  54. ccounts-0.1.0a0/vendor/htslib/Makefile +1085 -0
  55. ccounts-0.1.0a0/vendor/htslib/NEWS +2869 -0
  56. ccounts-0.1.0a0/vendor/htslib/README +27 -0
  57. ccounts-0.1.0a0/vendor/htslib/README.large_positions.md +234 -0
  58. ccounts-0.1.0a0/vendor/htslib/annot-tsv.1 +259 -0
  59. ccounts-0.1.0a0/vendor/htslib/annot-tsv.c +1076 -0
  60. ccounts-0.1.0a0/vendor/htslib/bcf_sr_sort.c +717 -0
  61. ccounts-0.1.0a0/vendor/htslib/bcf_sr_sort.h +116 -0
  62. ccounts-0.1.0a0/vendor/htslib/bgzf.c +2621 -0
  63. ccounts-0.1.0a0/vendor/htslib/bgzf_internal.h +70 -0
  64. ccounts-0.1.0a0/vendor/htslib/bgzip.1 +206 -0
  65. ccounts-0.1.0a0/vendor/htslib/bgzip.c +771 -0
  66. ccounts-0.1.0a0/vendor/htslib/builddir_vars.mk.in +58 -0
  67. ccounts-0.1.0a0/vendor/htslib/config.mk.in +123 -0
  68. ccounts-0.1.0a0/vendor/htslib/configure.ac +964 -0
  69. ccounts-0.1.0a0/vendor/htslib/cram/README +214 -0
  70. ccounts-0.1.0a0/vendor/htslib/cram/cram.h +61 -0
  71. ccounts-0.1.0a0/vendor/htslib/cram/cram_codecs.c +4174 -0
  72. ccounts-0.1.0a0/vendor/htslib/cram/cram_codecs.h +264 -0
  73. ccounts-0.1.0a0/vendor/htslib/cram/cram_decode.c +3637 -0
  74. ccounts-0.1.0a0/vendor/htslib/cram/cram_decode.h +142 -0
  75. ccounts-0.1.0a0/vendor/htslib/cram/cram_encode.c +4217 -0
  76. ccounts-0.1.0a0/vendor/htslib/cram/cram_encode.h +116 -0
  77. ccounts-0.1.0a0/vendor/htslib/cram/cram_external.c +1033 -0
  78. ccounts-0.1.0a0/vendor/htslib/cram/cram_index.c +1038 -0
  79. ccounts-0.1.0a0/vendor/htslib/cram/cram_index.h +115 -0
  80. ccounts-0.1.0a0/vendor/htslib/cram/cram_io.c +6014 -0
  81. ccounts-0.1.0a0/vendor/htslib/cram/cram_io.h +654 -0
  82. ccounts-0.1.0a0/vendor/htslib/cram/cram_samtools.h +75 -0
  83. ccounts-0.1.0a0/vendor/htslib/cram/cram_stats.c +227 -0
  84. ccounts-0.1.0a0/vendor/htslib/cram/cram_stats.h +59 -0
  85. ccounts-0.1.0a0/vendor/htslib/cram/cram_structs.h +979 -0
  86. ccounts-0.1.0a0/vendor/htslib/cram/mFILE.c +668 -0
  87. ccounts-0.1.0a0/vendor/htslib/cram/mFILE.h +93 -0
  88. ccounts-0.1.0a0/vendor/htslib/cram/misc.h +77 -0
  89. ccounts-0.1.0a0/vendor/htslib/cram/open_trace_file.c +466 -0
  90. ccounts-0.1.0a0/vendor/htslib/cram/open_trace_file.h +129 -0
  91. ccounts-0.1.0a0/vendor/htslib/cram/os.h +205 -0
  92. ccounts-0.1.0a0/vendor/htslib/cram/pooled_alloc.c +205 -0
  93. ccounts-0.1.0a0/vendor/htslib/cram/pooled_alloc.h +66 -0
  94. ccounts-0.1.0a0/vendor/htslib/cram/string_alloc.c +162 -0
  95. ccounts-0.1.0a0/vendor/htslib/cram/string_alloc.h +69 -0
  96. ccounts-0.1.0a0/vendor/htslib/errmod.c +208 -0
  97. ccounts-0.1.0a0/vendor/htslib/faidx.5 +238 -0
  98. ccounts-0.1.0a0/vendor/htslib/faidx.c +1066 -0
  99. ccounts-0.1.0a0/vendor/htslib/fuzz_settings.h +35 -0
  100. ccounts-0.1.0a0/vendor/htslib/header.c +3174 -0
  101. ccounts-0.1.0a0/vendor/htslib/header.h +334 -0
  102. ccounts-0.1.0a0/vendor/htslib/hfile.c +1452 -0
  103. ccounts-0.1.0a0/vendor/htslib/hfile_gcs.c +160 -0
  104. ccounts-0.1.0a0/vendor/htslib/hfile_internal.h +208 -0
  105. ccounts-0.1.0a0/vendor/htslib/hfile_libcurl.c +1564 -0
  106. ccounts-0.1.0a0/vendor/htslib/hfile_s3.c +2499 -0
  107. ccounts-0.1.0a0/vendor/htslib/hts.c +5200 -0
  108. ccounts-0.1.0a0/vendor/htslib/hts_expr.c +927 -0
  109. ccounts-0.1.0a0/vendor/htslib/hts_internal.h +203 -0
  110. ccounts-0.1.0a0/vendor/htslib/hts_os.c +59 -0
  111. ccounts-0.1.0a0/vendor/htslib/hts_probe_cc.sh +170 -0
  112. ccounts-0.1.0a0/vendor/htslib/hts_time_funcs.h +170 -0
  113. ccounts-0.1.0a0/vendor/htslib/htscodecs/.cirrus.yml +92 -0
  114. ccounts-0.1.0a0/vendor/htslib/htscodecs/.gitattributes +7 -0
  115. ccounts-0.1.0a0/vendor/htslib/htscodecs/.gitignore +45 -0
  116. ccounts-0.1.0a0/vendor/htslib/htscodecs/BENCHMARKS.md +146 -0
  117. ccounts-0.1.0a0/vendor/htslib/htscodecs/LICENSE.md +45 -0
  118. ccounts-0.1.0a0/vendor/htslib/htscodecs/MAINTAINERS.md +55 -0
  119. ccounts-0.1.0a0/vendor/htslib/htscodecs/Makefile.am +48 -0
  120. ccounts-0.1.0a0/vendor/htslib/htscodecs/NEWS.md +513 -0
  121. ccounts-0.1.0a0/vendor/htslib/htscodecs/README.md +263 -0
  122. ccounts-0.1.0a0/vendor/htslib/htscodecs/configure.ac +215 -0
  123. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/Makefile.am +135 -0
  124. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/arith_dynamic.c +1283 -0
  125. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/arith_dynamic.h +60 -0
  126. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/c_range_coder.h +166 -0
  127. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/c_simple_model.h +171 -0
  128. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/fqzcomp_qual.c +1630 -0
  129. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/fqzcomp_qual.h +184 -0
  130. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/htscodecs.c +44 -0
  131. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/htscodecs.h +55 -0
  132. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/htscodecs_endian.h +93 -0
  133. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/pack.c +394 -0
  134. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/pack.h +86 -0
  135. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/permute.h +605 -0
  136. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/pooled_alloc.h +145 -0
  137. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/rANS_byte.h +569 -0
  138. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/rANS_static.c +850 -0
  139. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/rANS_static.h +50 -0
  140. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/rANS_static16_int.h +636 -0
  141. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/rANS_static32x16pr.c +754 -0
  142. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/rANS_static32x16pr.h +175 -0
  143. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/rANS_static32x16pr_avx2.c +1623 -0
  144. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/rANS_static32x16pr_avx512.c +1188 -0
  145. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/rANS_static32x16pr_neon.c +1975 -0
  146. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/rANS_static32x16pr_sse4.c +1828 -0
  147. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/rANS_static4x16.h +109 -0
  148. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/rANS_static4x16pr.c +1878 -0
  149. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/rANS_word.h +480 -0
  150. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/rle.c +207 -0
  151. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/rle.h +95 -0
  152. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/tokenise_name3.c +1839 -0
  153. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/tokenise_name3.h +65 -0
  154. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/utils.c +234 -0
  155. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/utils.h +412 -0
  156. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/varint.h +446 -0
  157. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/varint2.h +318 -0
  158. ccounts-0.1.0a0/vendor/htslib/htscodecs/htscodecs/version.h +1 -0
  159. ccounts-0.1.0a0/vendor/htslib/htscodecs/m4/ax_search_libs_rev.m4 +42 -0
  160. ccounts-0.1.0a0/vendor/htslib/htscodecs/m4/hts_check_compile_flags_needed.m4 +63 -0
  161. ccounts-0.1.0a0/vendor/htslib/htscodecs/m4/vl_prog_warnings.m4 +125 -0
  162. ccounts-0.1.0a0/vendor/htslib/htscodecs_bundled.mk +72 -0
  163. ccounts-0.1.0a0/vendor/htslib/htscodecs_external.mk +46 -0
  164. ccounts-0.1.0a0/vendor/htslib/htsfile.1 +94 -0
  165. ccounts-0.1.0a0/vendor/htslib/htsfile.c +324 -0
  166. ccounts-0.1.0a0/vendor/htslib/htslib/bgzf.h +506 -0
  167. ccounts-0.1.0a0/vendor/htslib/htslib/cram.h +826 -0
  168. ccounts-0.1.0a0/vendor/htslib/htslib/faidx.h +391 -0
  169. ccounts-0.1.0a0/vendor/htslib/htslib/hfile.h +393 -0
  170. ccounts-0.1.0a0/vendor/htslib/htslib/hts.h +1607 -0
  171. ccounts-0.1.0a0/vendor/htslib/htslib/hts_defs.h +141 -0
  172. ccounts-0.1.0a0/vendor/htslib/htslib/hts_endian.h +362 -0
  173. ccounts-0.1.0a0/vendor/htslib/htslib/hts_expr.h +152 -0
  174. ccounts-0.1.0a0/vendor/htslib/htslib/hts_log.h +97 -0
  175. ccounts-0.1.0a0/vendor/htslib/htslib/hts_os.h +86 -0
  176. ccounts-0.1.0a0/vendor/htslib/htslib/kbitset.h +203 -0
  177. ccounts-0.1.0a0/vendor/htslib/htslib/kfunc.h +91 -0
  178. ccounts-0.1.0a0/vendor/htslib/htslib/khash.h +786 -0
  179. ccounts-0.1.0a0/vendor/htslib/htslib/khash_str2int.h +135 -0
  180. ccounts-0.1.0a0/vendor/htslib/htslib/klist.h +136 -0
  181. ccounts-0.1.0a0/vendor/htslib/htslib/knetfile.h +117 -0
  182. ccounts-0.1.0a0/vendor/htslib/htslib/kroundup.h +76 -0
  183. ccounts-0.1.0a0/vendor/htslib/htslib/kseq.h +255 -0
  184. ccounts-0.1.0a0/vendor/htslib/htslib/ksort.h +322 -0
  185. ccounts-0.1.0a0/vendor/htslib/htslib/kstring.h +517 -0
  186. ccounts-0.1.0a0/vendor/htslib/htslib/regidx.h +242 -0
  187. ccounts-0.1.0a0/vendor/htslib/htslib/sam.h +2450 -0
  188. ccounts-0.1.0a0/vendor/htslib/htslib/synced_bcf_reader.h +417 -0
  189. ccounts-0.1.0a0/vendor/htslib/htslib/tbx.h +144 -0
  190. ccounts-0.1.0a0/vendor/htslib/htslib/thread_pool.h +393 -0
  191. ccounts-0.1.0a0/vendor/htslib/htslib/vcf.h +1679 -0
  192. ccounts-0.1.0a0/vendor/htslib/htslib/vcf_sweep.h +57 -0
  193. ccounts-0.1.0a0/vendor/htslib/htslib/vcfutils.h +143 -0
  194. ccounts-0.1.0a0/vendor/htslib/htslib-s3-plugin.7 +215 -0
  195. ccounts-0.1.0a0/vendor/htslib/htslib.map +664 -0
  196. ccounts-0.1.0a0/vendor/htslib/htslib.mk +196 -0
  197. ccounts-0.1.0a0/vendor/htslib/htslib.pc.in +15 -0
  198. ccounts-0.1.0a0/vendor/htslib/htslib_vars.mk +54 -0
  199. ccounts-0.1.0a0/vendor/htslib/kfunc.c +313 -0
  200. ccounts-0.1.0a0/vendor/htslib/kstring.c +555 -0
  201. ccounts-0.1.0a0/vendor/htslib/m4/hts_check_compile_flags_needed.m4 +63 -0
  202. ccounts-0.1.0a0/vendor/htslib/m4/hts_hide_dynamic_syms.m4 +118 -0
  203. ccounts-0.1.0a0/vendor/htslib/m4/hts_prog_cc_warnings.m4 +208 -0
  204. ccounts-0.1.0a0/vendor/htslib/m4/pkg.m4 +275 -0
  205. ccounts-0.1.0a0/vendor/htslib/md5.c +388 -0
  206. ccounts-0.1.0a0/vendor/htslib/multipart.c +267 -0
  207. ccounts-0.1.0a0/vendor/htslib/os/lzma_stub.h +85 -0
  208. ccounts-0.1.0a0/vendor/htslib/os/rand.c +97 -0
  209. ccounts-0.1.0a0/vendor/htslib/plugin.c +220 -0
  210. ccounts-0.1.0a0/vendor/htslib/probaln.c +468 -0
  211. ccounts-0.1.0a0/vendor/htslib/realn.c +331 -0
  212. ccounts-0.1.0a0/vendor/htslib/regidx.c +688 -0
  213. ccounts-0.1.0a0/vendor/htslib/region.c +276 -0
  214. ccounts-0.1.0a0/vendor/htslib/sam.5 +68 -0
  215. ccounts-0.1.0a0/vendor/htslib/sam.c +6331 -0
  216. ccounts-0.1.0a0/vendor/htslib/sam_internal.h +124 -0
  217. ccounts-0.1.0a0/vendor/htslib/sam_mods.c +703 -0
  218. ccounts-0.1.0a0/vendor/htslib/simd.c +234 -0
  219. ccounts-0.1.0a0/vendor/htslib/synced_bcf_reader.c +1560 -0
  220. ccounts-0.1.0a0/vendor/htslib/tabix.1 +209 -0
  221. ccounts-0.1.0a0/vendor/htslib/tabix.c +848 -0
  222. ccounts-0.1.0a0/vendor/htslib/tbx.c +642 -0
  223. ccounts-0.1.0a0/vendor/htslib/textutils.c +497 -0
  224. ccounts-0.1.0a0/vendor/htslib/textutils_internal.h +426 -0
  225. ccounts-0.1.0a0/vendor/htslib/thread_pool.c +1540 -0
  226. ccounts-0.1.0a0/vendor/htslib/thread_pool_internal.h +169 -0
  227. ccounts-0.1.0a0/vendor/htslib/vcf.5 +120 -0
  228. ccounts-0.1.0a0/vendor/htslib/vcf.c +6646 -0
  229. ccounts-0.1.0a0/vendor/htslib/vcf_sweep.c +190 -0
  230. ccounts-0.1.0a0/vendor/htslib/vcfutils.c +1485 -0
  231. ccounts-0.1.0a0/vendor/htslib/version.sh +59 -0
@@ -0,0 +1,45 @@
1
+ All files except those explicitly listed below are copyright Genome
2
+ Research Limited and are made available under the BSD license.
3
+
4
+ > Redistribution and use in source and binary forms, with or without
5
+ > modification, are permitted provided that the following conditions
6
+ > are met:
7
+ >
8
+ > (1) Redistributions of source code must retain the above copyright
9
+ > notice, this list of conditions and the following disclaimer.
10
+ >
11
+ > (2) Redistributions in binary form must reproduce the above copyright
12
+ > notice, this list of conditions and the following disclaimer in
13
+ > the documentation and/or other materials provided with the distribution.
14
+ >
15
+ > (3)The name of the author may not be used to endorse or promote
16
+ > products derived from this software without specific prior written
17
+ > permission.
18
+ >
19
+ > THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20
+ > IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
+ > WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ > DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
23
+ > INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
24
+ > (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ > SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26
+ > HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
27
+ > STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
28
+ > IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
+ > POSSIBILITY OF SUCH DAMAGE.
30
+
31
+ c_range_coder.h is Public Domain, derived from work by Eugene
32
+ Shelwien.
33
+
34
+ rANS_byte.h and rANS_word.h are derived from Fabien Giesen's work and
35
+ is Public Domain. https://github.com/rygorous/ryg_rans This work was
36
+ in turn based on the ANS family of entropy encoders as described by
37
+ Jarek Duda's paper: http://arxiv.org/abs/1311.2540
38
+
39
+ > To the extent possible under law, Fabian Giesen has waived all
40
+ > copyright and related or neighboring rights to ryg_rans, as
41
+ > per the terms of the CC0 license:
42
+ >
43
+ > https://creativecommons.org/publicdomain/zero/1.0
44
+ >
45
+ > This work is published from the United States.
@@ -0,0 +1,69 @@
1
+ [Files in this distribution outwith the cram/ subdirectory are distributed
2
+ according to the terms of the following MIT/Expat license.]
3
+
4
+ The MIT/Expat License
5
+
6
+ Copyright (C) 2012-2025 Genome Research Ltd.
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
21
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24
+ DEALINGS IN THE SOFTWARE.
25
+
26
+
27
+ [Files within the cram/ subdirectory in this distribution are distributed
28
+ according to the terms of the following Modified 3-Clause BSD license.]
29
+
30
+ The Modified-BSD License
31
+
32
+ Copyright (C) 2012-2025 Genome Research Ltd.
33
+
34
+ Redistribution and use in source and binary forms, with or without
35
+ modification, are permitted provided that the following conditions are met:
36
+
37
+ 1. Redistributions of source code must retain the above copyright notice,
38
+ this list of conditions and the following disclaimer.
39
+
40
+ 2. Redistributions in binary form must reproduce the above copyright notice,
41
+ this list of conditions and the following disclaimer in the documentation
42
+ and/or other materials provided with the distribution.
43
+
44
+ 3. Neither the names Genome Research Ltd and Wellcome Trust Sanger Institute
45
+ nor the names of its contributors may be used to endorse or promote products
46
+ derived from this software without specific prior written permission.
47
+
48
+ THIS SOFTWARE IS PROVIDED BY GENOME RESEARCH LTD AND CONTRIBUTORS "AS IS"
49
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
50
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
51
+ DISCLAIMED. IN NO EVENT SHALL GENOME RESEARCH LTD OR ITS CONTRIBUTORS BE LIABLE
52
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
53
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
54
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
55
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
56
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
57
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
58
+
59
+
60
+ [The use of a range of years within a copyright notice in this distribution
61
+ should be interpreted as being equivalent to a list of years including the
62
+ first and last year specified and all consecutive years between them.
63
+
64
+ For example, a copyright notice that reads "Copyright (C) 2005, 2007-2009,
65
+ 2011-2012" should be interpreted as being identical to a notice that reads
66
+ "Copyright (C) 2005, 2007, 2008, 2009, 2011, 2012" and a copyright notice
67
+ that reads "Copyright (C) 2005-2012" should be interpreted as being identical
68
+ to a notice that reads "Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010,
69
+ 2011, 2012".]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nolan H. Hamilton
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,20 @@
1
+ include LICENSE
2
+ include HTSLIB_LICENSE.txt
3
+ include HTSCODECS_LICENSE.md
4
+ include ZLIB_LICENSE.txt
5
+ recursive-include src/ccounts *.pyx *.pxi *.h *.c
6
+ graft vendor/htslib
7
+ prune vendor/htslib/.git
8
+ prune vendor/htslib/.github
9
+ prune vendor/htslib/test
10
+ prune vendor/htslib/samples
11
+ prune vendor/htslib/htscodecs/tests
12
+ prune vendor/htslib/htscodecs/javascript
13
+ prune build
14
+ prune dist
15
+ global-exclude __pycache__ .DS_Store *.pyc *.so *.dylib *.dll *.o *.a
16
+ exclude vendor/htslib/config.h
17
+ exclude vendor/htslib/config.mk
18
+ exclude vendor/htslib/config_vars.h
19
+ exclude vendor/htslib/htscodecs.mk
20
+ recursive-include tests *.py *.tsv *.bam *.bai *.sizes *.bedGraph *.h5ad *.txt
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.4
2
+ Name: ccounts
3
+ Version: 0.1.0a0
4
+ Summary: Genomic bin counting and explicit depth normalization
5
+ License-Expression: MIT
6
+ Requires-Python: >=3.10
7
+ License-File: LICENSE
8
+ License-File: HTSLIB_LICENSE.txt
9
+ License-File: HTSCODECS_LICENSE.md
10
+ License-File: ZLIB_LICENSE.txt
11
+ Requires-Dist: numpy>=2.1
12
+ Provides-Extra: h5ad
13
+ Requires-Dist: anndata>=0.11; extra == "h5ad"
14
+ Requires-Dist: h5py>=3.8; extra == "h5ad"
15
+ Requires-Dist: scipy>=1.15; extra == "h5ad"
16
+ Provides-Extra: test
17
+ Requires-Dist: pytest; extra == "test"
18
+ Requires-Dist: pysam>=0.23.3; extra == "test"
19
+ Requires-Dist: anndata>=0.11; extra == "test"
20
+ Requires-Dist: h5py>=3.8; extra == "test"
21
+ Dynamic: license-file
@@ -0,0 +1,10 @@
1
+ # `ccounts`
2
+
3
+ * Utilities for counting in bulk and single-cell seq data.
4
+ * Inlined genome assembly resources for human, mouse, rat, fruit flies, yeast, etc.
5
+ * Fast C backend with vendored HTSLIB and cython wrappers
6
+
7
+ Many of these resources were formerly packaged with `Consenrich` but have outgrown it and are easier to maintain as a separate package now.
8
+
9
+ Documentation is a work-in-progress but the code is organized to be 'self-documenting' for most purposes. Feel free to open an issue if anything is unclear. PRs welcome.
10
+
@@ -0,0 +1,22 @@
1
+ Copyright notice:
2
+
3
+ (C) 1995-2022 Jean-loup Gailly and Mark Adler
4
+
5
+ This software is provided 'as-is', without any express or implied
6
+ warranty. In no event will the authors be held liable for any damages
7
+ arising from the use of this software.
8
+
9
+ Permission is granted to anyone to use this software for any purpose,
10
+ including commercial applications, and to alter it and redistribute it
11
+ freely, subject to the following restrictions:
12
+
13
+ 1. The origin of this software must not be misrepresented; you must not
14
+ claim that you wrote the original software. If you use this software
15
+ in a product, an acknowledgment in the product documentation would be
16
+ appreciated but is not required.
17
+ 2. Altered source versions must be plainly marked as such, and must not be
18
+ misrepresented as being the original software.
19
+ 3. This notice may not be removed or altered from any source distribution.
20
+
21
+ Jean-loup Gailly Mark Adler
22
+ jloup@gzip.org madler@alumni.caltech.edu
@@ -0,0 +1,44 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77", "Cython>=3.1.8,<3.3", "numpy>=2.1"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "ccounts"
7
+ version = "0.1.0a0"
8
+ description = "Genomic bin counting and explicit depth normalization"
9
+ requires-python = ">=3.10"
10
+ license = "MIT"
11
+ license-files = ["LICENSE", "HTSLIB_LICENSE.txt", "HTSCODECS_LICENSE.md", "ZLIB_LICENSE.txt"]
12
+ dependencies = ["numpy>=2.1"]
13
+
14
+ [project.optional-dependencies]
15
+ h5ad = ["anndata>=0.11", "h5py>=3.8", "scipy>=1.15"]
16
+ test = ["pytest", "pysam>=0.23.3", "anndata>=0.11", "h5py>=3.8"]
17
+
18
+ [tool.setuptools]
19
+ package-dir = {"" = "src"}
20
+ include-package-data = false
21
+
22
+ [tool.setuptools.packages.find]
23
+ where = ["src"]
24
+ include = ["ccounts", "ccounts.*"]
25
+
26
+ [tool.pytest.ini_options]
27
+ testpaths = ["tests"]
28
+ python_files = ["test*.py"]
29
+
30
+ [tool.cibuildwheel]
31
+ build = "cp310-* cp311-* cp312-* cp313-* cp314-*"
32
+ test-extras = ["test", "h5ad"]
33
+ test-command = [
34
+ 'python -I -c "import ccounts._native, anndata, h5py, pysam, scipy"',
35
+ 'python -I -m pytest -q --import-mode=importlib {project}/tests',
36
+ ]
37
+
38
+ [[tool.cibuildwheel.overrides]]
39
+ select = "*-manylinux*"
40
+ before-all = "dnf install -y zlib-devel"
41
+
42
+ [[tool.cibuildwheel.overrides]]
43
+ select = "*-musllinux*"
44
+ before-all = "apk add --no-cache zlib-dev"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,67 @@
1
+ from pathlib import Path
2
+ import os
3
+ import shutil
4
+ import subprocess
5
+ import sys
6
+ import sysconfig
7
+
8
+ import numpy
9
+ from Cython.Build import cythonize
10
+ from setuptools import Extension, setup
11
+ from setuptools.command.build_ext import build_ext
12
+
13
+ rootDir = Path(__file__).resolve().parent
14
+ vendorDir = rootDir / "vendor" / "htslib"
15
+
16
+
17
+ class BuildNative(build_ext):
18
+ def build_extensions(self):
19
+ buildDir = Path(self.build_temp).resolve() / "vendor" / "htslib"
20
+ if buildDir.exists():
21
+ shutil.rmtree(buildDir)
22
+ buildDir.parent.mkdir(parents=True, exist_ok=True)
23
+ shutil.copytree(vendorDir, buildDir, ignore=shutil.ignore_patterns("*.o", "*.a", ".git", ".DS_Store", "config.h", "config.mk", "config_vars.h", "htscodecs.mk"))
24
+ cflags = "-O3 -fvisibility=hidden -fPIC"
25
+ if sys.platform == "darwin":
26
+ target = os.environ.get("MACOSX_DEPLOYMENT_TARGET") or sysconfig.get_config_var("MACOSX_DEPLOYMENT_TARGET")
27
+ if target:
28
+ cflags += f" -mmacosx-version-min={target}"
29
+ (buildDir / "config.mk").write_text(
30
+ f"CC = {os.environ.get('CC', 'cc')}\n"
31
+ f"RANLIB = {os.environ.get('RANLIB', 'ranlib')}\n"
32
+ f"CPPFLAGS = -I{sys.prefix}/include\n"
33
+ f"CFLAGS = {cflags}\n"
34
+ "LDFLAGS =\nVERSION_SCRIPT_LDFLAGS =\nLIBS = -lz -lm\n"
35
+ "NONCONFIGURE_OBJS =\nplugin_OBJS =\nnoplugin_LDFLAGS =\nnoplugin_LIBS =\n"
36
+ "REF_CACHE_PROGRAMS =\nHTS_CFLAGS_AVX2 =\nHTS_CFLAGS_AVX512 =\nHTS_CFLAGS_SSE4 =\n"
37
+ )
38
+ (buildDir / "config.h").write_text(
39
+ "#ifndef _XOPEN_SOURCE\n#define _XOPEN_SOURCE 600\n#endif\n"
40
+ "#define HAVE_DRAND48 1\n"
41
+ "#if defined __x86_64__\n#define HAVE_X86INTRIN_H 1\n#endif\n"
42
+ "#if defined __x86_64__ || defined __arm__ || defined __aarch64__\n#define HAVE_ATTRIBUTE_CONSTRUCTOR 1\n#endif\n"
43
+ "#if defined __linux__\n#define HAVE_GETAUXVAL 1\n#elif defined __FreeBSD__\n#define HAVE_ELF_AUX_INFO 1\n#elif defined __OpenBSD__\n#define HAVE_OPENBSD 1\n#endif\n"
44
+ )
45
+ (buildDir / "config_vars.h").write_text(
46
+ '#define HTS_CC ""\n'
47
+ '#define HTS_CPPFLAGS ""\n'
48
+ '#define HTS_CFLAGS ""\n'
49
+ '#define HTS_LDFLAGS ""\n'
50
+ '#define HTS_LIBS ""\n'
51
+ )
52
+ subprocess.run(["make", "-C", str(buildDir), "-j2", "lib-static"], check=True)
53
+ for extension in self.extensions:
54
+ extension.include_dirs.extend([str(buildDir), str(buildDir / "htslib")])
55
+ extension.extra_objects.append(str(buildDir / "libhts.a"))
56
+ super().build_extensions()
57
+
58
+
59
+ extension = Extension(
60
+ "ccounts._native",
61
+ sources=["src/ccounts/_native.pyx", "src/ccounts/native/countsBackend.c"],
62
+ include_dirs=[numpy.get_include(), "src/ccounts"],
63
+ libraries=["z"] + (["m", "pthread"] if sys.platform.startswith("linux") else []),
64
+ extra_objects=[],
65
+ extra_compile_args=["-O3", "-fno-trapping-math", "-fno-math-errno"],
66
+ )
67
+ setup(ext_modules=cythonize([extension], build_dir="build/cython", language_level="3"), cmdclass={"build_ext": BuildNative})
@@ -0,0 +1,15 @@
1
+ from .sources import countModes, sourceKinds, CountOptions, GridSpec, SourceSpec, readChromSizes, prepareIndex, selectionGroups
2
+ from .fragmentLength import FragmentLengthOptions
3
+ from .counting import CountBlock, Reader, openSources
4
+ from .normalization import LibraryTotals, Normalization, estimateSizeFactors
5
+ from .transforms import logTransform
6
+ from .genomes import standardChromosomes, assemblyChromosomeSizes, assemblyBlacklistRanges
7
+
8
+ __version__ = "0.1.0a0"
9
+
10
+ __all__ = [
11
+ "FragmentLengthOptions", "countModes", "sourceKinds", "CountOptions", "GridSpec", "SourceSpec", "CountBlock", "Reader",
12
+ "LibraryTotals", "Normalization", "estimateSizeFactors", "openSources", "readChromSizes",
13
+ "prepareIndex", "selectionGroups", "logTransform", "standardChromosomes",
14
+ "assemblyChromosomeSizes", "assemblyBlacklistRanges", "__version__",
15
+ ]