Skip to content

Commit

Permalink
updated WFA2 and fixed linking to lib64 on some systems
Browse files Browse the repository at this point in the history
  • Loading branch information
Rayan CHIKHI committed Aug 6, 2023
1 parent 4cbfeb3 commit fed1746
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/aligner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ pub enum Heuristic {

#[derive(Debug, PartialEq, Eq)]
pub enum AlignmentStatus {
StatusSuccessful = wfa2::WF_STATUS_SUCCESSFUL as isize,
StatusDropped = wfa2::WF_STATUS_UNFEASIBLE as isize,
StatusMaxScoreReached = wfa2::WF_STATUS_MAX_SCORE_REACHED as isize,
StatusSuccessful = wfa2::WF_STATUS_ALG_COMPLETED as isize,
StatusDropped = wfa2::WF_STATUS_UNATTAINABLE as isize,
StatusMaxScoreReached = wfa2::WF_STATUS_MAX_STEPS_REACHED as isize,
StatusOOM = wfa2::WF_STATUS_OOM as isize,
}

impl From<i32> for AlignmentStatus {
fn from(value: i32) -> Self {
match value {
x if x == wfa2::WF_STATUS_SUCCESSFUL as i32 => AlignmentStatus::StatusSuccessful,
wfa2::WF_STATUS_UNFEASIBLE => AlignmentStatus::StatusDropped,
wfa2::WF_STATUS_MAX_SCORE_REACHED => AlignmentStatus::StatusMaxScoreReached,
x if x == wfa2::WF_STATUS_ALG_COMPLETED as i32 => AlignmentStatus::StatusSuccessful,
wfa2::WF_STATUS_UNATTAINABLE => AlignmentStatus::StatusDropped,
wfa2::WF_STATUS_MAX_STEPS_REACHED => AlignmentStatus::StatusMaxScoreReached,
wfa2::WF_STATUS_OOM => AlignmentStatus::StatusOOM,
_ => panic!("Unknown alignment status: {}", value),
}
Expand Down
2 changes: 1 addition & 1 deletion wfa2-sys/WFA2-lib
Submodule WFA2-lib updated 87 files
+21 −0 .github/workflows/make.yml
+8 −5 CMakeLists.txt
+2 −2 Makefile
+25 −17 README.md
+1 −1 VERSION.txt
+491 −135 alignment/cigar.c
+70 −28 alignment/cigar.h
+0 −1 alignment/score_matrix.c
+154 −62 bindings/cpp/WFAligner.cpp
+79 −34 bindings/cpp/WFAligner.hpp
+3 −0 examples/Makefile
+2 −3 examples/wfa_basic.c
+1 −1 examples/wfa_bindings.cpp
+2 −3 examples/wfa_lambda.cpp
+ img/wfa.endsfree.png
+1 −1 scripts/wfa.alg.cmp.score.sh
+3 −0 system/mm_allocator.c
+2 −0 system/mm_stack.c
+3 −0 system/profiler_counter.h
+1 −0 system/profiler_timer.h
+629 −737 tests/wfa.utest.check/wfa.utest.log
+60 −60 tests/wfa.utest.check/wfa.utest.log.mem
+11 −21 tests/wfa.utest.check/wfa.utest.log.time
+13 −0 tests/wfa.utest.clean.sh
+28 −3 tests/wfa.utest.cmp.sh
+0 −46 tests/wfa.utest.performance.cmp.sh
+1 −1 tests/wfa.utest.performance.sh
+77 −51 tests/wfa.utest.sh
+38 −19 tools/align_benchmark/align_benchmark.c
+10 −26 tools/align_benchmark/align_benchmark_params.c
+2 −14 tools/align_benchmark/align_benchmark_params.h
+5 −10 tools/align_benchmark/benchmark/benchmark_check.c
+11 −7 tools/align_benchmark/benchmark/benchmark_edit.c
+12 −9 tools/align_benchmark/benchmark/benchmark_gap_affine.c
+10 −5 tools/align_benchmark/benchmark/benchmark_gap_affine2p.c
+10 −5 tools/align_benchmark/benchmark/benchmark_gap_linear.c
+9 −3 tools/align_benchmark/benchmark/benchmark_indel.c
+23 −15 tools/align_benchmark/benchmark/benchmark_utils.c
+2 −0 tools/align_benchmark/benchmark/benchmark_utils.h
+1 −1 tools/align_benchmark/edit/edit_bpm.c
+0 −1 utils/Makefile
+0 −1 utils/commons.h
+2 −0 utils/heatmap.h
+0 −140 utils/string_padded.c
+4 −0 wavefront/Makefile
+110 −41 wavefront/wavefront_align.c
+12 −2 wavefront/wavefront_align.h
+331 −87 wavefront/wavefront_aligner.c
+31 −0 wavefront/wavefront_aligner.h
+2 −4 wavefront/wavefront_attributes.c
+4 −24 wavefront/wavefront_attributes.h
+16 −18 wavefront/wavefront_backtrace.c
+15 −24 wavefront/wavefront_backtrace_buffer.c
+2 −12 wavefront/wavefront_backtrace_buffer.h
+0 −1 wavefront/wavefront_backtrace_offload.c
+270 −286 wavefront/wavefront_bialign.c
+1 −5 wavefront/wavefront_bialign.h
+111 −58 wavefront/wavefront_bialigner.c
+39 −11 wavefront/wavefront_bialigner.h
+7 −4 wavefront/wavefront_compute.c
+8 −5 wavefront/wavefront_compute_affine.c
+7 −5 wavefront/wavefront_compute_affine2p.c
+15 −11 wavefront/wavefront_compute_edit.c
+8 −5 wavefront/wavefront_compute_linear.c
+91 −113 wavefront/wavefront_debug.c
+3 −7 wavefront/wavefront_debug.h
+144 −363 wavefront/wavefront_extend.c
+3 −5 wavefront/wavefront_extend.h
+177 −0 wavefront/wavefront_extend_kernels.c
+32 −36 wavefront/wavefront_extend_kernels.h
+167 −0 wavefront/wavefront_extend_kernels_avx.c
+47 −0 wavefront/wavefront_extend_kernels_avx.h
+34 −28 wavefront/wavefront_heuristic.c
+3 −2 wavefront/wavefront_heuristic.h
+16 −18 wavefront/wavefront_pcigar.c
+3 −12 wavefront/wavefront_pcigar.h
+29 −17 wavefront/wavefront_penalties.c
+9 −2 wavefront/wavefront_penalties.h
+35 −27 wavefront/wavefront_plot.c
+2 −5 wavefront/wavefront_plot.h
+310 −0 wavefront/wavefront_sequences.c
+148 −0 wavefront/wavefront_sequences.h
+162 −0 wavefront/wavefront_termination.c
+57 −0 wavefront/wavefront_termination.h
+101 −267 wavefront/wavefront_unialign.c
+0 −19 wavefront/wavefront_unialign.h
+38 −57 wavefront/wfa.h
1 change: 1 addition & 0 deletions wfa2-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ fn main() {
.cflag("-DEXTRA_FLAGS=\"-ftree-vectorize -msse2 -mfpmath=sse -ftree-vectorizer-verbose=5 -march=native\"")
.build();
println!("cargo:rustc-link-search=native={}/lib", out_dir.display());
println!("cargo:rustc-link-search=native={}/lib64", out_dir.display());
println!("cargo:rustc-link-lib=static=wfa2");

let ignored_macros = IgnoreMacros(
Expand Down

0 comments on commit fed1746

Please sign in to comment.