Skip to content

Commit 986001c

Browse files
committed
pythonffi: fix missing WfaVariant
1 parent b8cca2e commit 986001c

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ option(WFA_GITMODULE "Force local git submodule for WFA2LIB" ON) # disable in di
4343
include(CheckIPOSupported) # adds lto
4444
check_ipo_supported(RESULT ipo_supported OUTPUT output)
4545

46+
set(EXTRA_FLAGS " ") # otherwise it injects OFF
47+
4648
# ---- Dependencies
4749

4850
if(OPENMP)
@@ -463,6 +465,7 @@ install(TARGETS pyvcflib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
463465

464466
enable_testing()
465467

468+
466469
function(add_pytest TEST_FILE)
467470
add_test(
468471
NAME ${TEST_FILE}

contrib/WFA2-lib

src/pythonffi.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ PYBIND11_MODULE(pyvcflib, m)
6060
.def_readonly("sampleNames", &Variant::sampleNames)
6161
.def_readonly("samples", &Variant::samples)
6262
.def("legacy_parsedAlternates", &Variant::legacy_parsedAlternates)
63-
// .def("parsedAlternates", &WfaVariant::parsedAlternates)
6463
;
64+
65+
py::class_<WfaVariant, Variant>(m, "WfaVariant", "WFA VCF record")
66+
.def(py::init<VariantCallFile &>() )
67+
.def("parsedAlternates", &WfaVariant::parsedAlternates);
68+
6569
py::class_<VariantCallFile>(m, "VariantCallFile", "VCF file")
6670
.def(py::init())
6771
.def("openFile",&VariantCallFile::openFile,"Open the VCF")

test/tests/realign.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def test_sw_wf_compare(self):
4848
def test_wfbug2(self):
4949
vcf = VariantCallFile()
5050
vcf.openFile("../samples/10134514.vcf")
51-
var = Variant(vcf)
51+
var = WfaVariant(vcf)
5252
vcf.getNextVariant(var)
5353
self.assertEqual(var.name,"grch38#chr4_10083863-10181258.vcf:grch38#chr4")
5454
self.assertEqual(var.ref,'GGAGAATCCCAATTGATGG')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy