From d321f3c87daa049ed7d23d6518dd923fdc34b294 Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Mon, 22 Jul 2024 19:30:25 -0700 Subject: [PATCH 1/3] README.md: Updating the README.md with several necessary updates --- README.md | 56 +++++++++++++++++++++++++++---------------------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 19f0d8a3..f79d46d3 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ sequencing (RRBS). These tools focus on overcoming the computing challenges imposed by the scale of genome-wide DNA methylation data, which is usually the early parts of data analysis. -## Installing release 1.4.2 +## Installing release 1.4.3 The documentation for DNMTools can be found [here](https://dnmtools.readthedocs.io). But if you want to install @@ -23,11 +23,12 @@ all the formatting. ### Required libraries * A recent compiler. Most users will be building and installing this - software with GCC. We require a compiler that supports C++17, so we - recommend using at least GCC 8 (released in 2018). There are still - many systems that install a very old version of GCC by default, so - if you have problems with building this software, that might be the - first thing to check. + software with GCC. We require a compiler that fully supports C++17, + so we recommend using at least GCC 9 (released in 2019). There are + still many systems that install a very old version of GCC by + default, so if you have problems with building this software, that + might be the first thing to check. The clang LLVM compiler can + also be used with a recent enough version. * The GNU Scientific Library. It can be installed using apt on Linux (Ubuntu, Debian), using brew on macOS, or from source available [here](http://www.gnu.org/software/gsl). @@ -41,14 +42,14 @@ repo, it is easiest if all dependencies are available through conda. ### Configuration -* Download [dnmtools-1.4.2.tar.gz](https://github.com/smithlabcode/dnmtools/releases/download/v1.4.2/dnmtools-1.4.2.tar.gz). +* Download [dnmtools-1.4.3.tar.gz](https://github.com/smithlabcode/dnmtools/releases/download/v1.4.3/dnmtools-1.4.3.tar.gz). * Unpack the archive: ```console -tar -zxvf dnmtools-1.4.2.tar.gz +tar -zxvf dnmtools-1.4.3.tar.gz ``` * Move into the dnmtools directory and create a build directory: ```console -cd dnmtools-1.4.2 && mkdir build && cd build +cd dnmtools-1.4.3 && mkdir build && cd build ``` * Run the configuration script: ```console @@ -88,22 +89,23 @@ any arguments and you should see the list of available commands: ```console dnmtools ``` +There is a test suite for `dnmtools` and these test can be performed +as follows: +```console +make check +``` +This must be done from the build directory. Note that the tests +performed with `make check` are mostly regression tests that cover +prior issues rather than coverage tests to test all the functionality +of `dnmtools`. ### Using a clone of the repo -Not recommended, but if you want to do it this way, we assume you know -what you are doing. We strongly recommend using DNMTools through the -latest stable release under the releases section on GitHub. Developers -who wish to work on the latest commits, which are unstable, can -compile the source using a `Makefile` left in the root of the source -tree. If HTSLib and other libraries are available system-wide, -compile by running: -```console -make -``` -This functionality will probably be removed soon, and if you want to -build the code this way, you should know what you are doing any be -able to make it work yourself. +We strongly recommend using DNMTools through the latest stable release +under the releases section on GitHub or through a package as with +conda/mamba. Developers who wish to work on the latest commits, which +are unstable, can compile the source using `autogen.sh` which just +wraps `autoreconf`. ## Usage @@ -137,7 +139,7 @@ docker tag ghcr.io/smithlabcode/dnmtools:latest dnmtools:latest You can also install the image for a particular vertion by running ```console -docker pull ghcr.io/smithlabcode/dnmtools:v[VERSION NUMBER] #(e.g. v1.4.2) +docker pull ghcr.io/smithlabcode/dnmtools:v[VERSION NUMBER] #(e.g. v1.4.3) ``` Not all versions have corresponding images; you can find available images [here](https://github.com/smithlabcode/dnmtools/pkgs/container/dnmtools). @@ -205,24 +207,20 @@ docker run -v ./:/app -w /app \ dnmtools abismal -v -t 1 -i artifacts/tRex1.idx artifacts/simreads_{1,2}.fq ``` - ## Contacts and bug reports Andrew D. Smith andrewds@usc.edu -Guilherme de Sena Brandine -desenabr@usc.edu - ## Copyright and License Information -Copyright (C) 2022-2023 +Copyright (C) 2022-2024 Andrew D. Smith and Guilherme de Sena Brandine Authors of DNMTools: Andrew D. Smith and Guilherme de Sena Brandine Essential contributors: Ben Decato, Meng Zhou, Liz Ji, Terence Li, -Jenny Qu, Qiang Song and Fang Fang +Jenny Qu, Qiang Song, Fang Fang and Masaru Nakajima This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free From 6fd002898d3c36acaf165e388aa6892e54e5b4ad Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Mon, 22 Jul 2024 19:35:37 -0700 Subject: [PATCH 2/3] Removing Makefile and src/Makefile from the repo --- Makefile | 36 ------------------- src/Makefile | 98 ---------------------------------------------------- 2 files changed, 134 deletions(-) delete mode 100644 Makefile delete mode 100644 src/Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index 146d3ff2..00000000 --- a/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -# This file is part of dnmtools -# -# Copyright (C) 2010-2022 University of Southern California and -# Andrew D. Smith -# -# Authors: Andrew D. Smith -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -DNMTOOLS_ROOT = $(shell pwd) - -all: - @$(MAKE) -C src DNMTOOLS_ROOT=$(DNMTOOLS_ROOT) - -install: - @$(MAKE) -C src DNMTOOLS_ROOT=$(DNMTOOLS_ROOT) install - -clean: - @$(MAKE) -C src DNMTOOLS_ROOT=$(DNMTOOLS_ROOT) clean -.PHONY: clean - -distclean: clean - @rm -rf $(DNMTOOLS_ROOT)/bin -.PHONY: distclean diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index a18fdff0..00000000 --- a/src/Makefile +++ /dev/null @@ -1,98 +0,0 @@ -# Makefile from DNMTools software -# -# Copyright (C) 2022 University of Southern California and -# Andrew D. Smith -# -# Authors: Andrew D. Smith -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# check if recursive clone was done -SMITHLAB_CPP=$(abspath $(dir $(MAKEFILE_LIST)))/smithlab_cpp -ABISMAL=$(abspath $(dir $(MAKEFILE_LIST)))/abismal - -ifeq (,$(wildcard $(SMITHLAB_CPP)/Makefile)) -$(error src/smithlab_cpp does not have a Makefile. \ -Did you use --recursive when running git clone?) -endif - -ifeq (,$(wildcard $(ABISMAL)/Makefile)) -$(error src/abismal does not have a Makefile. \ -Did you use --recursive when running git clone?) -endif - -ifndef SRC_ROOT -SRC_ROOT=.. -endif - -CXX = g++ -CXXFLAGS = -Wall -std=c++11 -fopenmp -OPTFLAGS = -O3 -DEBUGFLAGS = -g - -ifdef DEBUG -CXXFLAGS += $(DEBUGFLAGS) -else -CXXFLAGS += $(OPTFLAGS) -endif - -LDLIBS = -lgsl -lgslcblas -lz -lhts -SMITHLAB_CPP_LIB = $(addprefix $(SMITHLAB_CPP)/, libsmithlab_cpp.a) -ABISMAL_LIB = $(addprefix $(ABISMAL)/, libabismal.a) -LDFLAGS = $(ABISMAL_LIB) $(SMITHLAB_CPP_LIB) - -COMMON_DIR = common -INCLUDEDIRS = $(SMITHLAB_CPP) $(COMMON_DIR) -INCLUDEARGS = $(addprefix -I,$(INCLUDEDIRS)) -override CPPFLAGS += $(INCLUDEARGS) - -PROGS = dnmtools -OBJS = amrfinder/allelicmeth.o amrfinder/amrfinder.o amrfinder/amrtester.o \ -analysis/bsrate.o analysis/hmr.o analysis/hmr-rep.o analysis/hypermr.o \ -analysis/levels.o analysis/methcounts.o analysis/methentropy.o \ -analysis/methstates.o analysis/multimethstat.o analysis/pmd.o \ -analysis/roimethstat.o mlml/mlml.o radmeth/dmr.o radmeth/methdiff.o \ -radmeth/radmeth-adjust.o radmeth/radmeth-merge.o radmeth/radmeth.o \ -utils/clean-hairpins.o utils/uniq.o utils/fast-liftover.o \ -utils/format-reads.o utils/guessprotocol.o utils/lc-approx.o \ -utils/lift-filter.o utils/merge-bsrate.o utils/merge-methcounts.o \ -utils/symmetric-cpgs.o utils/selectsites.o - -COMMON_OBJS = $(addprefix $(COMMON_DIR)/, \ -BetaBin.o bsutils.o Distro.o EmissionDistribution.o Epiread.o \ -EpireadStats.o LevelsCounter.o MSite.o numerical_utils.o \ -Smoothing.o ThreeStateHMM.o TwoStateHMM.o TwoStateHMM_PMD.o) - -all: $(PROGS) - -%.o : %.cpp %.hpp - -$(SMITHLAB_CPP_LIB): - @$(MAKE) -C $(SMITHLAB_CPP) HAVE_HTSLIB=1 - -$(ABISMAL_LIB): - @$(MAKE) -C $(ABISMAL) libabismal.a - -$(PROGS): dnmtools.cpp $(LDFLAGS) $(OBJS) $(COMMON_OBJS) - $(CXX) $(CXXFLAGS) -o $@ $< $(OBJS) $(COMMON_OBJS) \ - $(LDFLAGS) $(CPPFLAGS) $(LDLIBS) - -install: - @mkdir -p $(SRC_ROOT)/bin - @install -m 755 $(PROGS) $(SRC_ROOT)/bin - -clean: - $(MAKE) -C $(SMITHLAB_CPP) clean - $(MAKE) -C $(ABISMAL) clean - @-rm -f $(PROGS) */*.o *.o *.so */*.a *.a *~ From 925ff008af3d5da22c9a695eca40dd3ccbee6e49 Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Mon, 22 Jul 2024 19:36:03 -0700 Subject: [PATCH 3/3] docs/content/quickstart.md: Updating the quickstart.md to correspond better with the README.md --- docs/content/quickstart.md | 50 +++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/docs/content/quickstart.md b/docs/content/quickstart.md index 0b80aadb..1e3f8d25 100644 --- a/docs/content/quickstart.md +++ b/docs/content/quickstart.md @@ -50,19 +50,17 @@ would need to be activated when you want to use dnmtools. ### Required libraries -* A recent compiler: most users will be building and installing this +* A recent compiler. Most users will be building and installing this software with GCC. We require a compiler that fully supports C++17, - so we recommend using at least GCC 8 (released in 2018). There are + so we recommend using at least GCC 9 (released in 2019). There are still many systems that install a very old version of GCC by default, so if you have problems with building this software, that - might be the first thing to check. On macOS and Ubuntu/Debian - systems, the brew and apt package managers can get you a recent - compiler easily. Any cluster or high-performance computing - environment should give you access to a recent compiler. -* The GNU Scientific Library: this has always been required. It can be - installed using apt on Linux (Ubuntu, Debian), using brew on macOS, - or from source available [here](http://www.gnu.org/software/gsl). -* The HTSlib library, which can be installed through brew on macOS, + might be the first thing to check. The clang LLVM compiler can + also be used with a recent enough version. +* The GNU Scientific Library. It can be installed using apt on Linux + (Ubuntu, Debian), using brew on macOS, or from source available + [here](http://www.gnu.org/software/gsl). +* The HTSlib library. This can be installed through brew on macOS, through apt on Linux (Ubuntu, Debian), or from source downloadable [here](https://github.com/samtools/htslib). * The Zlib compression library: Most likely you already have this @@ -72,14 +70,14 @@ would need to be activated when you want to use dnmtools. ### Configuration -* Download [dnmtools-1.4.2.tar.gz](https://github.com/smithlabcode/dnmtools/releases/download/v1.4.2/dnmtools-1.4.2.tar.gz). +* Download [dnmtools-1.4.3.tar.gz](https://github.com/smithlabcode/dnmtools/releases/download/v1.4.3/dnmtools-1.4.3.tar.gz). * Unpack the archive: ```console -$ tar -zxvf dnmtools-1.4.2.tar.gz +$ tar -zxvf dnmtools-1.4.3.tar.gz ``` * Move into the dnmtools directory and create a build directory: ```console -$ cd dnmtools-1.4.2 +$ cd dnmtools-1.4.3 $ mkdir build && cd build ``` * Run the configuration script: @@ -119,25 +117,21 @@ $ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/path/to/htslib/lib To test if everything was successful, simply run `dnmtools` without any arguments and you should see the list of available commands: ```console -$ dnmtools +dnmtools ``` -If you want to do more extensive tests, you can run: +There is a test suite for `dnmtools` and these test can be performed +as follows: ```console -$ make check +make check ``` -from the directory where you run `make`. This will to several tests of -various commands within `dnmtools`, and might take some time. +This must be done from the build directory. Note that the tests +performed with `make check` are mostly regression tests that cover +prior issues rather than coverage tests to test all the functionality +of `dnmtools`. ## Using a clone of the repo -*This option is deprecated; we are no longer maintaining a Makefile -that is not generated by `./configure`.* Not recommended, but if you -want to do it this way, we assume you know what you are doing. We -strongly recommend using dnmtools through the latest stable release +We strongly recommend using dnmtools through the latest stable release under the releases section on GitHub. Developers who wish to work on -the latest commits, which are unstable, can compile the source using -the `Makefile` available in the root of the source tree. If HTSLib and -other libraries are available system-wide, compile by running: -```console -$ make -``` +the latest commits, which are unstable, can start the process using +the `autogen.sh` script and then using the usual autotools approach.