Skip to content

Several major updates #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 58 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
b88ab25
src/smithlab_cpp: updating submodules
andrewdavidsmith Oct 18, 2024
e714421
Fixing hashes on test outputs and fixing script for testing lc_extrap
andrewdavidsmith Oct 18, 2024
300ca41
src/moment_sequence.hcpp: removing unused verbose arguments to functions
andrewdavidsmith Oct 18, 2024
75a7a5e
src/c_curve.cpp: removed code that was not used for c_curve from this…
andrewdavidsmith Oct 18, 2024
dba838d
src/load_data_for_complexity.hcpp: made filenames pass by const refer…
andrewdavidsmith Oct 18, 2024
744b7cb
src/lc_extrap.cpp: removing c_str
andrewdavidsmith Oct 18, 2024
ef0f47e
src/gc_extrap.cpp: removing unused verbose arg to load_coverage_count…
andrewdavidsmith Oct 18, 2024
a04135f
src/bound_pop.cpp: removing unused verbose arg to quadrature rules fu…
andrewdavidsmith Oct 18, 2024
dc9d4f8
src/bamxx: Adding bamxx submodule
andrewdavidsmith Oct 18, 2024
cc115f6
Makefile.am: removing the to-mr target and adding bamxx and src/bam_r…
andrewdavidsmith Oct 18, 2024
350c990
src/load_data_for_complexity.hcpp: Updating the function to load coun…
andrewdavidsmith Oct 18, 2024
118a092
Adding back functionality to work with BAM in paired-end mode now usi…
andrewdavidsmith Oct 18, 2024
a0bc9b3
src/common.hcpp: adding these files
andrewdavidsmith Oct 18, 2024
5c1483a
src/bam_record_utils.hcpp: adding these source file
andrewdavidsmith Oct 18, 2024
b6aaa24
src/dnmt_error.hpp: adding this file because bam_record_utils.cpp nee…
andrewdavidsmith Oct 18, 2024
d3454eb
Formatting with clang-format and linting with cpplint
andrewdavidsmith Oct 18, 2024
05c2081
src/load_data_for_complexity.hpp: adding a function to load coverage …
andrewdavidsmith Oct 19, 2024
90148c2
src/load_data_for_complexity.cpp: adding structs to gather data toget…
andrewdavidsmith Oct 19, 2024
47cd233
src/gc_extrap.cpp: added functionality to do genome coverage from BAM…
andrewdavidsmith Oct 19, 2024
3245e62
Adding threads for functions that read BAM input
andrewdavidsmith Oct 19, 2024
c72b53f
src/load_data_for_complexity.cpp: factoring out sorted order check on…
andrewdavidsmith Oct 19, 2024
0a94079
src/load_data_for_complexity.cpp: linting with cpplint
andrewdavidsmith Oct 19, 2024
251d39f
src/load_data_for_complexity.cpp: fixing a bug in checking whether a …
andrewdavidsmith Oct 19, 2024
2b21984
src/load_data_for_complexity.cpp: another bugfix related to checking …
andrewdavidsmith Oct 19, 2024
6562e4a
src/load_data_for_complexity.cpp: fixing a bug in checking sorted ord…
andrewdavidsmith Oct 19, 2024
7b38e63
src/smithlab_cpp: updating submodule
andrewdavidsmith Oct 19, 2024
335ecc9
src/load_data_for_complexity.cpp: formatting and comments
andrewdavidsmith Oct 19, 2024
197c9e5
src/lc_extrap.cpp: adding code to format the histogram and write it t…
andrewdavidsmith Oct 19, 2024
c063d4a
src/common.hpp: adding the report_histogram to the common sources
andrewdavidsmith Oct 19, 2024
8cc2b43
src/load_data_for_complexity.cpp: fixing a bug in setting endpoints o…
andrewdavidsmith Oct 19, 2024
87082db
src/c_curve.cpp: adding the ability to output the counts histogram
andrewdavidsmith Oct 19, 2024
ce52e2b
src/gc_extrap.cpp: adding the ability to output the counts histogram
andrewdavidsmith Oct 19, 2024
99edc6b
src/lc_extrap.cpp: moving the report_histogram function to common
andrewdavidsmith Oct 19, 2024
094584a
src/load_data_for_complexity.cpp: fixed the priority queue which was …
andrewdavidsmith Oct 19, 2024
d15c897
src/load_data_for_complexity.cpp: removing some code that was aimed a…
andrewdavidsmith Oct 19, 2024
8598eaf
src/lc_extrap.cpp: merging option to report the 'about' information w…
andrewdavidsmith Oct 19, 2024
4761cc0
src/gc_extrap.cpp: merging option to report the 'about' information w…
andrewdavidsmith Oct 19, 2024
96714f9
src/bound_pop.cpp: providing option to report histogram to a file
andrewdavidsmith Oct 19, 2024
c62b649
src/pop_size.cpp: providing option to report histogram to a file
andrewdavidsmith Oct 19, 2024
5976618
src/load_data_for_complexity.cpp: satsifying cpplint
andrewdavidsmith Oct 19, 2024
ea1ee85
src/to-mr.cpp: removing this file as its only remaining functionality…
andrewdavidsmith Oct 20, 2024
539bc81
src/moment_sequence.cpp: fixing a var shadowing earlier var, adding c…
andrewdavidsmith Oct 20, 2024
ef0dc93
src/moment_sequence.cpp: removing the ACCEPT_HANKEL variable because …
andrewdavidsmith Oct 20, 2024
fd8fdd2
src/continued_fraction.hpp: removing the return_degree function as it…
andrewdavidsmith Oct 20, 2024
6b42ed7
Collapsing consecutive verbose conditions and factoring a big chunk o…
andrewdavidsmith Oct 20, 2024
eda26a5
.cppcheck_suppress: adding a config file for cppcheck
andrewdavidsmith Oct 20, 2024
7c9f9c7
src/continued_fraction.hcpp: removing an unused function
andrewdavidsmith Oct 20, 2024
0f896af
src/bam_record_utils.hpp: fixing the use of bool values in less-than …
andrewdavidsmith Oct 20, 2024
519239d
src/bam_record_utils.cpp: fixing some issues from cppcheck including …
andrewdavidsmith Oct 20, 2024
6b4c49b
src/load_data_for_complexity.cpp: removing some unused variables
andrewdavidsmith Oct 20, 2024
12c73b5
.github/workflows/cpplint.yml: removing the step of checking version
andrewdavidsmith Oct 20, 2024
e1dee37
.cppcheck_suppress: adding newline before eof
andrewdavidsmith Oct 20, 2024
afd38e7
cppcheck.yml: adding workflow for cppcheck
andrewdavidsmith Oct 20, 2024
402a67f
only writing histograms to files and this is separate from verbose
andrewdavidsmith Oct 20, 2024
d35eaf4
Removing the unused srand with pid and time because it was never used…
andrewdavidsmith Oct 20, 2024
c1005a5
clang-format
andrewdavidsmith Oct 20, 2024
e4cc220
.github/workflows/cppcheck.yml: trying to find cppcheck
andrewdavidsmith Oct 20, 2024
dbcf158
.github/workflows/cppcheck.yml: found cppcheck
andrewdavidsmith Oct 20, 2024
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
23 changes: 23 additions & 0 deletions .cppcheck_suppress
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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.

missingIncludeSystem
constVariablePointer
checkersReport
unusedFunction:src/bam_record_utils.hpp
unusedFunction:src/bam_record_utils.cpp
*:src/smithlab_cpp*
unusedStructMember:src/*.hpp
54 changes: 54 additions & 0 deletions .github/workflows/cppcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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.

name: Linting with cppcheck

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:

jobs:
cppcheck:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.12"]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Python setup ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install cppcheck
run: |
conda install -c conda-forge cppcheck

- name: Run cppcheck
run: |
${CONDA}/bin/cppcheck \
--std=c++17 \
--enable=all \
--check-level=exhaustive \
--suppressions-list=.cppcheck_suppress \
-I src/smithlab_cpp \
$(git ls-files '*.*pp')
3 changes: 0 additions & 3 deletions .github/workflows/cpplint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ jobs:
python -m pip install --upgrade pip
pip install cpplint

- name: Check cpplint version
run: cpplint --version

- name: Run cpplint
run: |
cpplint --quiet --repository=. $(git ls-files '*.*pp')
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "src/smithlab_cpp"]
path = src/smithlab_cpp
url = ../smithlab_cpp.git
[submodule "src/bamxx"]
path = src/bamxx
url = ../bamxx.git
11 changes: 5 additions & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ 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
AM_CPPFLAGS = -I $(top_srcdir)/src/smithlab_cpp -I $(top_srcdir)/src/bamxx
AM_CPPFLAGS += -Wall -Wextra -Wpedantic -Wno-unknown-attributes

CXXFLAGS = -O2 # default has optimization on
CXXFLAGS = -O2 -DNDEBUG # default w/ optimization; careful for math

EXTRA_DIST = \
README.md \
Expand All @@ -48,7 +48,6 @@ LDADD = src/smithlab_cpp/libsmithlab_cpp.a

bin_PROGRAMS = preseq
if ENABLE_HTS
bin_PROGRAMS += to-mr
AM_CPPFLAGS += -DHAVE_HTSLIB
endif

Expand All @@ -64,14 +63,14 @@ preseq_SOURCES = \
src/lc_extrap.cpp \
src/bound_pop.hpp \
src/bound_pop.cpp \
src/bamxx/bamxx.hpp \
src/pop_size.hpp \
src/pop_size.cpp \
src/continued_fraction.hpp \
src/continued_fraction.cpp \
src/bam_record_utils.hpp \
src/bam_record_utils.cpp \
src/load_data_for_complexity.hpp \
src/load_data_for_complexity.cpp \
src/moment_sequence.hpp \
src/moment_sequence.cpp

to_mr_SOURCES = \
src/to-mr.cpp
Loading