pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
haplohseq: Resurrect and begin updates for boost 1.86+
Module Name: pkgsrc-wip
Committed By: Jason W. Bacon <jtocino%gmx.com@localhost>
Pushed By: outpaddling
Date: Sun Jan 26 07:55:28 2025 -0600
Changeset: a85659bf6f3111440d51a9180f9c44acb2d3c3b9
Modified Files:
Makefile
Added Files:
haplohseq/DESCR
haplohseq/Makefile
haplohseq/PLIST
haplohseq/distinfo
haplohseq/files/haplohseq-example.in
haplohseq/patches/patch-src_HaplohSeq.cpp
Log Message:
haplohseq: Resurrect and begin updates for boost 1.86+
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a85659bf6f3111440d51a9180f9c44acb2d3c3b9
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
haplohseq/DESCR | 5 +++
haplohseq/Makefile | 44 +++++++++++++++++++++++
haplohseq/PLIST | 9 +++++
haplohseq/distinfo | 6 ++++
haplohseq/files/haplohseq-example.in | 37 +++++++++++++++++++
haplohseq/patches/patch-src_HaplohSeq.cpp | 60 +++++++++++++++++++++++++++++++
7 files changed, 162 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index 7fd5582efb..ce204ff180 100644
--- a/Makefile
+++ b/Makefile
@@ -1474,6 +1474,7 @@ SUBDIR+= halfempty
SUBDIR+= halloy
SUBDIR+= hammer
SUBDIR+= hanazono-ttf
+SUBDIR+= haplhoseq
SUBDIR+= hare
SUBDIR+= harec
SUBDIR+= harmony
diff --git a/haplohseq/DESCR b/haplohseq/DESCR
new file mode 100644
index 0000000000..0b2c07f64d
--- /dev/null
+++ b/haplohseq/DESCR
@@ -0,0 +1,5 @@
+Haplohseq identifies regions of allelic imbalance (AI) in sequencing
+data obtained from impure samples where AI events exist in a
+potentially low proportion of cells in the sample. Input to the
+software includes a VCF file of genotypes and estimated phased
+genotypes.
diff --git a/haplohseq/Makefile b/haplohseq/Makefile
new file mode 100644
index 0000000000..d38916d05d
--- /dev/null
+++ b/haplohseq/Makefile
@@ -0,0 +1,44 @@
+# $NetBSD: Makefile,v 1.3 2024/12/29 15:09:39 adam Exp $
+
+DISTNAME= haplohseq-0.1.2.2
+PKGREVISION= 2
+CATEGORIES= biology
+MASTER_SITES= ${MASTER_SITE_GITHUB:=outpaddling/}
+GITHUB_PROJECT= haplohseq
+GITHUB_TAG= e4892945eced075a5bb98f208786cdf85eb3d82a
+
+OWNER= bacon%NetBSD.org@localhost
+HOMEPAGE= https://sites.google.com/site/integrativecancergenomics/software/haplohseq
+COMMENT= Identify regions of allelic imbalance
+LICENSE= mit
+
+SUBST_CLASSES+= test
+SUBST_STAGE.test= pre-configure
+SUBST_SED.test= -e 's|\.\./haplohseq|haplohseq|'
+SUBST_SED.test+= -e 's|python|${PYTHONBIN}|'
+SUBST_FILES.test= example/example_run.sh
+
+USE_LANGUAGES= c c++
+USE_CXX_FEATURES+= c++14 # Minimum for boost, maximum for haplohseq
+FORCE_CXX_STD+= c++14
+USE_TOOLS+= gmake pax
+MAKE_FILE= makefile
+
+EXAMPLESDIR= ${PREFIX}/share/examples/haplohseq
+
+INSTALLATION_DIRS= share/examples/haplohseq
+
+post-patch:
+ ${SED} -e "s|%%EXAMPLESDIR%%|${EXAMPLESDIR}|" \
+ ${FILESDIR}/haplohseq-example.in > ${WRKDIR}/haplohseq-example
+
+post-install:
+ ${INSTALL_SCRIPT} ${WRKDIR}/haplohseq-example ${DESTDIR}${PREFIX}/bin
+ (cd ${WRKSRC} && pax -rw example ldmap scripts ${DESTDIR}${EXAMPLESDIR})
+
+do-test:
+ (cd ${WRKSRC}/build/test && ${SH} ${WRKSRC}/src/test/run-tests)
+
+.include "../../devel/boost-libs/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/haplohseq/PLIST b/haplohseq/PLIST
new file mode 100644
index 0000000000..9737854f81
--- /dev/null
+++ b/haplohseq/PLIST
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1 2024/10/12 12:19:51 bacon Exp $
+bin/haplohseq
+bin/haplohseq-example
+share/examples/haplohseq/example/example_input/tumor_exome.vcf
+share/examples/haplohseq/example/example_run.sh
+share/examples/haplohseq/ldmap/hg19.exome.ldmap
+share/examples/haplohseq/scripts/haplohseq_plot.R
+share/examples/haplohseq/scripts/ldmap.py
+share/examples/haplohseq/scripts/simple_phaser.py
diff --git a/haplohseq/distinfo b/haplohseq/distinfo
new file mode 100644
index 0000000000..a6071e47fd
--- /dev/null
+++ b/haplohseq/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2024/10/12 12:19:51 bacon Exp $
+
+BLAKE2s (haplohseq-0.1.2.2-e4892945eced075a5bb98f208786cdf85eb3d82a.tar.gz) = dbd48a3854197dbf71189a56bdd0075ce8e6a78bca92b58673ae2770eae3daa6
+SHA512 (haplohseq-0.1.2.2-e4892945eced075a5bb98f208786cdf85eb3d82a.tar.gz) = 8de2c75d4e443eab79f520d43bd2e0c238dca798bf53cc7821d6fe8bdf94f3d3ae3b9319b9b21aae10dab6b52e5c1e81380380c456a240bfcfa8863b83c5feff
+Size (haplohseq-0.1.2.2-e4892945eced075a5bb98f208786cdf85eb3d82a.tar.gz) = 12085199 bytes
+SHA1 (patch-src_HaplohSeq.cpp) = 9907808c0cb1f353f7c9784fd22def84e77a2a9d
diff --git a/haplohseq/files/haplohseq-example.in b/haplohseq/files/haplohseq-example.in
new file mode 100644
index 0000000000..0cb2a5bee1
--- /dev/null
+++ b/haplohseq/files/haplohseq-example.in
@@ -0,0 +1,37 @@
+#!/bin/sh -e
+
+##########################################################################
+# Script description:
+# Run haplohseq example
+#
+# https://sites.google.com/site/integrativecancergenomics/software/haplohseq
+#
+# History:
+# Date Name Modification
+# 2019-11-13 Jason Bacon Begin
+##########################################################################
+
+usage()
+{
+ printf "Usage: $0 directory\n"
+ exit 1
+}
+
+
+##########################################################################
+# Main
+##########################################################################
+
+if [ $# != 1 ]; then
+ usage
+fi
+
+dir="$1"
+
+if [ -e "$dir" ]; then
+ printf "'$dir' already exists. Please remove it or specify another.\n"
+ exit 1
+fi
+cp -R %%EXAMPLESDIR%% "$dir"
+cd "$dir/example"
+sh ./example_run.sh
diff --git a/haplohseq/patches/patch-src_HaplohSeq.cpp b/haplohseq/patches/patch-src_HaplohSeq.cpp
new file mode 100644
index 0000000000..c2b88cb4e1
--- /dev/null
+++ b/haplohseq/patches/patch-src_HaplohSeq.cpp
@@ -0,0 +1,60 @@
+$NetBSD$
+
+--- src/HaplohSeq.cpp.orig 2025-01-26 13:47:41.918585702 +0000
++++ src/HaplohSeq.cpp
+@@ -195,14 +195,14 @@ void HaplohSeq::runBafHaplohseq( std::st
+ for (unsigned int i = 0; i < numParamEventStarts; i++) {
+
+ // Create thread pool
+- boost::asio::io_service ioService;
+- // boost::asio::io_service::work work(ioService);
+- boost::shared_ptr<boost::asio::io_service::work> work(new boost::asio::io_service::work(ioService));
++ boost::asio::io_context ioService;
++ // boost::asio::io_context::work work(ioService);
++ boost::shared_ptr<boost::asio::io_context::work> work(new boost::asio::io_context::work(ioService));
+ boost::thread_group threadPool;
+
+ // Spawn worker threads
+ for (std::size_t t = 0; t < numThreads; t++) {
+- threadPool.create_thread(boost::bind((boost::asio::io_context::count_type (boost::asio::io_service::*)())&boost::asio::io_service::run, &ioService));
++ threadPool.create_thread(boost::bind((boost::asio::io_context::count_type (boost::asio::io_context::*)())&boost::asio::io_context::run, &ioService));
+ }
+
+ std::map<std::string, boost::shared_ptr<Hmm> > chrHmms;
+@@ -220,7 +220,7 @@ void HaplohSeq::runBafHaplohseq( std::st
+
+ std::cout << "Posting job to thread pool for chromosome " << chr << "\n";
+ // IMPORTANT: do not pass shared_ptr by reference because the shared_ptr expects a new pointer to the object
+- ioService.post(boost::bind(&HaplohSeq::runBafHaplohseqChr, this,
++ ioService.get_executor().post(boost::bind(&HaplohSeq::runBafHaplohseqChr, this,
+ chr,
+ boost::ref(chrHmms),
+ boost::ref(fp),
+@@ -413,14 +413,14 @@ void HaplohSeq::runVcfHaplohseq( std::st
+ for (unsigned int i = 0; i < numParamEventStarts; i++) {
+
+ // Create thread pool
+- boost::asio::io_service ioService;
+- // boost::asio::io_service::work work(ioService);
+- boost::shared_ptr<boost::asio::io_service::work> work(new boost::asio::io_service::work(ioService));
++ boost::asio::io_context ioService;
++ // boost::asio::io_context::work work(ioService);
++ boost::shared_ptr<boost::asio::io_context::work> work(new boost::asio::io_context::work(ioService));
+ boost::thread_group threadPool;
+
+ // Spawn worker threads
+ for (std::size_t t = 0; t < numThreads; t++) {
+- threadPool.create_thread(boost::bind((boost::asio::io_context::count_type (boost::asio::io_service::*)())&boost::asio::io_service::run, &ioService));
++ threadPool.create_thread(boost::bind((boost::asio::io_context::count_type (boost::asio::io_context::*)())&boost::asio::io_context::run, &ioService));
+ }
+
+ std::map<std::string, boost::shared_ptr<Hmm> > chrHmms;
+@@ -438,7 +438,7 @@ void HaplohSeq::runVcfHaplohseq( std::st
+
+ // std::cout << "Posting job to thread pool for chromosome " << chr << "\n";
+ // IMPORTANT: do not pass shared_ptr by reference because the shared_ptr expects a new pointer to the object
+- ioService.post(boost::bind(&HaplohSeq::runVcfHaplohseqChr, this,
++ ioService.get_executor().post(boost::bind(&HaplohSeq::runVcfHaplohseqChr, this,
+ chr,
+ boost::ref(chrHmms),
+ boost::ref(fp),
Home |
Main Index |
Thread Index |
Old Index