Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Sep 2019 01:07:31 +0000 (UTC)
From:      "Jason W. Bacon" <jwb@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r512137 - in head/biology: . haplohseq haplohseq/files
Message-ID:  <201909160107.x8G17Vwq012403@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jwb
Date: Mon Sep 16 01:07:31 2019
New Revision: 512137
URL: https://svnweb.freebsd.org/changeset/ports/512137

Log:
  biology/haplohseq: Identify regions of allelic imbalance
  
  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.

Added:
  head/biology/haplohseq/
  head/biology/haplohseq/Makefile   (contents, props changed)
  head/biology/haplohseq/distinfo   (contents, props changed)
  head/biology/haplohseq/files/
  head/biology/haplohseq/files/patch-makefile   (contents, props changed)
  head/biology/haplohseq/files/patch-src_HaplohSeq.cpp   (contents, props changed)
  head/biology/haplohseq/files/patch-src_test_InputProcessorTest.cpp   (contents, props changed)
  head/biology/haplohseq/files/run-tests   (contents, props changed)
  head/biology/haplohseq/pkg-descr   (contents, props changed)
Modified:
  head/biology/Makefile

Modified: head/biology/Makefile
==============================================================================
--- head/biology/Makefile	Mon Sep 16 00:48:01 2019	(r512136)
+++ head/biology/Makefile	Mon Sep 16 01:07:31 2019	(r512137)
@@ -51,6 +51,7 @@
     SUBDIR += graphlan
     SUBDIR += grappa
     SUBDIR += groopm
+    SUBDIR += haplohseq
     SUBDIR += hhsuite
     SUBDIR += hisat2
     SUBDIR += hmmer

Added: head/biology/haplohseq/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/haplohseq/Makefile	Mon Sep 16 01:07:31 2019	(r512137)
@@ -0,0 +1,29 @@
+# $FreeBSD$
+
+PORTNAME=	haplohseq
+DISTVERSION=	0.1.2
+CATEGORIES=	biology
+MASTER_SITES=	https://mirror1.hpc.uwm.edu/Distfiles/ \
+		https://mirror2.hpc.uwm.edu/Distfiles/
+DISTNAME=	haplohseq_source-${DISTVERSION}
+
+MAINTAINER=	jwb@FreeBSD.org
+COMMENT=	Identify regions of allelic imbalance
+
+LICENSE=	MIT
+
+LIB_DEPENDS=	libboost_system.so:devel/boost-libs
+
+USES=		compiler:c++11-lang gmake localbase:ldflags zip
+
+MAKEFILE=	makefile
+WRKSRC=		${WRKDIR}/haplohseq_source
+LDFLAGS+=	-lpthread
+MAKE_ENV=	STRIP=${STRIP}
+
+PLIST_FILES=	bin/haplohseq
+
+do-test:
+	@(cd ${WRKSRC}/build/test && ${FILESDIR}/run-tests)
+
+.include <bsd.port.mk>

Added: head/biology/haplohseq/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/haplohseq/distinfo	Mon Sep 16 01:07:31 2019	(r512137)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1567118170
+SHA256 (haplohseq_source-0.1.2.zip) = 35f8fe6718020e6eacdc309d28fc5dd3cc7c6e8400da1d962fdf6fb52d4e90c5
+SIZE (haplohseq_source-0.1.2.zip) = 63620

Added: head/biology/haplohseq/files/patch-makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/haplohseq/files/patch-makefile	Mon Sep 16 01:07:31 2019	(r512137)
@@ -0,0 +1,105 @@
+--- makefile.orig	2019-08-29 18:03:23 UTC
++++ makefile
+@@ -7,23 +7,32 @@
+ #
+ 
+ # Constants
+-CXX=g++
++# Default to g++ if not set by make args or environment
++CXX?=g++
+ #-O0 -g will turn on debugging
+ #The rule of thumb:
+ #When you need to debug, use -O0 (and -g to generate debugging symbols.)
+ #When you are preparing to ship it, use -O2.
+ #When you use gentoo, use -O3...!
+ #When you need to put it on an embedded system, use -Os (optimize for size, not for efficiency.)
+-CXX_FLAGS=-Wall -g -stdlib=libstdc++
++# Use canonincal compiler variables, which may be provided by build env
++CXXFLAGS?=-Wall -g -stdlib=libstdc++
+ SRC=src
+ CONF=conf
+ HMM_SRC=$(SRC)/hmm
+ UTIL_SRC=$(SRC)/util
+-BOOST=/usr/local/boost_1_52_0
++BOOST?=/usr/local/boost_1_52_0
+ INCLUDES=-I./$(SRC) -I./$(HMM_SRC) -I./$(UTIL_SRC) -isystem$(BOOST)
+-LIBRARY_PATHS=-Llib/macosx 
++LIBRARY_PATHS?=-Llib/macosx
+ LIBRARIES=-lm -lboost_program_options -lboost_system -lboost_filesystem -lboost_thread
+ 
++# Installation target with destdir support
++DESTDIR?=.
++PREFIX?=/usr/local
++MKDIR?=mkdir
++INSTALL?=install
++STRIP?= # empty, set to -s to install stripped binary
++
+ # Generated directories which are generated in this script and cleaned up with 'make clean'
+ BUILD=build
+ OBJ=$(BUILD)/obj
+@@ -35,18 +44,21 @@ directories:
+ 
+ # Create object files into the OBJ directory from cpp files in the SRC directory.
+ $(OBJ)/%.o:	$(SRC)/%.cpp directories
+-	$(CXX) $(CXX_FLAGS) $(INCLUDES) -c -o $@ $<
++	$(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
+ $(OBJ)/%.o:	$(HMM_SRC)/%.cpp directories
+-	$(CXX) $(CXX_FLAGS) $(INCLUDES) -c -o $@ $<
++	$(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
+ $(OBJ)/%.o:	$(UTIL_SRC)/%.cpp directories
+-	$(CXX) $(CXX_FLAGS) $(INCLUDES) -c -o $@ $<
++	$(CXX) $(CXXFLAGS) $(INCLUDES) -c -o $@ $<
+ 
+-all: clean haplohseq
++all: haplohseq test
+ 
+ haplohseq: $(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(OBJ)/InputProcessor.o $(OBJ)/Reporter.o $(OBJ)/FreqPhase.o $(OBJ)/VcfUtil.o $(OBJ)/HaplohSeq.o
+-	$(CXX) -o $(BIN)/$@ $(CXX_FLAGS) $(INCLUDES) $(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(OBJ)/InputProcessor.o $(OBJ)/Reporter.o $(OBJ)/FreqPhase.o $(OBJ)/VcfUtil.o $(OBJ)/HaplohSeq.o $(LIBRARY_PATHS) $(LIBRARIES) 
+-	cp -r $(CONF) $(BIN)/.
+-	
++	$(CXX) -o $(BIN)/$@ $(CXXFLAGS) $(INCLUDES) $(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(OBJ)/InputProcessor.o $(OBJ)/Reporter.o $(OBJ)/FreqPhase.o $(OBJ)/VcfUtil.o $(OBJ)/HaplohSeq.o $(LIBRARY_PATHS) $(LIBRARIES) $(LDFLAGS)
++
++install:
++	$(MKDIR) -p $(DESTDIR)$(PREFIX)/bin
++	$(INSTALL) -c $(STRIP) $(BIN)/* $(DESTDIR)$(PREFIX)/bin
++
+ clean:
+ 	rm -rf $(BUILD)
+ 
+@@ -74,28 +86,28 @@ test: FreqPhaseTest HaplohSeqTest HmmTest InputProcess
+ 
+ # Create test object files into the OBJ directory from cpp files in the SRC directory.
+ $(TEST_BIN)/%.o:	$(TEST_SRC)/%.cpp directories test_directory
+-	$(CXX) $(CXX_FLAGS) $(INCLUDES) $(TEST_INCLUDES) -c -o $@ $<
++	$(CXX) $(CXXFLAGS) $(INCLUDES) $(TEST_INCLUDES) -c -o $@ $<
+ 
+ HaplohSeqTest:	$(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(OBJ)/InputProcessor.o $(TEST_BIN)/HaplohSeqTest.o
+-	$(CXX) -o $(TEST_BIN)/$@ $(CXX_FLAGS) $(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(OBJ)/InputProcessor.o $(TEST_BIN)/HaplohSeqTest.o $(LIBRARY_PATHS) $(LIBRARIES) 
++	$(CXX) -o $(TEST_BIN)/$@ $(CXXFLAGS) $(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(OBJ)/InputProcessor.o $(TEST_BIN)/HaplohSeqTest.o $(LIBRARY_PATHS) $(LIBRARIES) $(LDFLAGS)
+ 
+ FreqPhaseTest:	$(OBJ)/StringUtil.o $(OBJ)/InputProcessor.o $(OBJ)/FreqPhase.o $(TEST_BIN)/FreqPhaseTest.o
+-	$(CXX) -o $(TEST_BIN)/$@ $(CXX_FLAGS) $(OBJ)/StringUtil.o $(OBJ)/InputProcessor.o $(OBJ)/FreqPhase.o $(TEST_BIN)/FreqPhaseTest.o $(LIBRARY_PATHS) $(LIBRARIES) 
++	$(CXX) -o $(TEST_BIN)/$@ $(CXXFLAGS) $(OBJ)/StringUtil.o $(OBJ)/InputProcessor.o $(OBJ)/FreqPhase.o $(TEST_BIN)/FreqPhaseTest.o $(LIBRARY_PATHS) $(LIBRARIES) $(LDFLAGS)
+ 
+ HmmTest:	$(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(TEST_BIN)/HmmTest.o
+-	$(CXX) -o $(TEST_BIN)/$@ $(CXX_FLAGS) $(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(TEST_BIN)/HmmTest.o $(LIBRARY_PATHS) $(LIBRARIES) 
++	$(CXX) -o $(TEST_BIN)/$@ $(CXXFLAGS) $(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(TEST_BIN)/HmmTest.o $(LIBRARY_PATHS) $(LIBRARIES) $(LDFLAGS)
+ 
+ InputProcessorTest:	$(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(OBJ)/InputProcessor.o $(TEST_BIN)/InputProcessorTest.o
+-	$(CXX) -o $(TEST_BIN)/$@ $(CXX_FLAGS) $(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(OBJ)/InputProcessor.o $(TEST_BIN)/InputProcessorTest.o $(LIBRARY_PATHS) $(LIBRARIES) 
++	$(CXX) -o $(TEST_BIN)/$@ $(CXXFLAGS) $(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(OBJ)/InputProcessor.o $(TEST_BIN)/InputProcessorTest.o $(LIBRARY_PATHS) $(LIBRARIES) $(LDFLAGS)
+ 	
+ MathUtilTest:	$(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(TEST_BIN)/MathUtilTest.o
+-	$(CXX) -o $(TEST_BIN)/$@ $(CXX_FLAGS) $(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(TEST_BIN)/MathUtilTest.o $(LIBRARY_PATHS) $(LIBRARIES) 
++	$(CXX) -o $(TEST_BIN)/$@ $(CXXFLAGS) $(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(TEST_BIN)/MathUtilTest.o $(LIBRARY_PATHS) $(LIBRARIES) $(LDFLAGS)
+ 	
+ ReporterTest:	$(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(TEST_BIN)/ReporterTest.o
+-	$(CXX) -o $(TEST_BIN)/$@ $(CXX_FLAGS) $(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(TEST_BIN)/ReporterTest.o $(LIBRARY_PATHS) $(LIBRARIES) 
++	$(CXX) -o $(TEST_BIN)/$@ $(CXXFLAGS) $(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(TEST_BIN)/ReporterTest.o $(LIBRARY_PATHS) $(LIBRARIES) $(LDFLAGS)
+ 
+ ThreadPoolTest:	$(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(OBJ)/ThreadPool.o $(TEST_BIN)/ThreadPoolTest.o
+-	$(CXX) -o $(TEST_BIN)/$@ $(CXX_FLAGS) $(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(OBJ)/ThreadPool.o $(TEST_BIN)/ThreadPoolTest.o $(LIBRARY_PATHS) $(LIBRARIES)
++	$(CXX) -o $(TEST_BIN)/$@ $(CXXFLAGS) $(OBJ)/Hmm.o $(OBJ)/DataStructures.o $(OBJ)/MathUtil.o $(OBJ)/StringUtil.o $(OBJ)/ThreadPool.o $(TEST_BIN)/ThreadPoolTest.o $(LIBRARY_PATHS) $(LIBRARIES) $(LDFLAGS)
+ ############################## END TEST LOGIC ##############################
+ 
+ 

Added: head/biology/haplohseq/files/patch-src_HaplohSeq.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/haplohseq/files/patch-src_HaplohSeq.cpp	Mon Sep 16 01:07:31 2019	(r512137)
@@ -0,0 +1,20 @@
+--- src/HaplohSeq.cpp.orig	2019-09-01 14:58:30 UTC
++++ src/HaplohSeq.cpp
+@@ -202,7 +202,7 @@ void HaplohSeq::runBafHaplohseq(	std::string& obsType,
+ 
+ 		// Spawn worker threads
+ 		for (std::size_t t = 0; t < numThreads; t++) {
+-			threadPool.create_thread(boost::bind((unsigned long int (boost::asio::io_service::*)())&boost::asio::io_service::run, &ioService));
++			threadPool.create_thread(boost::bind((boost::asio::io_context::count_type (boost::asio::io_service::*)())&boost::asio::io_service::run, &ioService));
+ 		}
+ 
+ 		std::map<std::string, boost::shared_ptr<Hmm> > chrHmms;
+@@ -420,7 +420,7 @@ void HaplohSeq::runVcfHaplohseq(	std::string& obsType,
+ 
+ 		// Spawn worker threads
+ 		for (std::size_t t = 0; t < numThreads; t++) {
+-			threadPool.create_thread(boost::bind((unsigned long int (boost::asio::io_service::*)())&boost::asio::io_service::run, &ioService));
++			threadPool.create_thread(boost::bind((boost::asio::io_context::count_type (boost::asio::io_service::*)())&boost::asio::io_service::run, &ioService));
+ 		}
+ 
+ 		std::map<std::string, boost::shared_ptr<Hmm> > chrHmms;

Added: head/biology/haplohseq/files/patch-src_test_InputProcessorTest.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/haplohseq/files/patch-src_test_InputProcessorTest.cpp	Mon Sep 16 01:07:31 2019	(r512137)
@@ -0,0 +1,11 @@
+--- src/test/InputProcessorTest.cpp.orig	2019-09-01 12:33:22 UTC
++++ src/test/InputProcessorTest.cpp
+@@ -82,7 +82,7 @@ BOOST_AUTO_TEST_CASE(isHetTest) {
+ 	BOOST_REQUIRE_EQUAL(inputProc.isHet('A','?'), false);
+ 	BOOST_REQUIRE_EQUAL(inputProc.isHet('A','.'), false);
+ 	BOOST_REQUIRE_EQUAL(inputProc.isHet('A',' '), false);
+-	BOOST_REQUIRE_EQUAL(inputProc.isHet('C', NULL), true);
++	BOOST_REQUIRE_EQUAL(inputProc.isHet('C','\0'), true);
+ }
+ 
+ BOOST_AUTO_TEST_CASE(readAllelesTest) {

Added: head/biology/haplohseq/files/run-tests
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/haplohseq/files/run-tests	Mon Sep 16 01:07:31 2019	(r512137)
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+
+printf "\n=== FreqPhaseTest ===\n\n"
+./FreqPhaseTest
+printf "\n=== InputProcessorTest ===\n\n"
+./InputProcessorTest
+printf "\n=== HmmTest ===\n\n"
+./HmmTest
+printf "\n=== HaplohSeqTest ===\n\n"
+./HaplohSeqTest

Added: head/biology/haplohseq/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/biology/haplohseq/pkg-descr	Mon Sep 16 01:07:31 2019	(r512137)
@@ -0,0 +1,6 @@
+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.
+
+WWW: https://sites.google.com/site/integrativecancergenomics/software/haplohseq



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909160107.x8G17Vwq012403>