Skip to content

Commit

Permalink
Merge branch 'percolator:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
percolator authored Mar 11, 2024
2 parents 88903ed + f56e1ed commit fa3328a
Show file tree
Hide file tree
Showing 39 changed files with 2,209 additions and 1,931 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: cd ../my_build/percolator-test && make install && make test-install

build-osx:
runs-on: macos-11
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: create_dirs
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/triggered_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: test
run: cd ../my_build/percolator && sudo make install && make test ARGS="-V"
- name: zip raw binary
run: zip -j ../my_rel/percolator-noxml.zip ../my_build/percolator-noxml/src/percolator
run: zip -j ../my_rel/percolator-noxml-ubuntu-portable.zip ../my_build/percolator-noxml/src/percolator
- name: Upload packages
uses: actions/upload-artifact@v1
with:
Expand All @@ -35,15 +35,15 @@ jobs:
- name: test
run: cd ../my_build/percolator && make install && make test ARGS="-V"
- name: zip raw binary
run: zip -j ../my_rel/percolator-noxml.zip ../my_build/percolator-noxml/src/percolator
run: zip -j ../my_rel/percolator-noxml-linux-portable.zip ../my_build/percolator-noxml/src/percolator
- name: Upload packages
uses: actions/upload-artifact@v1
with:
name: centos-packages
path: ../my_rel

build-osx:
runs-on: macos-11
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: create_dirs
Expand All @@ -53,7 +53,7 @@ jobs:
- name: test
run: cd ../my_build/percolator && sudo make install && make test ARGS="-V"
- name: zip raw binary
run: zip ../my_rel/percolator-noxml.zip ../my_build/percolator-noxml/src/percolator
run: zip ../my_rel/percolator-noxml-osx-portable.zip ../my_build/percolator-noxml/src/percolator
- name: Upload packages
uses: actions/upload-artifact@v1
with:
Expand All @@ -77,7 +77,8 @@ jobs:
ECHO %base_dir%
CALL percolator\admin\builders\nativew64_build.bat -s %base_dir% -r %homedrive%%homepath%\my_rel -b %homedrive%%homepath%\my_build
- name: zip raw binary
run: TAR -czvf %homedrive%%homepath%\my_rel\percolator-noxml.tgz %homedrive%%homepath%\my_build\percolator-noxml\src\Release\percolator.exe
shell: pwsh
run: Compress-Archive -Path ${env:homedrive}${env:homepath}\my_build\percolator-noxml\src\Release\*.exe -Destination ${env:homedrive}${env:homepath}\my_rel\percolator-noxml-windows-portable.zip
- name: Upload packages
uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion CommonCMake.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ set(CMAKE_MODULE_PATH ${PERCOLATOR_SOURCE_DIR}/cmake)
# VERSION AND NAMESPACES
set(CPACK_PACKAGE_VERSION_MAJOR "3")
set(CPACK_PACKAGE_VERSION_MINOR "06")
set(CPACK_PACKAGE_VERSION_PATCH "1")
set(CPACK_PACKAGE_VERSION_PATCH "5")
set(PIN_VERSION_MAJOR "1")
set(PIN_VERSION_MINOR "3")
set(POUT_VERSION_MAJOR "1")
Expand Down
2 changes: 1 addition & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Percolator
[![https://github.com/percolator/percolator/actions?query=workflow%3A%22Build+and+release%22](https://github.com/percolator/percolator/workflows/Build%20and%20release/badge.svg)](https://github.com/percolator/percolator/actions?query=workflow%3A%22Build+and+release%22) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](code_of_conduct.md)
[![Build status](https://github.com/percolator/percolator/actions/workflows/build.yml/badge.svg)](https://github.com/percolator/percolator/actions/workflows/build.yml) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](code_of_conduct.md)

This repository holds the source code for percolator and format
converters software packages; a software for postprocessing of shotgun
Expand Down
102 changes: 54 additions & 48 deletions admin/builders/ubuntu64_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,38 @@
# managing input arguments

while getopts “s:b:r:t:” OPTION; do
case $OPTION in
s) src_dir=${OPTARG};;
t) branch=${OPTARG};;
r) release_dir=${OPTARG};;
b) build_dir=${OPTARG};;
\?) echo "Invalid option: -${OPTARG}" >&2;;
esac
case $OPTION in
s) src_dir=${OPTARG};;
t) branch=${OPTARG};;
r) release_dir=${OPTARG};;
b) build_dir=${OPTARG};;
\?) echo "Invalid option: -${OPTARG}" >&2;;
esac
done

sudo apt-get -y install gawk;
if [[ ! -z `echo -e "$(lsb_release -r)" | gawk '($2>="22.04"){print
$2}'` ]]; then
sudo apt-get -y install libcurl4-openssl-dev;
fi

if [[ -z ${build_dir} ]]; then
build_dir="$(mktemp -d --tmpdir ubuntu_build_XXXX)";
build_dir="$(mktemp -d --tmpdir ubuntu_build_XXXX)";
fi
if [[ -z ${src_dir} ]]; then
if [[ -n ${branch} ]]; then
sudo apt-get install git;
src_dir="$(mktemp -d --tmpdir ubuntu_build_XXXX)";
git clone --branch "$1" https://github.com/percolator/percolator.git "${src_dir}/percolator";
else
src_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../../../
fi
if [[ -n ${branch} ]]; then
sudo apt-get install git;
src_dir="$(mktemp -d --tmpdir ubuntu_build_XXXX)";
git clone --branch "$1" https://github.com/percolator/percolator.git "${src_dir}/percolator";
else
src_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../../../
fi
fi
if [[ -z ${release_dir} ]]; then
release_dir=${HOME}/release
if [ ! -d "${release_dir}" ]; then
mkdir ${release_dir}
fi
release_dir=${HOME}/release
if [ ! -d "${release_dir}" ]; then
mkdir ${release_dir}
fi
fi

echo "The Builder $0 is building the Percolator packages with src=${src_dir} an\
Expand All @@ -41,9 +47,9 @@ echo "Checking necessary packages for building percolator...";
# Do not apt-upgrade if this is a travis-ci job
sudo apt-get update;
if [ -z "$TRAVIS" ] && [ -z "$CI" ]; then
# trap 'echo "EXIT (rc: $?)" && exit 1' ERR
sudo apt-get upgrade;
sudo apt-get -y install g++ make cmake rpm fakeroot;
# trap 'echo "EXIT (rc: $?)" && exit 1' ERR
sudo apt-get upgrade;
sudo apt-get -y install g++ make cmake rpm fakeroot;
fi

cd ${src_dir}
Expand All @@ -56,32 +62,32 @@ cd ${build_dir}

# download and patch xsd
if [[ $(lsb_release -a) == *"14.04"* ]]; then
if [ ! -d ${ubuntu_xsd} ]; then
echo "Installing XSD"
wget --quiet ${ubuntu_xsd_url}
tar xjf ${ubuntu_xsd}.tar.bz2
sed -i 's/setg/this->setg/g' ${ubuntu_xsd}/libxsd/xsd/cxx/zc-istream.txx
sed -i 's/ push_back/ this->push_back/g' ${ubuntu_xsd}/libxsd/xsd/cxx/tree/parsing.txx
sed -i 's/ push_back/ this->push_back/g' ${ubuntu_xsd}/libxsd/xsd/cxx/tree/stream-extraction.hxx
fi
if [ ! -d ${ubuntu_xsd} ]; then
echo "Installing XSD"
wget --quiet ${ubuntu_xsd_url}
tar xjf ${ubuntu_xsd}.tar.bz2
sed -i 's/setg/this->setg/g' ${ubuntu_xsd}/libxsd/xsd/cxx/zc-istream.txx
sed -i 's/ push_back/ this->push_back/g' ${ubuntu_xsd}/libxsd/xsd/cxx/tree/parsing.txx
sed -i 's/ push_back/ this->push_back/g' ${ubuntu_xsd}/libxsd/xsd/cxx/tree/stream-extraction.hxx
fi
else
sudo apt-get -y install xsdcxx;
sudo apt-get -y install xsdcxx;
fi

# issue with XercesC in Ubuntu 16.04: https://github.com/percolator/percolator/issues/188
if [[ ! -z `echo -e "$(lsb_release -r)" | gawk '($2>="18.04"){print $2}'` ]]; then
if [[ ! -d ${ubuntu_xerces}/lib ]]; then
echo "Installing XercesC"
# download, compile and link xerces
wget --no-check-certificate --quiet ${ubuntu_xerces_url}
tar xzf ${ubuntu_xerces}.tar.gz
cd ${ubuntu_xerces}/
./configure --prefix=${build_dir}/${ubuntu_xerces} --disable-netaccessor-curl --disable-transcoder-icu > ../xercesc_config.log 2>&1
make -j 4 > ../xercesc_make.log 2>&1
make install > ../xercesc_install.log 2>&1
fi
if [[ ! -d ${ubuntu_xerces}/lib ]]; then
echo "Installing XercesC"
# download, compile and link xerces
wget --no-check-certificate --quiet ${ubuntu_xerces_url}
tar xzf ${ubuntu_xerces}.tar.gz
cd ${ubuntu_xerces}/
./configure --prefix=${build_dir}/${ubuntu_xerces} --disable-netaccessor-curl --disable-transcoder-icu > ../xercesc_config.log 2>&1
make -j 4 > ../xercesc_make.log 2>&1
make install > ../xercesc_install.log 2>&1
fi
else
sudo apt-get -y install libxerces-c-dev
sudo apt-get -y install libxerces-c-dev
fi

# end of section to remove
Expand All @@ -95,8 +101,8 @@ mkdir -p $build_dir/percolator-noxml $build_dir/percolator $build_dir/converters
#-----cmake-----
cd $build_dir/percolator-noxml;
echo "cmake percolator-noxml.....";
(set -x;
cmake -DTARGET_ARCH=amd64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DXML_SUPPORT=OFF $src_dir/percolator;
(set -x;
cmake -DTARGET_ARCH=amd64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DXML_SUPPORT=OFF $src_dir/percolator;
)
#-----make------
echo "make percolator (this will take few minutes).....";
Expand All @@ -106,8 +112,8 @@ make -j 4 package;
#-----cmake-----
cd $build_dir/percolator;
echo "cmake percolator.....";
(set -x;
cmake -DTARGET_ARCH=amd64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DGOOGLE_TEST=1 -DCMAKE_PREFIX_PATH="${build_dir}/${ubuntu_xerces}/;${build_dir}/${ubuntu_xsd}/" -DXML_SUPPORT=ON $src_dir/percolator;
(set -x;
cmake -DTARGET_ARCH=amd64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DGOOGLE_TEST=1 -DCMAKE_PREFIX_PATH="${build_dir}/${ubuntu_xerces}/;${build_dir}/${ubuntu_xsd}/" -DXML_SUPPORT=ON $src_dir/percolator;
)
#-----make------
echo "make percolator (this will take few minutes).....";
Expand All @@ -118,8 +124,8 @@ make -j 4 package;
cd $build_dir/converters
#-----cmake-----
echo "cmake converters.....";
(set -x;
cmake -DTARGET_ARCH=amd64 -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="${build_dir}/${ubuntu_xerces}/;${build_dir}/${ubuntu_xsd}/" -DSERIALIZE="TokyoCabinet" $src_dir/percolator/src/converters;
(set -x;
cmake -DTARGET_ARCH=amd64 -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="${build_dir}/${ubuntu_xerces}/;${build_dir}/${ubuntu_xsd}/" -DSERIALIZE="TokyoCabinet" $src_dir/percolator/src/converters;
)
#-----make------
echo "make converters (this will take few minutes).....";
Expand Down
4 changes: 2 additions & 2 deletions docs/ReleaseChecklist.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Creating a new release version

1. change version number in CommonCMake.txt
2. create binaries for all platforms with vagrant and fix build bugs
3. verify that all system tests pass
2. create binaries for all platforms with GitHub Actions and fix build bugs
3. verify that all system (from the build directory: `make test-install`) and unit tests (`make CTEST_OUTPUT_ON_FAILURE=1 test`) pass
4. verify that crux-toolkit cucumber tests pass
5. add information to changelog on master
6. commit and push to master on github
Expand Down
2 changes: 2 additions & 0 deletions src/BaseSpline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ double BaseSpline::alphaLinearSearchBA(double min_p,
}

void BaseSpline::initiateQR() {
// NOTE: at least 4 data points are needed to construct a quadratic spline!
assert(x.size() >= 4);
int n = static_cast<int>(x.size());
dx.resize(n-1);
for (std::size_t ix = 0; static_cast<int>(ix) < n - 1; ix++) {
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ if(XML_SUPPORT)
add_library(perclibrary STATIC ${xsdfiles_in} ${xsdfiles_out} parser.cxx serializer.cxx BaseSpline.cpp MassHandler.cpp
PSMDescription.cpp ResultHolder.cpp
XMLInterface.cpp SetHandler.cpp StdvNormalizer.cpp svm.cpp Caller.cpp CrossValidation.cpp Enzyme.cpp Globals.cpp NoNormalizer.cpp Normalizer.cpp
SanityCheck.cpp UniNormalizer.cpp DataSet.cpp FeatureNames.cpp LogisticRegression.cpp Option.cpp PosteriorEstimator.cpp
SanityCheck.cpp UniNormalizer.cpp DataSet.cpp TabFileValidator.cpp FeatureNames.cpp LogisticRegression.cpp Option.cpp PosteriorEstimator.cpp
ProteinProbEstimator.cpp ProteinFDRestimator.cpp Scores.cpp PseudoRandom.cpp SqtSanityCheck.cpp ssl.cpp PackedVector.cpp
PackedMatrix.cpp Matrix.cpp Logger.cpp MyException.cpp FidoInterface.cpp ProteinScoreHolder.cpp PickedProteinInterface.cpp FeatureMemoryPool.cpp GoogleAnalytics.cpp Timer.cpp TmpDir.cpp ValidateTabFile.cpp)
else(XML_SUPPORT)
add_library(perclibrary STATIC BaseSpline.cpp MassHandler.cpp ResultHolder.cpp PSMDescription.cpp
XMLInterface.cpp SetHandler.cpp StdvNormalizer.cpp svm.cpp Caller.cpp CrossValidation.cpp Enzyme.cpp Globals.cpp NoNormalizer.cpp Normalizer.cpp
SanityCheck.cpp UniNormalizer.cpp DataSet.cpp FeatureNames.cpp LogisticRegression.cpp Option.cpp PosteriorEstimator.cpp
SanityCheck.cpp UniNormalizer.cpp DataSet.cpp TabFileValidator.cpp FeatureNames.cpp LogisticRegression.cpp Option.cpp PosteriorEstimator.cpp
ProteinProbEstimator.cpp ProteinFDRestimator.cpp Scores.cpp PseudoRandom.cpp SqtSanityCheck.cpp ssl.cpp PackedVector.cpp
PackedMatrix.cpp Matrix.cpp Logger.cpp MyException.cpp FidoInterface.cpp ProteinScoreHolder.cpp PickedProteinInterface.cpp FeatureMemoryPool.cpp GoogleAnalytics.cpp Timer.cpp TmpDir.cpp ValidateTabFile.cpp)
endif(XML_SUPPORT)
Expand Down
Loading

0 comments on commit fa3328a

Please sign in to comment.