From eabcd3dcb9caa1fcc17acd43df2ded4170ed1449 Mon Sep 17 00:00:00 2001 From: David Seifert Date: Thu, 25 Apr 2024 11:18:47 +0200 Subject: [PATCH 1/2] Allow PYTHON from environment * Distros need to be able to specify exactly which python interpreter to run tests under. --- test/bigchroms/test-bigchroms.sh | 2 +- test/fisher/cmp.sh | 2 +- test/genomecov/test-genomecov.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/bigchroms/test-bigchroms.sh b/test/bigchroms/test-bigchroms.sh index eac99465e..bdce20e71 100644 --- a/test/bigchroms/test-bigchroms.sh +++ b/test/bigchroms/test-bigchroms.sh @@ -28,7 +28,7 @@ check obs abig.bed rm obs if [[ "$BT_NO_BIG_FILES" != "" ]]; then -python make-big-chrom.py +${PYTHON:-python} make-big-chrom.py echo -e " bigchroms.t03...big get fasta \c" $BT getfasta -fi bigx.fasta -bed bigx.bed | tail -1 > obs diff --git a/test/fisher/cmp.sh b/test/fisher/cmp.sh index 5683e4274..e33e9af96 100644 --- a/test/fisher/cmp.sh +++ b/test/fisher/cmp.sh @@ -3,7 +3,7 @@ set -eo pipefail echo "fisher,shuffled" for i in $(seq 1000); do - fisher=$(python ./sim.py | tail -1 | cut -f 2) + fisher=$(${PYTHON:-python} ./sim.py | tail -1 | cut -f 2) shuffle=$(bash shuf.sh) echo "$fisher,$shuffle" done diff --git a/test/genomecov/test-genomecov.sh b/test/genomecov/test-genomecov.sh index 5a269f211..93d0c534e 100755 --- a/test/genomecov/test-genomecov.sh +++ b/test/genomecov/test-genomecov.sh @@ -288,7 +288,7 @@ CRAM_REFERENCE=test_ref.fa $BT genomecov -ibam empty.cram > obs check obs exp rm obs exp -python mk-deep.py > deep.sam +${PYTHON:-python} mk-deep.py > deep.sam echo -e " genomecov.t18...\c" echo "c1 1 1000000" > exp $BT genomecov -d -ibam deep.sam | head -1 > obs From 3fbf2ddc8ebf0fc1bd492d14a6046aadd59ecadb Mon Sep 17 00:00:00 2001 From: David Seifert Date: Thu, 25 Apr 2024 11:18:48 +0200 Subject: [PATCH 2/2] Add missing `stdint.h` includes * Musl is a lot stricter with transitive includes: Bug: https://bugs.gentoo.org/907971 --- src/bamToBed/bamToBed.cpp | 1 + src/clusterBed/clusterBed.cpp | 2 ++ src/pairToBed/pairToBed.h | 1 + src/randomBed/randomBed.h | 1 + src/summaryFile/summaryFile.h | 2 ++ src/utils/BamTools/include/BamAlignment.mapping.hpp | 1 + src/utils/BamTools/include/api/BamAux.h | 1 + .../FileRecordTools/FileReaders/SingleLineDelimTextFileReader.h | 1 + src/utils/FileRecordTools/Records/BamRecord.cpp | 2 ++ src/utils/GenomeFile/GenomeFile.h | 1 + src/utils/GenomeFile/NewGenomeFile.h | 1 + src/utils/bedFilePE/bedFilePE.h | 1 + src/utils/general/ParseTools.cpp | 2 +- src/utils/lineFileUtilities/lineFileUtilities.h | 1 + src/utils/sequenceUtilities/sequenceUtils.h | 1 + src/windowMaker/windowMaker.h | 2 ++ src/windowMaker/windowMakerMain.cpp | 2 ++ 17 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/bamToBed/bamToBed.cpp b/src/bamToBed/bamToBed.cpp index 2687d21cf..f5174870f 100644 --- a/src/bamToBed/bamToBed.cpp +++ b/src/bamToBed/bamToBed.cpp @@ -22,6 +22,7 @@ using namespace BamTools; #include #include #include +#include using namespace std; diff --git a/src/clusterBed/clusterBed.cpp b/src/clusterBed/clusterBed.cpp index 18f4a14dd..42e4b6173 100644 --- a/src/clusterBed/clusterBed.cpp +++ b/src/clusterBed/clusterBed.cpp @@ -12,6 +12,8 @@ #include "lineFileUtilities.h" #include "clusterBed.h" +#include + // = Constructor = BedCluster::BedCluster(string &bedFile, int maxDistance, diff --git a/src/pairToBed/pairToBed.h b/src/pairToBed/pairToBed.h index 20ceb4268..b425a1a99 100644 --- a/src/pairToBed/pairToBed.h +++ b/src/pairToBed/pairToBed.h @@ -22,6 +22,7 @@ using namespace BamTools; #include #include #include +#include using namespace std; diff --git a/src/randomBed/randomBed.h b/src/randomBed/randomBed.h index 78636e5c2..f2e5fdcf2 100644 --- a/src/randomBed/randomBed.h +++ b/src/randomBed/randomBed.h @@ -22,6 +22,7 @@ #include #include #include // for binary search +#include using namespace std; const int MAX_TRIES = 1000000; diff --git a/src/summaryFile/summaryFile.h b/src/summaryFile/summaryFile.h index 3693c9458..d0394e895 100644 --- a/src/summaryFile/summaryFile.h +++ b/src/summaryFile/summaryFile.h @@ -12,6 +12,8 @@ #include "ToolBase.h" #include "ContextSummary.h" +#include + struct Interval { CHRPOS start; CHRPOS end; diff --git a/src/utils/BamTools/include/BamAlignment.mapping.hpp b/src/utils/BamTools/include/BamAlignment.mapping.hpp index 1ff4ece46..4c6ec9be7 100644 --- a/src/utils/BamTools/include/BamAlignment.mapping.hpp +++ b/src/utils/BamTools/include/BamAlignment.mapping.hpp @@ -1,3 +1,4 @@ +#include struct _RefID_t { operator int32_t() const {return (int32_t)(_ptr()->core.tid);} diff --git a/src/utils/BamTools/include/api/BamAux.h b/src/utils/BamTools/include/api/BamAux.h index af1b83d6a..d4397c759 100644 --- a/src/utils/BamTools/include/api/BamAux.h +++ b/src/utils/BamTools/include/api/BamAux.h @@ -1,4 +1,5 @@ #include +#include #ifndef BAMAUX_H #define BAMAUX_H diff --git a/src/utils/FileRecordTools/FileReaders/SingleLineDelimTextFileReader.h b/src/utils/FileRecordTools/FileReaders/SingleLineDelimTextFileReader.h index 91962cca9..d4bcdabce 100644 --- a/src/utils/FileRecordTools/FileReaders/SingleLineDelimTextFileReader.h +++ b/src/utils/FileRecordTools/FileReaders/SingleLineDelimTextFileReader.h @@ -9,6 +9,7 @@ #define SINGLELINETEXTFILEREADER_H_ #include +#include #include "FileReader.h" #include "string.h" #include "lineFileUtilities.h" diff --git a/src/utils/FileRecordTools/Records/BamRecord.cpp b/src/utils/FileRecordTools/Records/BamRecord.cpp index 8ec692151..095c83a3d 100644 --- a/src/utils/FileRecordTools/Records/BamRecord.cpp +++ b/src/utils/FileRecordTools/Records/BamRecord.cpp @@ -10,6 +10,8 @@ #include "BamFileReader.h" #include "RecordKeyVector.h" +#include + BamRecord::BamRecord() : _bamChromId(-1) { diff --git a/src/utils/GenomeFile/GenomeFile.h b/src/utils/GenomeFile/GenomeFile.h index 4c9118d2f..38d0d1587 100644 --- a/src/utils/GenomeFile/GenomeFile.h +++ b/src/utils/GenomeFile/GenomeFile.h @@ -19,6 +19,7 @@ #include #include #include +#include #include // for bsearch lower_bound() #include "api/BamReader.h" #include "api/BamAux.h" diff --git a/src/utils/GenomeFile/NewGenomeFile.h b/src/utils/GenomeFile/NewGenomeFile.h index c1aaedf8a..3c164220e 100644 --- a/src/utils/GenomeFile/NewGenomeFile.h +++ b/src/utils/GenomeFile/NewGenomeFile.h @@ -14,6 +14,7 @@ #define NEW_GENOMEFILE_H #include // for bsearch lower_bound() +#include #include "BedtoolsTypes.h" diff --git a/src/utils/bedFilePE/bedFilePE.h b/src/utils/bedFilePE/bedFilePE.h index 4c4087cf9..72ef2e925 100644 --- a/src/utils/bedFilePE/bedFilePE.h +++ b/src/utils/bedFilePE/bedFilePE.h @@ -8,6 +8,7 @@ #include #include #include +#include #include #include "bedFile.h" #include "lineFileUtilities.h" diff --git a/src/utils/general/ParseTools.cpp b/src/utils/general/ParseTools.cpp index ad43bcd9d..8769851fd 100644 --- a/src/utils/general/ParseTools.cpp +++ b/src/utils/general/ParseTools.cpp @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/utils/lineFileUtilities/lineFileUtilities.h b/src/utils/lineFileUtilities/lineFileUtilities.h index 103b293ca..725a595f5 100644 --- a/src/utils/lineFileUtilities/lineFileUtilities.h +++ b/src/utils/lineFileUtilities/lineFileUtilities.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/src/utils/sequenceUtilities/sequenceUtils.h b/src/utils/sequenceUtilities/sequenceUtils.h index 0e72a038f..67753fcfe 100644 --- a/src/utils/sequenceUtilities/sequenceUtils.h +++ b/src/utils/sequenceUtilities/sequenceUtils.h @@ -4,6 +4,7 @@ #include #include #include +#include using namespace std; diff --git a/src/windowMaker/windowMaker.h b/src/windowMaker/windowMaker.h index c823958c7..eab7b7bb1 100644 --- a/src/windowMaker/windowMaker.h +++ b/src/windowMaker/windowMaker.h @@ -12,6 +12,8 @@ Licenced under the GNU General Public License 2.0 license. #include "NewGenomeFile.h" #include "bedFile.h" +#include + using namespace std; diff --git a/src/windowMaker/windowMakerMain.cpp b/src/windowMaker/windowMakerMain.cpp index ca36f27bb..3956915b5 100644 --- a/src/windowMaker/windowMakerMain.cpp +++ b/src/windowMaker/windowMakerMain.cpp @@ -12,6 +12,8 @@ Licenced under the GNU General Public License 2.0 license. #include "windowMaker.h" #include "version.h" +#include + using namespace std; // define our program name