flashalign 0.1.0__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.
Files changed (260) hide show
  1. flashalign-0.1.0/.gitignore +7 -0
  2. flashalign-0.1.0/CMakeLists.txt +215 -0
  3. flashalign-0.1.0/LICENSE +21 -0
  4. flashalign-0.1.0/PKG-INFO +245 -0
  5. flashalign-0.1.0/README.md +221 -0
  6. flashalign-0.1.0/THIRD_PARTY_NOTICES.md +81 -0
  7. flashalign-0.1.0/cmake/CompilerOptions.cmake +12 -0
  8. flashalign-0.1.0/cmake/Dependencies.cmake +8 -0
  9. flashalign-0.1.0/cmake/FlashAlignConfig.cmake.in +3 -0
  10. flashalign-0.1.0/cmake/GenerateVersion.cmake +67 -0
  11. flashalign-0.1.0/cmake/Modules.cmake +133 -0
  12. flashalign-0.1.0/csrc/api/aligner.cpp +269 -0
  13. flashalign-0.1.0/csrc/api/aligner.h +192 -0
  14. flashalign-0.1.0/csrc/api/fastx.cpp +123 -0
  15. flashalign-0.1.0/csrc/api/public.cpp +585 -0
  16. flashalign-0.1.0/csrc/api/reference_kind.cpp +89 -0
  17. flashalign-0.1.0/csrc/chaining/anchor.h +32 -0
  18. flashalign-0.1.0/csrc/chaining/colinear_chain.cpp +292 -0
  19. flashalign-0.1.0/csrc/chaining/colinear_chain.h +24 -0
  20. flashalign-0.1.0/csrc/chaining/colinear_params.h +39 -0
  21. flashalign-0.1.0/csrc/chaining/dense_chain.cpp +1996 -0
  22. flashalign-0.1.0/csrc/chaining/dense_chain.h +177 -0
  23. flashalign-0.1.0/csrc/chaining/geometry.h +26 -0
  24. flashalign-0.1.0/csrc/chaining/partition.cpp +80 -0
  25. flashalign-0.1.0/csrc/chaining/partition.h +35 -0
  26. flashalign-0.1.0/csrc/chaining/result.h +24 -0
  27. flashalign-0.1.0/csrc/cli/align_command.cpp +814 -0
  28. flashalign-0.1.0/csrc/cli/align_command.h +9 -0
  29. flashalign-0.1.0/csrc/cli/errors.h +17 -0
  30. flashalign-0.1.0/csrc/cli/help.cpp +112 -0
  31. flashalign-0.1.0/csrc/cli/help.h +11 -0
  32. flashalign-0.1.0/csrc/cli/index_command.cpp +422 -0
  33. flashalign-0.1.0/csrc/cli/index_command.h +9 -0
  34. flashalign-0.1.0/csrc/cli/main.cpp +82 -0
  35. flashalign-0.1.0/csrc/cli/option_registry.cpp +270 -0
  36. flashalign-0.1.0/csrc/cli/option_registry.h +108 -0
  37. flashalign-0.1.0/csrc/cli/output_writer.cpp +354 -0
  38. flashalign-0.1.0/csrc/cli/output_writer.h +83 -0
  39. flashalign-0.1.0/csrc/cli/parse.cpp +691 -0
  40. flashalign-0.1.0/csrc/cli/parse.h +135 -0
  41. flashalign-0.1.0/csrc/cli/read_group.h +85 -0
  42. flashalign-0.1.0/csrc/cli/report.cpp +394 -0
  43. flashalign-0.1.0/csrc/cli/report.h +54 -0
  44. flashalign-0.1.0/csrc/core/checked_range.h +102 -0
  45. flashalign-0.1.0/csrc/core/cigar.cpp +466 -0
  46. flashalign-0.1.0/csrc/core/cigar.h +192 -0
  47. flashalign-0.1.0/csrc/core/flat_int64_map.h +176 -0
  48. flashalign-0.1.0/csrc/core/hash.h +47 -0
  49. flashalign-0.1.0/csrc/core/radix_sort.h +81 -0
  50. flashalign-0.1.0/csrc/core/sequence.cpp +19 -0
  51. flashalign-0.1.0/csrc/core/sequence.h +16 -0
  52. flashalign-0.1.0/csrc/core/types.h +53 -0
  53. flashalign-0.1.0/csrc/dna/alternative_hypothesis.cpp +264 -0
  54. flashalign-0.1.0/csrc/dna/alternative_hypothesis.h +97 -0
  55. flashalign-0.1.0/csrc/dna/backend.cpp +1873 -0
  56. flashalign-0.1.0/csrc/dna/backend.h +54 -0
  57. flashalign-0.1.0/csrc/dna/chain_mapq.cpp +643 -0
  58. flashalign-0.1.0/csrc/dna/chain_mapq.h +450 -0
  59. flashalign-0.1.0/csrc/dna/cigar_geometry.h +52 -0
  60. flashalign-0.1.0/csrc/dna/context.h +121 -0
  61. flashalign-0.1.0/csrc/dna/dp_runner.cpp +98 -0
  62. flashalign-0.1.0/csrc/dna/dp_runner.h +53 -0
  63. flashalign-0.1.0/csrc/dna/family_projection.cpp +245 -0
  64. flashalign-0.1.0/csrc/dna/family_projection.h +57 -0
  65. flashalign-0.1.0/csrc/dna/family_realization.cpp +1611 -0
  66. flashalign-0.1.0/csrc/dna/family_realization.h +156 -0
  67. flashalign-0.1.0/csrc/dna/geometry_work.h +43 -0
  68. flashalign-0.1.0/csrc/dna/kernel_packets.h +49 -0
  69. flashalign-0.1.0/csrc/dna/mapq_routing.cpp +72 -0
  70. flashalign-0.1.0/csrc/dna/mapq_routing.h +21 -0
  71. flashalign-0.1.0/csrc/dna/ordered_anchor_path.cpp +657 -0
  72. flashalign-0.1.0/csrc/dna/ordered_anchor_path.h +269 -0
  73. flashalign-0.1.0/csrc/dna/placement.h +16 -0
  74. flashalign-0.1.0/csrc/dna/placement_chaining.cpp +2229 -0
  75. flashalign-0.1.0/csrc/dna/placement_chaining.h +403 -0
  76. flashalign-0.1.0/csrc/dna/placement_chaining_internal.h +37 -0
  77. flashalign-0.1.0/csrc/dna/placement_family_adapter.cpp +304 -0
  78. flashalign-0.1.0/csrc/dna/placement_family_adapter.h +61 -0
  79. flashalign-0.1.0/csrc/dna/postdp_scoring.cpp +452 -0
  80. flashalign-0.1.0/csrc/dna/postdp_scoring.h +103 -0
  81. flashalign-0.1.0/csrc/dna/query_seed_pool.h +191 -0
  82. flashalign-0.1.0/csrc/dna/realization_controller.cpp +806 -0
  83. flashalign-0.1.0/csrc/dna/realization_controller.h +304 -0
  84. flashalign-0.1.0/csrc/dna/record_divergence.h +77 -0
  85. flashalign-0.1.0/csrc/dna/record_family.cpp +81 -0
  86. flashalign-0.1.0/csrc/dna/record_family.h +36 -0
  87. flashalign-0.1.0/csrc/dna/region_gap.h +14 -0
  88. flashalign-0.1.0/csrc/dna/residue_emission.cpp +122 -0
  89. flashalign-0.1.0/csrc/dna/residue_emission.h +60 -0
  90. flashalign-0.1.0/csrc/dna/residue_trigger.cpp +286 -0
  91. flashalign-0.1.0/csrc/dna/residue_trigger.h +82 -0
  92. flashalign-0.1.0/csrc/dna/result.h +33 -0
  93. flashalign-0.1.0/csrc/dna/retained_seed_density.cpp +380 -0
  94. flashalign-0.1.0/csrc/dna/retained_seed_density.h +82 -0
  95. flashalign-0.1.0/csrc/dna/worker_scratch.h +21 -0
  96. flashalign-0.1.0/csrc/dp/control.h +474 -0
  97. flashalign-0.1.0/csrc/dp/kernel.h +9 -0
  98. flashalign-0.1.0/csrc/dp/ksw2.h +215 -0
  99. flashalign-0.1.0/csrc/dp/ksw2_align.h +40 -0
  100. flashalign-0.1.0/csrc/dp/ksw2_extd2_sse.c +430 -0
  101. flashalign-0.1.0/csrc/dp/ksw2_exts2_sse.c +494 -0
  102. flashalign-0.1.0/csrc/dp/ksw2_extz2_sse.c +341 -0
  103. flashalign-0.1.0/csrc/dp/ksw2_ll_sse.c +181 -0
  104. flashalign-0.1.0/csrc/dp/ksw_arena.c +120 -0
  105. flashalign-0.1.0/csrc/dp/ksw_arena.h +39 -0
  106. flashalign-0.1.0/csrc/dp/ksw_arena_tls.h +29 -0
  107. flashalign-0.1.0/csrc/dp/params.h +42 -0
  108. flashalign-0.1.0/csrc/dp/result.h +20 -0
  109. flashalign-0.1.0/csrc/dp/splice_kernel.cpp +161 -0
  110. flashalign-0.1.0/csrc/dp/splice_kernel.h +114 -0
  111. flashalign-0.1.0/csrc/dp/sse2neon/emmintrin.h +1689 -0
  112. flashalign-0.1.0/csrc/engine/aligner.h +847 -0
  113. flashalign-0.1.0/csrc/index/build.h +528 -0
  114. flashalign-0.1.0/csrc/index/builder.cpp +480 -0
  115. flashalign-0.1.0/csrc/index/faix.h +372 -0
  116. flashalign-0.1.0/csrc/index/faix_format.cpp +256 -0
  117. flashalign-0.1.0/csrc/index/faix_multipart_writer.h +165 -0
  118. flashalign-0.1.0/csrc/index/faix_publish.h +140 -0
  119. flashalign-0.1.0/csrc/index/faix_storage_posix.cpp +560 -0
  120. flashalign-0.1.0/csrc/index/format.h +870 -0
  121. flashalign-0.1.0/csrc/index/index.h +44 -0
  122. flashalign-0.1.0/csrc/index/occ_stats.h +89 -0
  123. flashalign-0.1.0/csrc/index/reference_context.h +46 -0
  124. flashalign-0.1.0/csrc/index/seed.h +609 -0
  125. flashalign-0.1.0/csrc/io/alignment_aux_tags.h +58 -0
  126. flashalign-0.1.0/csrc/io/bam.cpp +339 -0
  127. flashalign-0.1.0/csrc/io/bam.h +78 -0
  128. flashalign-0.1.0/csrc/io/bam_reader.h +246 -0
  129. flashalign-0.1.0/csrc/io/batch_reader.h +43 -0
  130. flashalign-0.1.0/csrc/io/bgzf.h +234 -0
  131. flashalign-0.1.0/csrc/io/block_divergence.h +117 -0
  132. flashalign-0.1.0/csrc/io/byte_source.cpp +208 -0
  133. flashalign-0.1.0/csrc/io/byte_source.h +104 -0
  134. flashalign-0.1.0/csrc/io/deflate_split.cpp +249 -0
  135. flashalign-0.1.0/csrc/io/deflate_split.h +68 -0
  136. flashalign-0.1.0/csrc/io/emitted_role.h +69 -0
  137. flashalign-0.1.0/csrc/io/fastx.h +179 -0
  138. flashalign-0.1.0/csrc/io/gz_member_source.cpp +2027 -0
  139. flashalign-0.1.0/csrc/io/gz_member_source.h +122 -0
  140. flashalign-0.1.0/csrc/io/paf.cpp +101 -0
  141. flashalign-0.1.0/csrc/io/paf.h +36 -0
  142. flashalign-0.1.0/csrc/io/reads.h +78 -0
  143. flashalign-0.1.0/csrc/io/sam.cpp +447 -0
  144. flashalign-0.1.0/csrc/io/sam.h +137 -0
  145. flashalign-0.1.0/csrc/io/sam_tags.cpp +232 -0
  146. flashalign-0.1.0/csrc/io/sam_tags.h +24 -0
  147. flashalign-0.1.0/csrc/io/vendor/kseq.h +248 -0
  148. flashalign-0.1.0/csrc/options/common_profile.h +34 -0
  149. flashalign-0.1.0/csrc/options/dna_profile.h +217 -0
  150. flashalign-0.1.0/csrc/options/presets.h +249 -0
  151. flashalign-0.1.0/csrc/options/resolve.cpp +448 -0
  152. flashalign-0.1.0/csrc/options/resolve.h +18 -0
  153. flashalign-0.1.0/csrc/options/resolved_options.h +50 -0
  154. flashalign-0.1.0/csrc/options/rna_profile.h +51 -0
  155. flashalign-0.1.0/csrc/options/types.h +123 -0
  156. flashalign-0.1.0/csrc/python/bind_aligner.cpp +335 -0
  157. flashalign-0.1.0/csrc/python/bind_alignment.cpp +258 -0
  158. flashalign-0.1.0/csrc/python/bind_config.cpp +221 -0
  159. flashalign-0.1.0/csrc/python/bind_fastx.cpp +88 -0
  160. flashalign-0.1.0/csrc/python/bind_index.cpp +158 -0
  161. flashalign-0.1.0/csrc/python/bindings.h +36 -0
  162. flashalign-0.1.0/csrc/python/module.cpp +74 -0
  163. flashalign-0.1.0/csrc/rna/anchoring/exact_anchor_path.cpp +241 -0
  164. flashalign-0.1.0/csrc/rna/anchoring/exact_anchor_path.h +92 -0
  165. flashalign-0.1.0/csrc/rna/anchoring/frame_diagonal_support.cpp +164 -0
  166. flashalign-0.1.0/csrc/rna/anchoring/frame_diagonal_support.h +72 -0
  167. flashalign-0.1.0/csrc/rna/anchoring/query_span.h +86 -0
  168. flashalign-0.1.0/csrc/rna/anchoring/refusal.h +130 -0
  169. flashalign-0.1.0/csrc/rna/anchoring/select_exact_anchor_path.cpp +200 -0
  170. flashalign-0.1.0/csrc/rna/anchoring/select_exact_anchor_path.h +36 -0
  171. flashalign-0.1.0/csrc/rna/anchoring/selected_locus_anchoring.cpp +157 -0
  172. flashalign-0.1.0/csrc/rna/anchoring/selected_locus_anchoring.h +78 -0
  173. flashalign-0.1.0/csrc/rna/anchoring/skeleton_harvest.cpp +684 -0
  174. flashalign-0.1.0/csrc/rna/anchoring/skeleton_harvest.h +326 -0
  175. flashalign-0.1.0/csrc/rna/anchoring/skeleton_regions.cpp +92 -0
  176. flashalign-0.1.0/csrc/rna/anchoring/skeleton_regions.h +66 -0
  177. flashalign-0.1.0/csrc/rna/annotation/known_junctions.cpp +219 -0
  178. flashalign-0.1.0/csrc/rna/annotation/known_junctions.h +48 -0
  179. flashalign-0.1.0/csrc/rna/backend.cpp +2079 -0
  180. flashalign-0.1.0/csrc/rna/backend.h +46 -0
  181. flashalign-0.1.0/csrc/rna/chain_mapq.cpp +243 -0
  182. flashalign-0.1.0/csrc/rna/chain_mapq.h +210 -0
  183. flashalign-0.1.0/csrc/rna/config.cpp +31 -0
  184. flashalign-0.1.0/csrc/rna/config.h +47 -0
  185. flashalign-0.1.0/csrc/rna/context.h +68 -0
  186. flashalign-0.1.0/csrc/rna/output.cpp +74 -0
  187. flashalign-0.1.0/csrc/rna/output.h +38 -0
  188. flashalign-0.1.0/csrc/rna/placement/aggregate.cpp +41 -0
  189. flashalign-0.1.0/csrc/rna/placement/aggregate.h +22 -0
  190. flashalign-0.1.0/csrc/rna/placement/bin_peak_math.h +93 -0
  191. flashalign-0.1.0/csrc/rna/placement/coarse_chain.cpp +474 -0
  192. flashalign-0.1.0/csrc/rna/placement/coarse_chain.h +107 -0
  193. flashalign-0.1.0/csrc/rna/placement/coarse_transition.h +95 -0
  194. flashalign-0.1.0/csrc/rna/placement/fused_capture.cpp +324 -0
  195. flashalign-0.1.0/csrc/rna/placement/fused_capture.h +125 -0
  196. flashalign-0.1.0/csrc/rna/placement/output.cpp +47 -0
  197. flashalign-0.1.0/csrc/rna/placement/output.h +23 -0
  198. flashalign-0.1.0/csrc/rna/placement/types.h +47 -0
  199. flashalign-0.1.0/csrc/rna/query_partition.cpp +1322 -0
  200. flashalign-0.1.0/csrc/rna/query_partition.h +350 -0
  201. flashalign-0.1.0/csrc/rna/realization/controller_metrics.h +185 -0
  202. flashalign-0.1.0/csrc/rna/realization/rank2_arbitration.cpp +23 -0
  203. flashalign-0.1.0/csrc/rna/realization/rank2_arbitration.h +21 -0
  204. flashalign-0.1.0/csrc/rna/realization/rival_lifecycle.cpp +333 -0
  205. flashalign-0.1.0/csrc/rna/realization/rival_lifecycle.h +248 -0
  206. flashalign-0.1.0/csrc/rna/realization/rival_lifecycle_config.h +26 -0
  207. flashalign-0.1.0/csrc/rna/realization/splice_anchor.h +39 -0
  208. flashalign-0.1.0/csrc/rna/realization/splice_anchor_view.cpp +150 -0
  209. flashalign-0.1.0/csrc/rna/realization/splice_anchor_view.h +22 -0
  210. flashalign-0.1.0/csrc/rna/realization/splice_controller.cpp +1616 -0
  211. flashalign-0.1.0/csrc/rna/realization/splice_controller.h +140 -0
  212. flashalign-0.1.0/csrc/rna/realization/splice_realizer.cpp +422 -0
  213. flashalign-0.1.0/csrc/rna/realization/splice_realizer.h +122 -0
  214. flashalign-0.1.0/csrc/rna/realization/splice_scratch.h +76 -0
  215. flashalign-0.1.0/csrc/rna/result.h +19 -0
  216. flashalign-0.1.0/csrc/rna/rival_pricing.cpp +86 -0
  217. flashalign-0.1.0/csrc/rna/rival_pricing.h +39 -0
  218. flashalign-0.1.0/csrc/rna/worker_scratch.h +38 -0
  219. flashalign-0.1.0/csrc/seeding/context.h +174 -0
  220. flashalign-0.1.0/csrc/seeding/posting_density.cpp +18 -0
  221. flashalign-0.1.0/csrc/seeding/posting_density.h +14 -0
  222. flashalign-0.1.0/csrc/seeding/scratch.h +365 -0
  223. flashalign-0.1.0/csrc/seeding/select.h +238 -0
  224. flashalign-0.1.0/csrc/seeding/syncmer.h +326 -0
  225. flashalign-0.1.0/csrc/seeding/tie_hash.h +90 -0
  226. flashalign-0.1.0/csrc/seeding/types.h +175 -0
  227. flashalign-0.1.0/csrc/split/coordinates.h +64 -0
  228. flashalign-0.1.0/csrc/split/query_geometry.h +50 -0
  229. flashalign-0.1.0/csrc/threading/batch_window.h +257 -0
  230. flashalign-0.1.0/csrc/threading/parallel_for.h +262 -0
  231. flashalign-0.1.0/csrc/threading/pipeline.h +199 -0
  232. flashalign-0.1.0/csrc/threading/thread_name.h +28 -0
  233. flashalign-0.1.0/csrc/version.h.in +7 -0
  234. flashalign-0.1.0/csrc/voting/accumulate.h +112 -0
  235. flashalign-0.1.0/csrc/voting/candidate_catalogue.cpp +176 -0
  236. flashalign-0.1.0/csrc/voting/candidate_catalogue.h +67 -0
  237. flashalign-0.1.0/csrc/voting/emit.h +32 -0
  238. flashalign-0.1.0/csrc/voting/extract.h +72 -0
  239. flashalign-0.1.0/csrc/voting/extract_peaks.h +24 -0
  240. flashalign-0.1.0/csrc/voting/query_partition.cpp +723 -0
  241. flashalign-0.1.0/csrc/voting/query_partition.h +117 -0
  242. flashalign-0.1.0/csrc/voting/query_tiles.cpp +71 -0
  243. flashalign-0.1.0/csrc/voting/query_tiles.h +40 -0
  244. flashalign-0.1.0/csrc/voting/rank.h +51 -0
  245. flashalign-0.1.0/csrc/voting/refine.h +383 -0
  246. flashalign-0.1.0/csrc/voting/state.h +67 -0
  247. flashalign-0.1.0/csrc/voting/vote.h +118 -0
  248. flashalign-0.1.0/demo.py +8 -0
  249. flashalign-0.1.0/flashalign.1 +708 -0
  250. flashalign-0.1.0/include/flashalign/aligner.hpp +107 -0
  251. flashalign-0.1.0/include/flashalign/alignment.hpp +82 -0
  252. flashalign-0.1.0/include/flashalign/config.hpp +74 -0
  253. flashalign-0.1.0/include/flashalign/fastx.hpp +47 -0
  254. flashalign-0.1.0/include/flashalign/index.hpp +99 -0
  255. flashalign-0.1.0/include/flashalign/sequence.hpp +14 -0
  256. flashalign-0.1.0/include/flashalign/version.hpp.in +13 -0
  257. flashalign-0.1.0/pyproject.toml +77 -0
  258. flashalign-0.1.0/python/flashalign/__init__.py +49 -0
  259. flashalign-0.1.0/python/flashalign/_flashalign.pyi +782 -0
  260. flashalign-0.1.0/python/flashalign/py.typed +1 -0
@@ -0,0 +1,7 @@
1
+ build/
2
+ build-*/
3
+ dist/
4
+ *.egg-info/
5
+ __pycache__/
6
+ *.so
7
+ .venv/
@@ -0,0 +1,215 @@
1
+ cmake_minimum_required(VERSION 3.18)
2
+
3
+ # The release version is read from pyproject.toml, which must hold exactly one.
4
+ file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/pyproject.toml" FA_VERSION_LINES
5
+ REGEX "^version = \"[0-9.]+\"$")
6
+ list(LENGTH FA_VERSION_LINES FA_VERSION_LINE_COUNT)
7
+ if(NOT FA_VERSION_LINE_COUNT EQUAL 1)
8
+ message(FATAL_ERROR
9
+ "pyproject.toml must contain exactly one numeric project version")
10
+ endif()
11
+ string(REGEX REPLACE "^version = \"([0-9.]+)\"$" "\\1"
12
+ FA_PROJECT_VERSION "${FA_VERSION_LINES}")
13
+
14
+ project(FlashAlign VERSION "${FA_PROJECT_VERSION}" LANGUAGES C CXX)
15
+
16
+ include(GNUInstallDirs)
17
+ include(CMakePackageConfigHelpers)
18
+
19
+ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")
20
+
21
+ set(CMAKE_CXX_STANDARD 17)
22
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
23
+ set(CMAKE_CXX_EXTENSIONS OFF)
24
+
25
+ # Version headers: cmake/GenerateVersion.cmake adds a "+g<sha>[.dirty]" suffix unless the tree
26
+ # is the release tag. It runs at configure time and again on every build (fa_version).
27
+ option(FLASHALIGN_VERSION_SUFFIX
28
+ "Append a git commit suffix (+g<sha>[.dirty]) to the reported version" ON)
29
+ set(FA_GENERATED_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/generated)
30
+ set(FA_GENERATE_VERSION_COMMAND
31
+ ${CMAKE_COMMAND}
32
+ -DFA_VERSION_BASE=${FA_PROJECT_VERSION}
33
+ -DFA_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
34
+ -DFA_VERSION_H_IN=${CMAKE_CURRENT_SOURCE_DIR}/csrc/version.h.in
35
+ -DFA_VERSION_H_OUT=${FA_GENERATED_INCLUDE_DIR}/fa_version.h
36
+ -DFA_VERSION_HPP_IN=${CMAKE_CURRENT_SOURCE_DIR}/include/flashalign/version.hpp.in
37
+ -DFA_VERSION_HPP_OUT=${FA_GENERATED_INCLUDE_DIR}/flashalign/version.hpp
38
+ -DFA_VERSION_SUFFIX=${FLASHALIGN_VERSION_SUFFIX}
39
+ -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/GenerateVersion.cmake)
40
+ file(MAKE_DIRECTORY ${FA_GENERATED_INCLUDE_DIR}/flashalign)
41
+ execute_process(COMMAND ${FA_GENERATE_VERSION_COMMAND}
42
+ RESULT_VARIABLE FA_GENERATE_VERSION_RC)
43
+ if(NOT FA_GENERATE_VERSION_RC EQUAL 0)
44
+ message(FATAL_ERROR "failed to generate the version headers")
45
+ endif()
46
+ add_custom_target(fa_version ALL
47
+ COMMAND ${FA_GENERATE_VERSION_COMMAND}
48
+ COMMENT "Refreshing the generated version headers"
49
+ VERBATIM)
50
+
51
+
52
+ include(cmake/Dependencies.cmake)
53
+
54
+ # ksw2 DP kernels, adapted from minimap2 (ksw2_ll_sse.c unmodified). SSE4.1 on x86; on ARM
55
+ # through the bundled sse2neon, with -fsigned-char because ksw2 assumes a signed char.
56
+ set(KSW2_DIR ${CMAKE_CURRENT_SOURCE_DIR}/csrc/dp)
57
+ set(KSW2_SOURCES
58
+ ${KSW2_DIR}/ksw2_extz2_sse.c
59
+ ${KSW2_DIR}/ksw2_extd2_sse.c
60
+ ${KSW2_DIR}/ksw2_exts2_sse.c
61
+ ${KSW2_DIR}/ksw2_ll_sse.c)
62
+ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64|ARM64)$")
63
+ set_source_files_properties(${KSW2_SOURCES} PROPERTIES
64
+ COMPILE_OPTIONS "-DKSW_SSE2_ONLY;-D__SSE2__;-fsigned-char;-I${KSW2_DIR}/sse2neon")
65
+ message(STATUS "FlashAlign: ksw2 built for ARM/NEON via bundled sse2neon shim.")
66
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(x86_64|AMD64|amd64|i[3-6]86)$")
67
+ include(CheckCCompilerFlag)
68
+ check_c_compiler_flag("-msse4.1" FLASHALIGN_C_HAS_MSSE41)
69
+ if(NOT FLASHALIGN_C_HAS_MSSE41)
70
+ message(FATAL_ERROR
71
+ "The selected x86 C compiler does not support ksw2's -msse4.1 flag")
72
+ endif()
73
+ set_source_files_properties(${KSW2_SOURCES} PROPERTIES COMPILE_OPTIONS "-msse4.1")
74
+ message(STATUS "FlashAlign: ksw2 built for x86 via SSE4.1.")
75
+ else()
76
+ message(FATAL_ERROR
77
+ "Unsupported ksw2 architecture: ${CMAKE_SYSTEM_PROCESSOR}")
78
+ endif()
79
+
80
+ # ksw2 and its arena allocator as one PIC object library with hidden symbols, shared by the
81
+ # CLI and the Python module. -O3 whatever the build type.
82
+ add_library(fa_ksw2 OBJECT ${KSW2_SOURCES} ${KSW2_DIR}/ksw_arena.c)
83
+ target_include_directories(fa_ksw2 PRIVATE csrc)
84
+ target_compile_options(fa_ksw2 PRIVATE -O3)
85
+ set_target_properties(fa_ksw2 PROPERTIES
86
+ POSITION_INDEPENDENT_CODE ON
87
+ C_VISIBILITY_PRESET hidden)
88
+
89
+ include(cmake/CompilerOptions.cmake)
90
+ include(cmake/Modules.cmake)
91
+
92
+ # The public C++ API, compiled once and linked into both the shared libflashalign and the
93
+ # Python extension, so the wheel holds a single shared object.
94
+ add_library(flashalign_public OBJECT csrc/api/public.cpp csrc/api/fastx.cpp)
95
+ set_target_properties(flashalign_public PROPERTIES POSITION_INDEPENDENT_CODE ON)
96
+ target_compile_features(flashalign_public PUBLIC cxx_std_17)
97
+ target_include_directories(flashalign_public
98
+ PUBLIC
99
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
100
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/generated>
101
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/csrc)
102
+ target_link_libraries(flashalign_public PUBLIC
103
+ flashalign_api flashalign_io)
104
+
105
+ add_library(flashalign_library SHARED $<TARGET_OBJECTS:flashalign_public>)
106
+ set_target_properties(flashalign_library PROPERTIES
107
+ OUTPUT_NAME flashalign
108
+ EXPORT_NAME flashalign)
109
+ target_compile_features(flashalign_library PUBLIC cxx_std_17)
110
+ target_include_directories(flashalign_library
111
+ PUBLIC
112
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
113
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/generated>
114
+ $<INSTALL_INTERFACE:include>)
115
+ target_link_libraries(flashalign_library PRIVATE
116
+ flashalign_api flashalign_io)
117
+ add_library(FlashAlign::flashalign ALIAS flashalign_library)
118
+
119
+ # The command-line tool.
120
+ add_executable(flashalign
121
+ csrc/cli/main.cpp
122
+ csrc/cli/parse.cpp
123
+ csrc/cli/help.cpp
124
+ csrc/cli/option_registry.cpp
125
+ csrc/cli/align_command.cpp
126
+ csrc/cli/output_writer.cpp
127
+ csrc/cli/index_command.cpp
128
+ csrc/cli/report.cpp
129
+ )
130
+ target_include_directories(flashalign PRIVATE csrc ${FA_GENERATED_INCLUDE_DIR})
131
+ # Both targets compile fa_version.h, which fa_version rewrites at build time.
132
+ add_dependencies(flashalign fa_version)
133
+ add_dependencies(flashalign_io fa_version)
134
+ target_link_libraries(flashalign PRIVATE
135
+ flashalign_api flashalign_io)
136
+
137
+ # The nanobind Python extension. pyproject.toml turns it on for `pip install .`.
138
+ option(FLASHALIGN_BUILD_PYTHON "Build the nanobind Python extension (_flashalign)" OFF)
139
+ if(FLASHALIGN_BUILD_PYTHON)
140
+ find_package(
141
+ Python 3.12 REQUIRED
142
+ COMPONENTS Interpreter Development.Module Development.SABIModule)
143
+ execute_process(
144
+ COMMAND "${Python_EXECUTABLE}" -c "import nanobind; print(nanobind.cmake_dir())"
145
+ OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE _nb_cmake_dir)
146
+ list(APPEND CMAKE_PREFIX_PATH "${_nb_cmake_dir}")
147
+ find_package(nanobind CONFIG REQUIRED)
148
+ # Stable ABI: one wheel per platform for Python 3.12+.
149
+ nanobind_add_module(
150
+ _flashalign STABLE_ABI NB_STATIC
151
+ csrc/python/module.cpp
152
+ csrc/python/bind_index.cpp
153
+ csrc/python/bind_config.cpp
154
+ csrc/python/bind_aligner.cpp
155
+ csrc/python/bind_alignment.cpp
156
+ csrc/python/bind_fastx.cpp)
157
+ target_include_directories(
158
+ _flashalign PRIVATE
159
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
160
+ ${CMAKE_CURRENT_BINARY_DIR}/generated)
161
+ # Linked in statically rather than against libflashalign, which auditwheel cannot bundle.
162
+ target_link_libraries(_flashalign PRIVATE flashalign_public)
163
+ # module.cpp includes the generated flashalign/version.hpp.
164
+ add_dependencies(_flashalign fa_version)
165
+ # Export no zlib or engine symbols, so they cannot clash with another zlib loaded in the
166
+ # same interpreter.
167
+ set_target_properties(_flashalign PROPERTIES
168
+ C_VISIBILITY_PRESET hidden CXX_VISIBILITY_PRESET hidden VISIBILITY_INLINES_HIDDEN ON)
169
+ if(NOT APPLE AND NOT WIN32)
170
+ target_link_options(_flashalign PRIVATE -Wl,--exclude-libs,ALL)
171
+ endif()
172
+ install(
173
+ TARGETS _flashalign
174
+ LIBRARY DESTINATION flashalign COMPONENT Python)
175
+ endif()
176
+
177
+ install(TARGETS flashalign_library
178
+ EXPORT FlashAlignTargets
179
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT SharedLibrary
180
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development
181
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT SharedLibrary
182
+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
183
+ install(
184
+ TARGETS flashalign
185
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT CLI)
186
+ install(FILES flashalign.1
187
+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
188
+ COMPONENT CLI)
189
+ install(DIRECTORY include/flashalign/
190
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/flashalign
191
+ COMPONENT Development
192
+ FILES_MATCHING PATTERN "*.hpp")
193
+ install(FILES
194
+ "${CMAKE_CURRENT_BINARY_DIR}/generated/flashalign/version.hpp"
195
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/flashalign
196
+ COMPONENT Development)
197
+
198
+ configure_package_config_file(
199
+ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/FlashAlignConfig.cmake.in"
200
+ "${CMAKE_CURRENT_BINARY_DIR}/FlashAlignConfig.cmake"
201
+ INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/FlashAlign")
202
+ write_basic_package_version_file(
203
+ "${CMAKE_CURRENT_BINARY_DIR}/FlashAlignConfigVersion.cmake"
204
+ VERSION "${PROJECT_VERSION}"
205
+ COMPATIBILITY SameMajorVersion)
206
+ install(EXPORT FlashAlignTargets
207
+ FILE FlashAlignTargets.cmake
208
+ NAMESPACE FlashAlign::
209
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/FlashAlign"
210
+ COMPONENT Development)
211
+ install(FILES
212
+ "${CMAKE_CURRENT_BINARY_DIR}/FlashAlignConfig.cmake"
213
+ "${CMAKE_CURRENT_BINARY_DIR}/FlashAlignConfigVersion.cmake"
214
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/FlashAlign"
215
+ COMPONENT Development)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026, Gong Chen
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,245 @@
1
+ Metadata-Version: 2.1
2
+ Name: flashalign
3
+ Version: 0.1.0
4
+ Summary: CPU-native long-read aligner for DNA and spliced RNA, with a mappy-style Python API
5
+ Keywords: aligner,bioinformatics,long-read,nanopore,pacbio,rna-seq,sequence-alignment,spliced-alignment,syncmer
6
+ Author-Email: Gong Chen <dsbchen@ucdavis.edu>
7
+ License: MIT
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: MacOS
12
+ Classifier: Operating System :: POSIX :: Linux
13
+ Classifier: Programming Language :: C++
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
19
+ Project-URL: Homepage, https://github.com/97YearsOldProgrammer/flashalign
20
+ Project-URL: Source, https://github.com/97YearsOldProgrammer/flashalign
21
+ Project-URL: Issues, https://github.com/97YearsOldProgrammer/flashalign/issues
22
+ Requires-Python: >=3.12
23
+ Description-Content-Type: text/markdown
24
+
25
+ # FlashAlign
26
+
27
+ [![GitHub Downloads](https://img.shields.io/github/downloads/97YearsOldProgrammer/flashalign/total.svg?style=social&logo=github&label=Download)](https://github.com/97YearsOldProgrammer/flashalign/releases)
28
+ [![PyPI](https://img.shields.io/pypi/v/flashalign.svg?style=flat)](https://pypi.org/project/flashalign/)
29
+ [![PyPI Downloads](https://img.shields.io/pypi/dm/flashalign.svg?label=PyPI%20downloads)](https://pypi.org/project/flashalign/)
30
+ [![License](https://img.shields.io/github/license/97YearsOldProgrammer/flashalign.svg)](LICENSE)
31
+
32
+ ## Getting started
33
+
34
+ ```sh
35
+ git clone https://github.com/97YearsOldProgrammer/flashalign.git
36
+ cd flashalign
37
+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
38
+ cmake --build build --target flashalign -j
39
+ # long reads against a reference genome
40
+ ./build/flashalign align ref.fa reads.fq > aln.sam
41
+ # create an index first and then map
42
+ ./build/flashalign index -x lr:hq ref.fa # writes ref.fa.faix
43
+ ./build/flashalign align ref.fa.faix hifi.fq.gz > aln.sam
44
+ # use presets
45
+ ./build/flashalign align -x lr ref.fa ont.fq.gz > aln.sam # Oxford Nanopore genomic reads
46
+ ./build/flashalign align -x lr:hq ref.fa hifi.fq.gz > aln.sam # PacBio HiFi genomic reads
47
+ ./build/flashalign align -x splice ref.fa cdna.fq.gz > aln.sam # spliced long reads (strand unknown)
48
+ ./build/flashalign align -x splice:hq -u f ref.fa isoseq.fq.gz > aln.sam # PacBio Iso-Seq (transcript strand)
49
+ ./build/flashalign align -x splice --junc-bed anno.bed ref.fa cdna.fq.gz > aln.sam # use annotated junctions
50
+ # man page for detailed command line options
51
+ man ./flashalign.1
52
+ ```
53
+
54
+ ## Users' guide
55
+
56
+ ### Installation
57
+
58
+ For Linux x86-64, a precompiled binary is on the
59
+ [release page](https://github.com/97YearsOldProgrammer/flashalign/releases). It runs on any
60
+ x86-64 Linux with glibc 2.17 or newer and needs no installation:
61
+
62
+ ```sh
63
+ curl -L https://github.com/97YearsOldProgrammer/flashalign/releases/download/v0.1.0/flashalign-0.1.0_x64-linux.tar.bz2 | tar -jxvf -
64
+ ./flashalign-0.1.0_x64-linux/flashalign version
65
+ ```
66
+
67
+ The Python package (see the [Developers' guide](#developers-guide)) installs with pip. Prebuilt
68
+ wheels cover Linux on x86-64 and ARM and macOS on Apple silicon, for Python 3.12 or newer:
69
+
70
+ ```sh
71
+ pip install flashalign
72
+ ```
73
+
74
+ Otherwise, FlashAlign is built from source with CMake 3.18 or newer, a C and C++17 compiler and
75
+ zlib 1.2.9 or newer:
76
+
77
+ ```sh
78
+ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
79
+ cmake --build build --target flashalign -j
80
+ ./build/flashalign version
81
+ ```
82
+
83
+ The result is one binary, `build/flashalign`. The same commands build on x86-64, where the
84
+ alignment kernels use SSE4.1, and on ARM, where they go through the bundled sse2neon shim.
85
+
86
+ ### General usage
87
+
88
+ Without options, `flashalign align` takes a reference and a read file, maps under the `lr`
89
+ preset and writes base-level alignments in the SAM format:
90
+
91
+ ```sh
92
+ flashalign align ref.fa reads.fq > aln.sam
93
+ ```
94
+
95
+ You can ask for PAF with the CIGAR in the `cg` tag:
96
+
97
+ ```sh
98
+ flashalign align -f paf -c ref.fa reads.fq > aln.paf
99
+ ```
100
+
101
+ Without `-c`, PAF output is placement only: no base-level alignment is done, so there is no
102
+ CIGAR and the coordinates differ from those of the base-level alignment:
103
+
104
+ ```sh
105
+ flashalign align -f paf ref.fa reads.fq > approx-mapping.paf
106
+ ```
107
+
108
+ Reads may be FASTA or FASTQ, plain or gzip'd, and several read files may follow the reference.
109
+
110
+ A FASTA reference is indexed in memory on every run. To index it once, write the index with
111
+ `flashalign index` and give the index in place of the reference:
112
+
113
+ ```sh
114
+ flashalign index -x lr:hq ref.fa # indexing; writes ref.fa.faix
115
+ flashalign align ref.fa.faix reads.fq > aln.sam # alignment
116
+ ```
117
+
118
+ The index records the preset it was built with, and `align` maps under that preset unless `-x`
119
+ is given. The index owns the seeding: `-k`, `-s` and `-I` are indexing options and can't be
120
+ changed during mapping, and an explicit `-x` at mapping time keeps the index's own `-k` and
121
+ `-s`. Keep one index per seeding: `lr` (`-k21 -s9`), `lr:hq` (`-k21 -s5`), and one index shared
122
+ by `splice` and `splice:hq` (`-k15 -s10`).
123
+
124
+ ### Use cases
125
+
126
+ FlashAlign is tuned to a read type with a preset, `-x`, which sets several options at the
127
+ same time. The default is `lr`.
128
+
129
+ #### Map long genomic reads
130
+
131
+ ```sh
132
+ flashalign align -x lr ref.fa ont.fq.gz > aln.sam # Oxford Nanopore reads
133
+ flashalign align -x lr:hq ref.fa hifi.fq.gz > aln.sam # PacBio HiFi reads
134
+ ```
135
+
136
+ `lr` is for noisy long reads of ~10% error rate. `lr:hq` is for accurate long reads with an
137
+ error rate below 1%; PacBio HiFi reads belong there, and there is no separate HiFi preset. The
138
+ two differ in seeding (`-s9` and `-s5`) and in scoring.
139
+
140
+ Seeds that occur too often in the reference are ignored. The cutoff follows the reference: it is
141
+ the larger of 200 and the occurrence of the top 1.81e-4 fraction of the most frequent seeds in
142
+ the index, at most 500 under `lr:hq`, and voting and chaining use the same number. On a human
143
+ genome it is 200; on a repeat-rich genome such as wheat it is about 2,200 under `lr` and 500
144
+ under `lr:hq`. `--max-vote-occ` sets it for both.
145
+
146
+ #### Map long mRNA/cDNA reads
147
+
148
+ ```sh
149
+ flashalign align -x splice ref.fa cdna.fq.gz > aln.sam # Nanopore cDNA or direct RNA
150
+ flashalign align -x splice:hq -u f ref.fa isoseq.fq.gz > aln.sam # PacBio Iso-Seq
151
+ ```
152
+
153
+ In the splice presets a long deletion is taken as an intron and written as the `N` CIGAR
154
+ operator; `-G` sets the maximum intron length (200k by default). By default (`-u b`) the
155
+ canonical GT-AG splice sites are looked for on both strands and the transcript strand is
156
+ written to the `ts` tag; `-u f` looks on the transcript strand only, for reads that are already
157
+ on that strand. `splice:hq` differs from `splice` only in scoring.
158
+
159
+ FlashAlign can take annotated junctions and prefer them during base alignment:
160
+
161
+ ```sh
162
+ paftools.js gff2bed anno.gtf > anno.bed
163
+ flashalign align -x splice --junc-bed anno.bed ref.fa cdna.fq.gz > aln.sam
164
+ ```
165
+
166
+ `--junc-bed` takes gene annotations in the 12-column BED format, which `paftools.js gff2bed`
167
+ converts from GTF or GFF3, or intron positions in 6-column BED with the strand column. A splice
168
+ donor or acceptor found in the annotation gets a score bonus, `--junc-bonus` (9 by default).
169
+
170
+ ### Output
171
+
172
+ SAM is the default; `-f bam` writes BAM and `-f paf` writes PAF. Without `-f`, a `.sam`, `.bam`
173
+ or `.paf` extension on `-o` selects the format:
174
+
175
+ ```sh
176
+ flashalign align -x lr:hq ref.fa hifi.fq.gz -o aln.bam
177
+ ```
178
+
179
+ Unmapped reads are written to SAM and BAM unless `--sam-hit-only` is given; PAF never carries
180
+ them. Secondary alignments are written only with `--secondary yes`. `--cs`, `--MD` and `--eqx`
181
+ add the `cs` tag, the `MD` tag and `=`/`X` CIGAR operators. The PAF columns, the tags and the
182
+ `cs` operations are listed under OUTPUT FORMAT in the manual.
183
+
184
+ ### Advanced features
185
+
186
+ #### The resolved configuration
187
+
188
+ `--show-config` prints every resolved option with the source of its value, then exits without
189
+ loading the reference or the reads; given an index, it reads only the index header:
190
+
191
+ ```sh
192
+ flashalign align -x lr:hq --show-config
193
+ flashalign align --show-config ref.fa.faix
194
+ ```
195
+
196
+ #### Multi-part index
197
+
198
+ `-I` caps the reference bases loaded into memory for indexing. A reference longer than that is
199
+ indexed in parts of whole contigs, and `align` maps the reads against one part at a time,
200
+ reading them once per part:
201
+
202
+ ```sh
203
+ flashalign index -I 4G ref.fa
204
+ flashalign align ref.fa.faix reads.fq > aln.sam
205
+ ```
206
+
207
+ Mapping quality is incorrect given a multi-part index.
208
+
209
+ ### Getting help
210
+
211
+ The manual page, [`flashalign.1`](flashalign.1), describes every option, the output format and
212
+ the exit status (`man ./flashalign.1`). `flashalign align --help` and `flashalign index --help`
213
+ list the common options. Bugs and questions go to the
214
+ [issue page](https://github.com/97YearsOldProgrammer/flashalign/issues).
215
+
216
+ ### Citing FlashAlign
217
+
218
+ The manuscript is not yet public. Until it is, cite the repository by URL and commit.
219
+
220
+ ## Developers' guide
221
+
222
+ FlashAlign is also a C++ library, with its public headers in
223
+ [`include/flashalign/`](include/flashalign/), and a Python package, `flashalign`, that drives
224
+ the same library:
225
+
226
+ ```sh
227
+ python -m pip install .
228
+ python demo.py ref.fa reads.fq
229
+ ```
230
+
231
+ The package needs CPython 3.12 or newer and installs no `flashalign` command.
232
+ [`demo.py`](demo.py) shows typical use; `help(flashalign.Aligner)` and
233
+ [`python/flashalign/_flashalign.pyi`](python/flashalign/_flashalign.pyi) document the API.
234
+
235
+ ## Limitations
236
+
237
+ - Long reads only: a read has to carry enough anchors to be collapsed into one or more
238
+ diagonals.
239
+ - FlashAlign requires SSE4.1 instructions on x86 CPUs or NEON on ARM CPUs. A build without
240
+ them is not provided.
241
+
242
+ ## License
243
+
244
+ FlashAlign is released under the MIT License; see [`LICENSE`](LICENSE).
245
+ [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) covers the third-party code.