Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
9816bc0
Makefile: removing Makefile
andrewdavidsmith Dec 3, 2025
105e045
src/bamxx: adding bamxx submodule to work with BAM files
andrewdavidsmith Dec 4, 2025
a335fab
.gitmodules: udpating submodule
andrewdavidsmith Dec 4, 2025
b8d6052
Makefile.am: removing the to-mr program, as this functionality will m…
andrewdavidsmith Aug 17, 2026
c26d814
configure.ac: bumping to c++23
andrewdavidsmith Aug 17, 2026
aea5a8a
m4/ax_cxx_compile_stdcxx.m4: updating to allow for checking for c++23
andrewdavidsmith Aug 17, 2026
1d7e53f
src/continued_fraction.hcpp: modernization and formatting
andrewdavidsmith Aug 17, 2026
cdba614
src/continued_fraction.hcpp: updating copyright
andrewdavidsmith Aug 17, 2026
f479d64
src/moment_sequence.cpp: modernization
andrewdavidsmith Aug 17, 2026
8b448ee
src/continued_fraction.hcpp: fixing output formatting for ContinuedFr…
andrewdavidsmith Aug 17, 2026
2803d86
src/load_data_for_complexity.hcpp: modernization
andrewdavidsmith Aug 17, 2026
6986f80
src/continued_fraction.hpp: forgotten includes
andrewdavidsmith Aug 18, 2026
cbdd875
src/CLI11: adding CLI11
andrewdavidsmith Aug 18, 2026
9a4a675
src/preseq.cpp: changing to CLI11 and modernizing
andrewdavidsmith Aug 18, 2026
67a01e3
src/preseq.cpp: using std::print
andrewdavidsmith Aug 18, 2026
d644158
cmake/tests.cmake: adding a cmake to set up tests
andrewdavidsmith Aug 18, 2026
d6739ce
test/lc_extrap_hist.sh and test/md5sum.txt: adding initial test scrip…
andrewdavidsmith Aug 18, 2026
283add2
src/continued_fraction.hcpp: exposed ContinuedFractionApproximation a…
andrewdavidsmith Aug 18, 2026
ecd2f55
src/preseq.cpp: removed the requirement for a flag for input files
andrewdavidsmith Aug 18, 2026
9769e4b
test/lc_extrap_vals.sh: adding a test for vals input
andrewdavidsmith Aug 25, 2026
dcf8984
test/md5sum.txt: adding checksum for output from lc_extrap_vals test
andrewdavidsmith Aug 25, 2026
9efc05f
cmake/tests.cmake: adding test for lc_extrap with vals input
andrewdavidsmith Aug 25, 2026
a67a96c
src/preseq.cpp: fixing some input args types for c_curve and some jan…
andrewdavidsmith Aug 25, 2026
6573b9a
test/md5sum.txt test/c_curve_mr.sh cmake/tests.cmake: adding test for…
andrewdavidsmith Aug 25, 2026
bf3bbc3
src/preseq.cpp: fixing some flags that were marked as options
andrewdavidsmith Aug 25, 2026
2aadc70
test/gc_extrap_mr.sh test/md5sum.txt cmake/tests.cmake: adding test f…
andrewdavidsmith Aug 25, 2026
f4764cb
test/bound_pop_hist.sh test/md5sum.txt cmake/tests.cmake: adding test…
andrewdavidsmith Aug 25, 2026
6493bac
src/load_data_for_complexity.cpp: conciseness for later refactoring
andrewdavidsmith Aug 25, 2026
1f4c9ce
.github/workflows/linux-system-tests.yml
andrewdavidsmith Aug 25, 2026
a3cb7d7
merge attempt
andrewdavidsmith Aug 25, 2026
cf4e002
linting config files: adding and updating
andrewdavidsmith Dec 5, 2025
36745d6
cmake/static_analysis.cmake and cmake/FindHTSLIB.cmake: adding cmake …
andrewdavidsmith Dec 5, 2025
cdfcd4f
src/bam_record_utils.hcpp: linting
andrewdavidsmith Dec 5, 2025
2301c85
src/CLI11.hpp: adding CLI11
andrewdavidsmith Dec 5, 2025
d6d52c0
src/load_data_for_complexity.cpp: linting
andrewdavidsmith Dec 5, 2025
f11c1ca
switching to CLI11
andrewdavidsmith Dec 5, 2025
5d30e7f
src/common.hcpp: formatting and adding some utilities
andrewdavidsmith Dec 5, 2025
8bbe445
src/continued_fraction.hcpp: linting
andrewdavidsmith Dec 5, 2025
6718298
src/moment_sequence.hcpp: linting
andrewdavidsmith Dec 5, 2025
8bd8466
src/preseq.cpp: iwyu and formatting
andrewdavidsmith Dec 5, 2025
85f4eaf
src/bamxx and src/smithlab_cpp: updating submodules
andrewdavidsmith Dec 5, 2025
1158620
data/config.h.in: adding this for cmake builds
andrewdavidsmith Dec 5, 2025
8e3a774
CMakeLists.txt src/CMakeLists.txt: adding cmake stuff
andrewdavidsmith Dec 5, 2025
4d82a07
src/CMakeLists.txt: htslib stuff is only included in build if htslib …
andrewdavidsmith Dec 5, 2025
e56c3a1
src/CMakeLists.txt: removing requirement on particular version for ht…
andrewdavidsmith Dec 5, 2025
34f2290
src/bound_pop.cpp: linting and formatting help output
andrewdavidsmith Dec 5, 2025
576d697
src/c_curve.cpp: linting and formatting help output
andrewdavidsmith Dec 5, 2025
5407174
src/common.hpp: linting and deadcode
andrewdavidsmith Dec 5, 2025
b03c747
src/gc_extrap.cpp: linting and formatting help output
andrewdavidsmith Dec 5, 2025
5971a11
src/pop_size.cpp: linting and formatting help output
andrewdavidsmith Dec 5, 2025
6d3938a
src/lc_extrap.cpp: linting and formatting help output
andrewdavidsmith Dec 5, 2025
43138f5
src/load_data_for_complexity.cpp: linting
andrewdavidsmith Dec 5, 2025
3c26442
src/preseq.cpp: fixing the args passed to subcommands
andrewdavidsmith Dec 5, 2025
a29777a
tests/scripts several scripts: updating args to have -i explicit
andrewdavidsmith Dec 5, 2025
6983a23
src/CLI11/CLI11.hpp: moving file
andrewdavidsmith Dec 5, 2025
af5135b
Adding license and cpplint config for cli11
andrewdavidsmith Dec 5, 2025
e343b02
.cppcheck_suppress: adding CLI11.hpp to suppression list
andrewdavidsmith Dec 6, 2025
214fe4d
src/bound_pop.cpp: linting
andrewdavidsmith Dec 6, 2025
6408f20
src/c_curve.cpp: linting
andrewdavidsmith Dec 6, 2025
b3d45f9
src/common.hcpp: linting
andrewdavidsmith Dec 6, 2025
b85fb60
multiple sources: linting
andrewdavidsmith Dec 6, 2025
578a67b
src/load_data_for_complexity.cpp: linting
andrewdavidsmith Dec 6, 2025
dbe4fe3
src/load_data_for_complexity.cpp: fixing do-while loops
andrewdavidsmith Dec 11, 2025
2400578
src/load_data_for_complexity.cpp: cleanup
andrewdavidsmith Dec 11, 2025
ce3bf84
src/dnmt_error.hpp: no longer needed
andrewdavidsmith Dec 11, 2025
7373ba9
src/bam_record_utils.hcpp: linting
andrewdavidsmith Dec 11, 2025
37d5f49
.clang-format-ignore: adding
andrewdavidsmith Dec 11, 2025
09e59fb
src/smithlab_cpp: removing submodule
andrewdavidsmith Dec 11, 2025
8fb7aa7
.gitmodules: removing smithlab_cpp
andrewdavidsmith Dec 11, 2025
efbb3ae
src/Interval6.hcpp: adding
andrewdavidsmith Dec 11, 2025
e08161b
src/CMakeLists.txt: removing smithlab_cpp and adding Interval6
andrewdavidsmith Dec 11, 2025
f0538a3
multiple sources: renaming functions
andrewdavidsmith Dec 11, 2025
b115367
src/load_data_for_complexity.hcpp: some simplification
andrewdavidsmith Dec 11, 2025
92ac1ce
src/gc_extrap.cpp: removed option for input being MappedRead format
andrewdavidsmith Dec 11, 2025
382ef45
Makefile.am: removing smithlab_cpp and adding Interval6
andrewdavidsmith Dec 12, 2025
1419bbc
configure.ac: removing smithlab_cpp and updating the input test mr fi…
andrewdavidsmith Dec 12, 2025
a2375a3
tests/scripts/test_gc_extrap.test: updating the input file name
andrewdavidsmith Dec 12, 2025
7f8305c
src/gc_extrap.cpp: fixing typo
andrewdavidsmith Dec 12, 2025
b0fa904
src/load_data_for_complexity.cpp: modernizing
andrewdavidsmith Dec 12, 2025
a98b1cc
src/load_data_for_complexity.cpp: tweak
andrewdavidsmith Dec 12, 2025
bd2c5e4
src/load_data_for_complexity.hcpp and all main sources: returning tup…
andrewdavidsmith Dec 12, 2025
16e5b4d
src/Interval6.hcpp and src/load_data_for_complexity.cpp: linting
andrewdavidsmith Dec 12, 2025
86e45de
src/Makefile: removing
andrewdavidsmith Dec 12, 2025
adfd0b2
all subcommand headers: adding a namespace to wrap a main and to hold…
andrewdavidsmith Dec 13, 2025
4282f74
src/common.hcpp: mmodernizing and fixing name of log factorial function
andrewdavidsmith Dec 13, 2025
6719d52
src/preseq.cpp: changing to use CLI11 for the subcommands. Nice!
andrewdavidsmith Dec 13, 2025
d6f90ef
src all command sources: using the main function in each case from th…
andrewdavidsmith Dec 13, 2025
d2b03f2
src/lnfact.hpp: adding faster log factorial function
andrewdavidsmith Dec 13, 2025
085eb2b
src/common.hcpp: changing the log factorial to use a table since it's…
andrewdavidsmith Dec 13, 2025
f5fc0be
src/load_data_for_complexity.hcpp: adding a function to check if the …
andrewdavidsmith Dec 13, 2025
1ba77c1
src/load_data_for_complexity.hcpp: added helper functions to deduce i…
andrewdavidsmith Dec 13, 2025
b4f650a
src/nlohmann/json.hpp: adding json support
andrewdavidsmith Dec 13, 2025
c902a1b
data/LICENSES.inc.in and data/LICENSE: adding full licenses for pre-b…
andrewdavidsmith Dec 13, 2025
f9b4cde
.clang-format-ignore: ignoring json.hpp
andrewdavidsmith Dec 13, 2025
6d7d288
.clang-format: no auto-formatting comments
andrewdavidsmith Dec 13, 2025
ee45745
.cppcheck_suppress: don't check json.hpp
andrewdavidsmith Dec 13, 2025
4a53b50
src/moment_sequence.hcpp: formatting
andrewdavidsmith Dec 13, 2025
e3bec41
src/bound_pop.cpp: refactoring and outputting moments info in json fo…
andrewdavidsmith Dec 13, 2025
6af46c6
src/c_curve.cpp: refactoring how input is read
andrewdavidsmith Dec 13, 2025
23990bd
src/lc_extrap.cpp: refactoring how input is read
andrewdavidsmith Dec 13, 2025
bf13a50
src/preseq.cpp: allowing for embedding license info in the built binary
andrewdavidsmith Dec 13, 2025
b868a58
src/gc_extrap.cpp: refactoring including how input is read
andrewdavidsmith Dec 13, 2025
6fb8eab
src/pop_size.cpp: refactoring how input is read
andrewdavidsmith Dec 13, 2025
c64bce2
src/load_data_for_complexity.cpp: linting
andrewdavidsmith Dec 13, 2025
a916bfb
configure.ac: making htslib on by default and adding check for libdef…
andrewdavidsmith Dec 24, 2025
8ddec82
src/c_curve.cpp: updating args with default values
andrewdavidsmith Dec 24, 2025
6b480f4
src/common.cpp: requiring an output file in writing ptredicted comple…
andrewdavidsmith Dec 24, 2025
3ea32f3
src/gc_extrap.cpp: updating default arg values
andrewdavidsmith Dec 24, 2025
f6607f9
src/lc_extrap.cpp: updating default arg values and arg flags for cons…
andrewdavidsmith Dec 24, 2025
9d2c6fd
documentation/README.md: update
andrewdavidsmith Dec 24, 2025
e8b2ff6
tests/data/gc_extrap_input.mr to bed: changing file format
andrewdavidsmith Dec 24, 2025
365d066
Makefile.am: renaming test data file
andrewdavidsmith Dec 24, 2025
0a9caef
configure.ac: fixing type
andrewdavidsmith Dec 24, 2025
a1a0260
m4/ax_pthread.m4: adding macro to find the proper threads lib
andrewdavidsmith Dec 24, 2025
70d271a
Makefile.am: ENABLE_HTS to ENABLE_HTSLIB
andrewdavidsmith Dec 24, 2025
00132c6
configure.ac: more detailed config...
andrewdavidsmith Dec 24, 2025
f6d7905
configure.ac: adding checks for additional dependencies when building…
andrewdavidsmith Dec 24, 2025
1aa22f9
src/nlohmann/LICENSE: adding license
andrewdavidsmith Dec 24, 2025
fbc48e7
src/nlohmann/CPPLINT.cfg: adding CPPLINT.cfg to disable cpplint
andrewdavidsmith Dec 24, 2025
3e4d6b2
linting
andrewdavidsmith Dec 24, 2025
c225431
adding include guard
andrewdavidsmith Dec 24, 2025
8554636
.gitmodules: udpating submodule
andrewdavidsmith Dec 4, 2025
8ae29c7
configure.ac: bumping to c++23
andrewdavidsmith Aug 17, 2026
df922be
src/continued_fraction.hcpp: modernization and formatting
andrewdavidsmith Aug 17, 2026
5635737
src/moment_sequence.cpp: modernization
andrewdavidsmith Aug 17, 2026
2ea81a3
src/continued_fraction.hcpp: fixing output formatting for ContinuedFr…
andrewdavidsmith Aug 17, 2026
9c3a96c
src/load_data_for_complexity.hcpp: modernization
andrewdavidsmith Aug 17, 2026
0da6d83
src/continued_fraction.hpp: forgotten includes
andrewdavidsmith Aug 18, 2026
1cc6c51
src/CLI11: adding CLI11
andrewdavidsmith Aug 18, 2026
28a2272
src/preseq.cpp: changing to CLI11 and modernizing
andrewdavidsmith Aug 18, 2026
d44f673
src/preseq.cpp: using std::print
andrewdavidsmith Aug 18, 2026
2afb0d3
src/continued_fraction.hcpp: exposed ContinuedFractionApproximation a…
andrewdavidsmith Aug 18, 2026
649b721
src/preseq.cpp: removed the requirement for a flag for input files
andrewdavidsmith Aug 18, 2026
ea401e5
src/load_data_for_complexity.cpp: conciseness for later refactoring
andrewdavidsmith Aug 25, 2026
026a47d
src/Interval6.hpp: update for c++20
andrewdavidsmith Aug 26, 2026
a269cf3
src/common.cpp: function name changes
andrewdavidsmith Aug 26, 2026
48a0b76
src/preseq.cpp: changing some var names for clashes
andrewdavidsmith Aug 26, 2026
6959cd3
src/moment_sequence.hcpp: static analysis changes
andrewdavidsmith Aug 26, 2026
5b59aca
src/continued_fraction.cpp: static analysis changes
andrewdavidsmith Aug 26, 2026
78e3492
src/load_data_for_complexity.cpp: fixing includes
andrewdavidsmith Aug 26, 2026
cfbfd0a
test scripts: removing input file type arg because it is now deduced
andrewdavidsmith Aug 30, 2026
a40c727
src/CMakeLists.txt: removing this because keeping cmake stuff at repo…
andrewdavidsmith Aug 30, 2026
c966142
src/Interval6.hpp: modernizing to_string and comparator
andrewdavidsmith Aug 30, 2026
bc7daa7
src/common.hcpp: modernizing
andrewdavidsmith Aug 30, 2026
7d6a29d
src/bam_record_utils.hcpp: modernization and removing an exception ty…
andrewdavidsmith Aug 30, 2026
427f2e1
src/load_data_for_complexity.cpp: modernization and fixing a bug that…
andrewdavidsmith Aug 30, 2026
89faebe
src/c_curve.hcpp: modernization and removing superfluous namespace
andrewdavidsmith Aug 30, 2026
37f8b88
src/pop_size.hcpp: modernization and removing superfluous namespace
andrewdavidsmith Aug 30, 2026
d7d6e4a
src/bound_pop.hcpp: modernization and removing superfluous namespace
andrewdavidsmith Aug 30, 2026
ddac908
src/lc_extrap.hcpp: modernization and removing superfluous namespace
andrewdavidsmith Aug 30, 2026
11ed237
src/gc_extrap.hcpp: modernization and removing superfluous namespace
andrewdavidsmith Aug 30, 2026
b88a8c3
src/continued_fraction.cpp: modernization
andrewdavidsmith Aug 30, 2026
0ff8c73
src/moment_sequence.cpp: cleanup
andrewdavidsmith Aug 30, 2026
c901a51
src/preseq.cpp: updates to reflect the changes in each of the individ…
andrewdavidsmith Aug 30, 2026
da65bae
CMakeLists.txt: moving things that were in src/CMakeLists.txt into th…
andrewdavidsmith Aug 30, 2026
7610842
src/continued_fraction.hcpp: fixing variable names and removing std::…
andrewdavidsmith Aug 31, 2026
be077ec
src/lc_extrap.cpp: removing spdlog code
andrewdavidsmith Aug 31, 2026
93d6187
iwyu
andrewdavidsmith Aug 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
# This file is part of preseq
#
# Copyright (C) 2024: Andrew D. Smith
#
# Authors: Andrew D. Smith
#
# 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 Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This software 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.

BasedOnStyle: LLVM
ColumnLimit: 80
IndentWidth: 2
AlwaysBreakAfterReturnType: TopLevel
AlwaysBreakAfterReturnType: All
ContinuationIndentWidth: 2
ConstructorInitializerIndentWidth: 2
BraceWrapping:
Expand All @@ -26,3 +10,4 @@ BraceWrapping:
BreakBeforeBraces: Custom
BreakConstructorInitializers: AfterColon
SpacesBeforeTrailingComments: 2
ReflowComments: false
2 changes: 2 additions & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/CLI11/CLI11.hpp
src/nlohmann/json.hpp
31 changes: 31 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Checks: 'cert-*,cppcoreguidelines-*,performance-*,clang-diagnostic-*,clang-analyzer-*,-clang-diagnostic-unqualified-std-cast-call,-clang-diagnostic-unknown-warning-option,-clang-analyzer-unix.BlockInCriticalSection,-cppcoreguidelines-pro-type-vararg'
WarningsAsErrors: '*'
HeaderFileExtensions:
- ''
- h
- hh
- hpp
- hxx
ImplementationFileExtensions:
- c
- cc
- cpp
- cxx
HeaderFilterRegex: ''
ExcludeHeaderFilterRegex: 'OptionParser.hpp'
FormatStyle: none
CheckOptions:
cert-dcl16-c.NewSuffixes: 'L;LL;LU;LLU'
cert-err33-c.AllowCastToVoid: 'true'
cert-err33-c.CheckedFunctions: '::aligned_alloc;::asctime_s;::at_quick_exit;::atexit;::bsearch;::bsearch_s;::btowc;::c16rtomb;::c32rtomb;::calloc;::clock;::cnd_broadcast;::cnd_init;::cnd_signal;::cnd_timedwait;::cnd_wait;::ctime_s;::fclose;::fflush;::fgetc;::fgetpos;::fgets;::fgetwc;::fopen;::fopen_s;::fprintf;::fprintf_s;::fputc;::fputs;::fputwc;::fputws;::fread;::freopen;::freopen_s;::fscanf;::fscanf_s;::fseek;::fsetpos;::ftell;::fwprintf;::fwprintf_s;::fwrite;::fwscanf;::fwscanf_s;::getc;::getchar;::getenv;::getenv_s;::gets_s;::getwc;::getwchar;::gmtime;::gmtime_s;::localtime;::localtime_s;::malloc;::mbrtoc16;::mbrtoc32;::mbsrtowcs;::mbsrtowcs_s;::mbstowcs;::mbstowcs_s;::memchr;::mktime;::mtx_init;::mtx_lock;::mtx_timedlock;::mtx_trylock;::mtx_unlock;::printf_s;::putc;::putwc;::raise;::realloc;::remove;::rename;::scanf;::scanf_s;::setlocale;::setvbuf;::signal;::snprintf;::snprintf_s;::sprintf;::sprintf_s;::sscanf;::sscanf_s;::strchr;::strerror_s;::strftime;::strpbrk;::strrchr;::strstr;::strtod;::strtof;::strtoimax;::strtok;::strtok_s;::strtol;::strtold;::strtoll;::strtoul;::strtoull;::strtoumax;::strxfrm;::swprintf;::swprintf_s;::swscanf;::swscanf_s;::thrd_create;::thrd_detach;::thrd_join;::thrd_sleep;::time;::timespec_get;::tmpfile;::tmpfile_s;::tmpnam;::tmpnam_s;::tss_create;::tss_get;::tss_set;::ungetc;::ungetwc;::vfprintf;::vfprintf_s;::vfscanf;::vfscanf_s;::vfwprintf;::vfwprintf_s;::vfwscanf;::vfwscanf_s;::vprintf_s;::vscanf;::vscanf_s;::vsnprintf;::vsnprintf_s;::vsprintf;::vsprintf_s;::vsscanf;::vsscanf_s;::vswprintf;::vswprintf_s;::vswscanf;::vswscanf_s;::vwprintf_s;::vwscanf;::vwscanf_s;::wcrtomb;::wcschr;::wcsftime;::wcspbrk;::wcsrchr;::wcsrtombs;::wcsrtombs_s;::wcsstr;::wcstod;::wcstof;::wcstoimax;::wcstok;::wcstok_s;::wcstol;::wcstold;::wcstoll;::wcstombs;::wcstombs_s;::wcstoul;::wcstoull;::wcstoumax;::wcsxfrm;::wctob;::wctrans;::wctype;::wmemchr;::wprintf_s;::wscanf;::wscanf_s;'
cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField: 'false'
cert-str34-c.DiagnoseSignedUnsignedCharComparisons: 'false'
cppcoreguidelines-non-private-member-variables-in-classes.IgnorePublicMemberVariables: 'true'
google-readability-braces-around-statements.ShortStatementLines: '1'
google-readability-function-size.StatementThreshold: '800'
google-readability-namespace-comments.ShortNamespaceLines: '10'
google-readability-namespace-comments.SpacesBeforeComments: '2'
llvm-else-after-return.WarnOnConditionVariables: 'false'
llvm-else-after-return.WarnOnUnfixable: 'false'
llvm-qualified-auto.AddConstToQualified: 'false'
SystemHeaders: 'false'
21 changes: 16 additions & 5 deletions .cppcheck_suppress
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of preseq
#
# Copyright (C) 2024: Andrew D. Smith
# Copyright (C) 2024-2025 Andrew D. Smith
#
# Authors: Andrew D. Smith
#
Expand All @@ -17,7 +17,18 @@
missingIncludeSystem
constVariablePointer
checkersReport
unusedFunction:src/bam_record_utils.hpp
unusedFunction:src/bam_record_utils.cpp
*:src/smithlab_cpp*
unusedStructMember:src/*.hpp
unknownMacro
unmatchedSuppression
# Ignore unused function because it's too hard to get right
unusedFunction
# Ignore unused struct member because this won't go unnoticed anyway
unusedStructMember
# Ignore missing includes because if they are real things won't build
missingInclude
# Exclude external files
*:*CLI11.hpp
*:*json.hpp
# Problem caused by external files
toomanyconfigs
# More problems caused by external files -- with too many ifdefs
normalCheckLevelMaxBranches
31 changes: 31 additions & 0 deletions .github/workflows/linux-system-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: System tests (Linux)

on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:

jobs:
ubuntu-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# - name: Dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y zlib1g-dev libdeflate-dev libhts-dev samtools
- name: Configure
run: |
cmake -B build \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_BUILD_TYPE=Release
- name: Build
run: |
cmake --build build -j4
- name: Test
run: |
ctest --test-dir build --output-on-failure
11 changes: 4 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[submodule "preseqR"]
path = preseqR
url = ../preseqR.git
[submodule "src/smithlab_cpp"]
path = src/smithlab_cpp
url = ../smithlab_cpp.git
path = preseqR
url = ../preseqR.git
[submodule "src/bamxx"]
path = src/bamxx
url = ../bamxx.git
path = src/bamxx
url = ../bamxx.git
103 changes: 103 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Copyright (C) 2026 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 <https://www.gnu.org/licenses/>.

# to find the version of cmake do
# $ cmake --version
cmake_minimum_required(VERSION 3.30)
project(
preseq
VERSION 3.2.0
DESCRIPTION
"predict properties of genomic sequencing libraries"
HOMEPAGE_URL https://github.com/smithlabcode/preseq
LANGUAGES CXX)

# Set language version used
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED yes)
set(CMAKE_CXX_EXTENSIONS off) # prevents std=gnu++23
set(CMAKE_EXPORT_COMPILE_COMMANDS on)

include(CheckIncludeFileCXX)
include(CheckFunctionExists)
include(CheckCXXCompilerFlag)

include(GNUInstallDirs)

configure_file(data/config.h.in config.h)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

add_compile_options(
-Wall
-Wextra
-Wpedantic
-Werror
-Wfatal-errors
)

if(STATIC_ANALYSIS)
include(cmake/static_analysis.cmake)
endif()

option(PRESEQ_TESTS "Enable testing (ctest or make test)" on)
if(PRESEQ_TESTS)
include(cmake/tests.cmake)
endif()

find_package(Threads REQUIRED)
find_package(spdlog REQUIRED)

if(USE_HTSLIB)
find_package(HTSLIB 1.20 REQUIRED)
add_compile_definitions(HAVE_HTSLIB)
add_subdirectory(src/bamxx)
endif()

add_library(common OBJECT src/common.cpp)
add_library(Interval6 OBJECT src/Interval6.cpp)
add_library(lc_extrap OBJECT src/lc_extrap.cpp)
add_library(gc_extrap OBJECT src/gc_extrap.cpp)
add_library(c_curve OBJECT src/c_curve.cpp)
add_library(bound_pop OBJECT src/bound_pop.cpp)
add_library(pop_size OBJECT src/pop_size.cpp)
add_library(continued_fraction OBJECT src/continued_fraction.cpp)
add_library(moment_sequence OBJECT src/moment_sequence.cpp)
add_library(load_data_for_complexity OBJECT src/load_data_for_complexity.cpp)

add_executable(preseq src/preseq.cpp)

# ADS: below, for config.h
target_include_directories(preseq PUBLIC ${CMAKE_BINARY_DIR})

target_link_libraries(preseq PRIVATE
common
continued_fraction
moment_sequence
Interval6
load_data_for_complexity
lc_extrap
gc_extrap
c_curve
bound_pop
pop_size
)
target_link_libraries(preseq PRIVATE spdlog::spdlog_header_only)

if(USE_HTSLIB)
target_link_libraries(preseq PRIVATE
bamxx
HTSLIB::HTSLIB
)
endif()
24 changes: 12 additions & 12 deletions CPPLINT.cfg
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
# This file is part of preseq
#
# Copyright (C) 2024: Andrew D. Smith
# Copyright (C) 2023-2025 Andrew D. Smith
#
# Authors: Andrew D. Smith
# 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 Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# 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 Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This software 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.

# This software 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.
set noparent
filter=-runtime/references
filter=-build/include_subdir
Expand All @@ -26,3 +23,6 @@ filter=-whitespace/newline
filter=-readability/braces
filter=-whitespace/semicolon
filter=-whitespace/indent
filter=-whitespace/braces
filter=-whitespace/parens
filter=-readability/nolint
32 changes: 0 additions & 32 deletions Makefile

This file was deleted.

34 changes: 16 additions & 18 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
# This file is part of preseq
#
# Copyright (C) 2018-2024: Andrew D. Smith
# Copyright (C) 2018-2025: Andrew D. Smith
#
# Authors: Andrew D. Smith
#
# 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 Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 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 Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This software 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.
# This software 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.

ACLOCAL_AMFLAGS = -I m4

SUBDIRS := src/smithlab_cpp
install installdirs: SUBDIRS := $(filter-out src/smithlab_cpp, $(SUBDIRS))
AM_CPPFLAGS = -I $(top_srcdir)/src/smithlab_cpp
if ENABLE_HTS
AM_CPPFLAGS =
if ENABLE_HTSLIB
AM_CPPFLAGS += -I $(top_srcdir)/src/bamxx
endif

AM_CPPFLAGS += -Wall -Wextra -Wpedantic -Wno-unknown-attributes
if ENABLE_HTS
if ENABLE_HTSLIB
AM_CPPFLAGS += -DHAVE_HTSLIB
endif

Expand All @@ -36,7 +34,7 @@ EXTRA_DIST = \
docs \
tests/md5sum.txt \
tests/data/lc_extrap_input.vals \
tests/data/gc_extrap_input.mr \
tests/data/gc_extrap_input.bed \
tests/data/c_curve_input.hist \
tests/scripts/test_c_curve.test \
tests/scripts/test_gc_extrap.test \
Expand All @@ -49,8 +47,6 @@ TESTS = \

TEST_EXTENSIONS = .test

LDADD = src/smithlab_cpp/libsmithlab_cpp.a

bin_PROGRAMS = preseq

preseq_SOURCES = \
Expand All @@ -71,10 +67,12 @@ preseq_SOURCES = \
src/continued_fraction.cpp \
src/load_data_for_complexity.hpp \
src/load_data_for_complexity.cpp \
src/Interval6.hpp \
src/Interval6.cpp \
src/moment_sequence.hpp \
src/moment_sequence.cpp

if ENABLE_HTS
if ENABLE_HTSLIB
preseq_SOURCES += \
src/bamxx/bamxx.hpp \
src/bam_record_utils.hpp \
Expand Down
Loading