From 44043774b3dc5b639753aae1c7f991289eaf1d9e Mon Sep 17 00:00:00 2001 From: Devon Ryan Date: Sun, 27 Jun 2021 15:00:57 +0200 Subject: [PATCH 1/5] Fix #117, bump version of 0.5.3 --- CHANGELOG.md | 4 ++++ Makefile | 2 +- perRead.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 381d5aa..c67d46a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +Version 0.5.3: + + * Fixed an issue with the `perRead` subcommand, wherein the requireFlags option didn't fully work (a read would pass if it had at least one of the required flags set, rather than all of them). (issue #117) + Version 0.5.2: * Rewrote how read-pair overlap handling is performed. It now uses the constructor/destructor mechanism from htslib instead of using internal htslib structures and functions. This allows supporting newer htslib versions. Currently 1.11 is the only tested and working version, due to changes in the pileup constructor interface in it. (issue #99) diff --git a/Makefile b/Makefile index f126811..d77c5d7 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ CFLAGS ?= -Wall -g -O3 -pthread all: MethylDackel OBJS = common.o bed.o svg.o overlaps.o extract.o MBias.o mergeContext.o perRead.o -VERSION = 0.5.2 +VERSION = 0.5.3 version.h: echo '#define VERSION "$(VERSION)"' > $@ diff --git a/perRead.c b/perRead.c index 66c9711..366f701 100644 --- a/perRead.c +++ b/perRead.c @@ -188,7 +188,7 @@ void *perReadMetrics(void *foo) { if(b->core.pos < localPos) continue; if(b->core.pos >= localEnd) break; nmethyl = 0, nunmethyl = 0; - if(config->requireFlags && (config->requireFlags & b->core.flag) == 0) continue; + if(config->requireFlags && (config->requireFlags & b->core.flag) != config->requireFlags) continue; if(config->ignoreFlags && (config->ignoreFlags & b->core.flag) != 0) continue; if(b->core.qual < config->minMapq) continue; processRead(config, b, seq, localPos2, seqlen, &nmethyl, &nunmethyl); From f56a124cbcfc7175efe05dfcb04bc00e1a5efcde Mon Sep 17 00:00:00 2001 From: Devon Ryan Date: Sun, 27 Jun 2021 15:05:14 +0200 Subject: [PATCH 2/5] why is osx failing --- .azure-pipelines/test-template.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.azure-pipelines/test-template.yml b/.azure-pipelines/test-template.yml index 78a6dfc..dc745f5 100644 --- a/.azure-pipelines/test-template.yml +++ b/.azure-pipelines/test-template.yml @@ -2,6 +2,8 @@ steps: - bash: | source activate MethylDackel export CONDA_BUILD_SYSROOT='' + echo $CONDA_PREFIX + find $CONDA_PREFIX -name inttypes.h -print make install CC=$CC CFLAGS="-O3 -Wall -I$CONDA_PREFIX/include" LIBS="-L$CONDA_PREFIX/lib" LIBBIGWIG="$CONDA_PREFIX/lib/libBigWig.a" prefix=$CONDA_PREFIX/bin displayName: Installing methylDackel - bash: | From 9cb8c82adee00456c8ddadd840fdd53697b9e19d Mon Sep 17 00:00:00 2001 From: Devon Ryan Date: Sun, 27 Jun 2021 15:07:47 +0200 Subject: [PATCH 3/5] debug --- .azure-pipelines/test-template.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/test-template.yml b/.azure-pipelines/test-template.yml index dc745f5..7f2f2f3 100644 --- a/.azure-pipelines/test-template.yml +++ b/.azure-pipelines/test-template.yml @@ -4,6 +4,7 @@ steps: export CONDA_BUILD_SYSROOT='' echo $CONDA_PREFIX find $CONDA_PREFIX -name inttypes.h -print + env make install CC=$CC CFLAGS="-O3 -Wall -I$CONDA_PREFIX/include" LIBS="-L$CONDA_PREFIX/lib" LIBBIGWIG="$CONDA_PREFIX/lib/libBigWig.a" prefix=$CONDA_PREFIX/bin displayName: Installing methylDackel - bash: | From 2111ede9245c0bfea3ec42bc26f2e553627464b1 Mon Sep 17 00:00:00 2001 From: Devon Ryan Date: Sun, 27 Jun 2021 15:43:22 +0200 Subject: [PATCH 4/5] hmm, ok --- .azure-pipelines/test-template.yml | 3 --- azure-pipeline.yml | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.azure-pipelines/test-template.yml b/.azure-pipelines/test-template.yml index 7f2f2f3..78a6dfc 100644 --- a/.azure-pipelines/test-template.yml +++ b/.azure-pipelines/test-template.yml @@ -2,9 +2,6 @@ steps: - bash: | source activate MethylDackel export CONDA_BUILD_SYSROOT='' - echo $CONDA_PREFIX - find $CONDA_PREFIX -name inttypes.h -print - env make install CC=$CC CFLAGS="-O3 -Wall -I$CONDA_PREFIX/include" LIBS="-L$CONDA_PREFIX/lib" LIBBIGWIG="$CONDA_PREFIX/lib/libBigWig.a" prefix=$CONDA_PREFIX/bin displayName: Installing methylDackel - bash: | diff --git a/azure-pipeline.yml b/azure-pipeline.yml index 0b9c091..3aa0ff1 100644 --- a/azure-pipeline.yml +++ b/azure-pipeline.yml @@ -41,6 +41,6 @@ jobs: displayName: Add conda to PATH - bash: sudo chown -R 501:20 /usr/local/miniconda/pkgs displayName: Fix permissions - - bash: conda create -n MethylDackel -q --yes -c conda-forge -c bioconda htslib=$(HTSLIB_VERSION) python clang clang_osx-64 clangxx cctools compiler-rt ld64 libbigwig + - bash: conda create -n MethylDackel -q --yes -c conda-forge -c bioconda htslib=$(HTSLIB_VERSION) python clang=11.1.0 clang-11 clang_osx-64=11.1.0 clangxx=11.1.0 cctools_osx-64 compiler-rt ld64_osx libcxx make libbigwig displayName: Installing dependencies - template: .azure-pipelines/test-template.yml From 57fb9b49c9104ce9627ec84c904a560fd5871687 Mon Sep 17 00:00:00 2001 From: Devon Ryan Date: Sun, 27 Jun 2021 15:46:13 +0200 Subject: [PATCH 5/5] oops --- azure-pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipeline.yml b/azure-pipeline.yml index 3aa0ff1..5dabace 100644 --- a/azure-pipeline.yml +++ b/azure-pipeline.yml @@ -41,6 +41,6 @@ jobs: displayName: Add conda to PATH - bash: sudo chown -R 501:20 /usr/local/miniconda/pkgs displayName: Fix permissions - - bash: conda create -n MethylDackel -q --yes -c conda-forge -c bioconda htslib=$(HTSLIB_VERSION) python clang=11.1.0 clang-11 clang_osx-64=11.1.0 clangxx=11.1.0 cctools_osx-64 compiler-rt ld64_osx libcxx make libbigwig + - bash: conda create -n MethylDackel -q --yes -c conda-forge -c bioconda htslib=$(HTSLIB_VERSION) python clang=11.1.0 clang-11 clang_osx-64=11.1.0 clangxx=11.1.0 cctools_osx-64 compiler-rt ld64_osx-64 libcxx make libbigwig displayName: Installing dependencies - template: .azure-pipelines/test-template.yml