Skip to content
Commits on Source (3)
......@@ -95,10 +95,10 @@ ENDIF(NO_DEP_CHECK)
# Packager
SET(CPACK_PACKAGE_NAME "libbpp-phyl")
SET(CPACK_PACKAGE_VENDOR "Bio++ Development Team")
SET(CPACK_PACKAGE_VERSION "2.4.0")
SET(CPACK_PACKAGE_VERSION "2.4.1")
SET(CPACK_PACKAGE_VERSION_MAJOR "2")
SET(CPACK_PACKAGE_VERSION_MINOR "4")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(CPACK_PACKAGE_VERSION_PATCH "1")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Bio++ Phylogenetics library")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING.txt")
SET(CPACK_RESOURCE_FILE_AUTHORS "${CMAKE_SOURCE_DIR}/AUTHORS.txt")
......
......@@ -38,7 +38,7 @@ PROJECT_NAME = bpp-phyl
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 2.4.0
PROJECT_NUMBER = 2.4.1
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
......
......@@ -3,7 +3,7 @@
URL: https://github.com/BioPP/bpp-phyl
Name: bpp-phyl
Version: 1.4.0
Version: 2.4.1
Release: 1%{?dist}
License: CECILL-2.0
Vendor: The Bio++ Project
......@@ -85,6 +85,8 @@ rm -rf $RPM_BUILD_ROOT
%{_prefix}/include/*
%changelog
* Mon Aug 13 2018 Julien Dutheil <julien.dutheil@univ-montp2.fr> 2.4.1-1
- Compatibility update gcc8
* Mon Mar 12 2018 Julien Dutheil <julien.dutheil@univ-montp2.fr> 2.4.0-1
- Increased interface number
- Removed dynamic exceptions specifications.
......
libbpp-phyl (2.4.1-1) UNRELEASED; urgency=medium
* New upstream update.
* Ref: #906478
-- Julien Dutheil <julien.dutheil@univ-montp2.fr> Sun, 19 Aug 2018 21:36:23 +0200
libbpp-phyl (2.4.0-2) unstable; urgency=medium
[ Julien Dutheil ]
......
......@@ -7,7 +7,7 @@ Priority: optional
Build-Depends: debhelper (>= 11~),
cmake,
d-shlibs (>= 0.82),
libbpp-seq-dev (>= 2.4.0)
libbpp-seq-dev (>= 2.4.1)
Standards-Version: 4.1.4
Vcs-Browser: https://salsa.debian.org/med-team/libbpp-phyl
Vcs-Git: https://salsa.debian.org/med-team/libbpp-phyl.git
......@@ -18,7 +18,7 @@ Architecture: any
Section: libdevel
Depends: libbpp-phyl12 (= ${binary:Version}),
${misc:Depends},
libbpp-seq-dev (>= 2.4.0)
libbpp-seq-dev (>= 2.4.1)
Description: Bio++ Phylogenetic library development files
Bio++ is a set of C++ libraries for Bioinformatics, including sequence
analysis, phylogenetics, molecular evolution and population genetics.
......
This diff is collapsed.
......@@ -25,34 +25,3 @@ index b4cd485..c38a277 100644
throw Exception("Incorrect final value.");
}
@@ -89,14 +89,14 @@ int main() {
DiscreteDistribution* rdist = new GammaDiscreteRateDistribution(4, 1.0);
size_t nsites = 1000;
- unsigned int nrep = 20;
+ unsigned int nrep = 5;
size_t nmodels = modelSet->getNumberOfModels();
vector<double> thetas(nmodels);
vector<double> thetasEst1(nmodels);
vector<double> thetasEst2(nmodels);
for (size_t i = 0; i < nmodels; ++i) {
- double theta = RandomTools::giveRandomNumberBetweenZeroAndEntry(0.99) + 0.005;
+ double theta = RandomTools::giveRandomNumberBetweenZeroAndEntry(0.9) + 0.05;
cout << "Theta" << i << " set to " << theta << endl;
modelSet->setParameterValue("T92.theta_" + TextTools::toString(i + 1), theta);
thetas[i] = theta;
@@ -119,11 +119,11 @@ int main() {
tl2.initialize();
unsigned int c1 = OptimizationTools::optimizeNumericalParameters2(
- &tl, tl.getParameters(), 0,
+ &tl, tl.getSubstitutionModelParameters(), 0,
0.0001, 10000, messenger, profiler, false, false, 1, OptimizationTools::OPTIMIZATION_NEWTON);
unsigned int c2 = OptimizationTools::optimizeNumericalParameters2(
- &tl2, tl2.getParameters(), 0,
+ &tl2, tl2.getSubstitutionModelParameters(), 0,
0.0001, 10000, messenger, profiler, false, false, 1, OptimizationTools::OPTIMIZATION_NEWTON);
cout << c1 << ": " << tl.getValue() << "\t" << c2 << ": " << tl2.getValue() << endl;
......@@ -138,13 +138,14 @@ TransitionModel* BppOTransitionModelFormat::readTransitionModel(
}
delete nestedModel;
}
else
model.reset(BppOSubstitutionModelFormat::read(alphabet, modelDescription, data, parseArguments));
// update only for transition models
updateParameters_(model.get(), args);
if (parseArguments)
initialize_(*model, data);
}
else
model.reset(BppOSubstitutionModelFormat::read(alphabet, modelDescription, data, parseArguments));
return model.release();
}
......@@ -5,7 +5,7 @@
//
/*
Copyright or © or Copr. CNRS, (November 16, 2004)
Copyright or © or Copr. Bio++ Development Team, (November 16, 2004)
This software is a computer program whose purpose is to provide classes
for phylogenetic data analysis.
......@@ -170,7 +170,7 @@ class AbstractOTree:
write(tree, output);
output.close();
}
catch (IOException e)
catch (IOException& e)
{
std::stringstream ss ;
ss << e.what() <<"\nProblem writing tree to file "<< path <<"\n Is the file path correct and do \
......
......@@ -138,7 +138,7 @@ void DRASRTreeLikelihoodData::initLikelihoods(const Node* node, const SiteContai
{
seq = &sequences.getSequence(node->getName());
}
catch (SequenceNotFoundException snfe)
catch (SequenceNotFoundException& snfe)
{
throw SequenceNotFoundException("DRASRTreeLikelihoodData::initTreelikelihoods. Leaf name in tree not found in site conainer: ", (node->getName()));
}
......@@ -241,7 +241,7 @@ SitePatterns* DRASRTreeLikelihoodData::initLikelihoodsWithPatterns(const Node* n
{
seq = &subSequences->getSequence(node->getName());
}
catch (SequenceNotFoundException snfe)
catch (SequenceNotFoundException& snfe)
{
throw SequenceNotFoundException("HomogeneousTreeLikelihood::initTreelikelihoodsWithPatterns. Leaf name in tree not found in site conainer: ", (node->getName()));
}
......
......@@ -37,18 +37,22 @@
*/
#include "AbstractCodonAAFitnessSubstitutionModel.h"
#include <Bpp/Seq/Alphabet/AlphabetTools.h>
using namespace bpp;
using namespace std;
/****************************************************************************************/
AbstractCodonAAFitnessSubstitutionModel::AbstractCodonAAFitnessSubstitutionModel(FrequenciesSet* pfitset, const GeneticCode* pgencode, const string& prefix):
AbstractParameterAliasable(prefix), pfitset_(pfitset), pgencode_(pgencode), fitName_("")
AbstractParameterAliasable(prefix), pfitset_(pfitset), pgencode_(pgencode), fitName_(""), stateMap_(&pfitset->getStateMap())
{
if (pfitset_->getAlphabet()->getAlphabetType()!="Proteic")
if (!AlphabetTools::isProteicAlphabet(pfitset_->getAlphabet()))
throw Exception("AbstractCodonAAFitnessSubstitutionModel::AbstractCodonAAFitnessSubstitutionModel need Proteic Fitness.");
fitName_ = "fit_" + pfitset_->getNamespace();
pfitset_->setNamespace(prefix + fitName_);
stateMap_=&pfitset_->getStateMap();
addParameters_(pfitset_->getParameters());
}
......
......@@ -90,7 +90,6 @@ namespace bpp
* @param pmodel shared_ptr to an amino_acid generator
* @param pgencode the genetic code
* @param prefix the Namespace
* @param statemap the statemap
* @param paramSynRate is true iff synonymous rate is parameterised
* (default=false).
*/
......
......@@ -93,7 +93,6 @@ namespace bpp
*
* @param pgencode the genetic code
* @param prefix the Namespace
* @param statemap the statemap
*/
AbstractCodonBGCSubstitutionModel(
const GeneticCode* pgencode,
......
......@@ -269,7 +269,7 @@ public:
{
try
{
return dynamic_cast<const SubstitutionModel*>(getModel(i));
return &dynamic_cast<const SubstitutionModel&>(*getModel(i));
}
catch (std::bad_cast& bc)
{
......@@ -282,7 +282,7 @@ public:
{
try
{
return dynamic_cast<SubstitutionModel*>(getModel(i));
return &dynamic_cast<SubstitutionModel&>(*getModel(i));
}
catch (std::bad_cast& bc)
{
......
......@@ -241,7 +241,7 @@ TreeTemplateTools::Element TreeTemplateTools::getElement(const string& elt)
}
}
}
catch (exception e)
catch (exception& e)
{
throw IOException("Bad tree description: " + elt);
}
......
......@@ -89,14 +89,14 @@ int main() {
DiscreteDistribution* rdist = new GammaDiscreteRateDistribution(4, 1.0);
size_t nsites = 1000;
unsigned int nrep = 20;
unsigned int nrep = 3;
size_t nmodels = modelSet->getNumberOfModels();
vector<double> thetas(nmodels);
vector<double> thetasEst1(nmodels);
vector<double> thetasEst2(nmodels);
for (size_t i = 0; i < nmodels; ++i) {
double theta = RandomTools::giveRandomNumberBetweenZeroAndEntry(0.99) + 0.005;
double theta = RandomTools::giveRandomNumberBetweenZeroAndEntry(0.9) + 0.05;
cout << "Theta" << i << " set to " << theta << endl;
modelSet->setParameterValue("T92.theta_" + TextTools::toString(i + 1), theta);
thetas[i] = theta;
......@@ -119,11 +119,11 @@ int main() {
tl2.initialize();
unsigned int c1 = OptimizationTools::optimizeNumericalParameters2(
&tl, tl.getParameters(), 0,
&tl, tl.getSubstitutionModelParameters(), 0,
0.0001, 10000, messenger, profiler, false, false, 1, OptimizationTools::OPTIMIZATION_NEWTON);
unsigned int c2 = OptimizationTools::optimizeNumericalParameters2(
&tl2, tl2.getParameters(), 0,
&tl2, tl2.getSubstitutionModelParameters(), 0,
0.0001, 10000, messenger, profiler, false, false, 1, OptimizationTools::OPTIMIZATION_NEWTON);
cout << c1 << ": " << tl.getValue() << "\t" << c2 << ": " << tl2.getValue() << endl;
......