msasim 25.9.3__tar.gz → 25.9.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {msasim-25.9.3/msasim.egg-info → msasim-25.9.5}/PKG-INFO +1 -1
- {msasim-25.9.3 → msasim-25.9.5/msasim.egg-info}/PKG-INFO +1 -1
- {msasim-25.9.3 → msasim-25.9.5}/setup.py +1 -4
- {msasim-25.9.3 → msasim-25.9.5}/src/modelFactory.cpp +22 -18
- {msasim-25.9.3 → msasim-25.9.5}/src/rateMatrixSim.cpp +2 -2
- {msasim-25.9.3 → msasim-25.9.5}/LICENSE +0 -0
- {msasim-25.9.3 → msasim-25.9.5}/README.md +0 -0
- {msasim-25.9.3 → msasim-25.9.5}/_Sailfish/__init__.pyi +0 -0
- {msasim-25.9.3 → msasim-25.9.5}/_Sailfish/py.typed +0 -0
- {msasim-25.9.3 → msasim-25.9.5}/msasim/__init__.py +0 -0
- {msasim-25.9.3 → msasim-25.9.5}/msasim/sailfish.py +0 -0
- {msasim-25.9.3 → msasim-25.9.5}/msasim.egg-info/SOURCES.txt +0 -0
- {msasim-25.9.3 → msasim-25.9.5}/msasim.egg-info/dependency_links.txt +0 -0
- {msasim-25.9.3 → msasim-25.9.5}/msasim.egg-info/not-zip-safe +0 -0
- {msasim-25.9.3 → msasim-25.9.5}/msasim.egg-info/requires.txt +0 -0
- {msasim-25.9.3 → msasim-25.9.5}/msasim.egg-info/top_level.txt +0 -0
- {msasim-25.9.3 → msasim-25.9.5}/pyproject.toml +0 -0
- {msasim-25.9.3 → msasim-25.9.5}/setup.cfg +0 -0
- {msasim-25.9.3 → msasim-25.9.5}/src/main.cpp +0 -0
|
@@ -4,12 +4,9 @@ from pathlib import Path
|
|
|
4
4
|
from pybind11.setup_helpers import Pybind11Extension, build_ext
|
|
5
5
|
from setuptools import setup, find_packages
|
|
6
6
|
|
|
7
|
-
from datetime import datetime
|
|
8
7
|
|
|
9
|
-
now = datetime.now()
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
__version__ = f"{now.year % 100}.{now.month+1}.3"
|
|
9
|
+
__version__ = "25.9.5"
|
|
13
10
|
|
|
14
11
|
# The main interface is through Pybind11Extension.
|
|
15
12
|
# * You can add cxx_std=11/14/17, and then build_ext can be removed.
|
|
@@ -92,14 +92,7 @@ std::shared_ptr<stochasticProcess> modelFactory::getStochasticProcess() {
|
|
|
92
92
|
if (_state!=factoryState::COMPLETE) {
|
|
93
93
|
std::cout << "Please set all the required model parameters.\n";
|
|
94
94
|
// return;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
alphabet *selectedAlphabet;
|
|
98
|
-
nucleotide nuc;
|
|
99
|
-
amino ami;
|
|
100
|
-
if (_alphabet==alphabetCode::NUCLEOTIDE) selectedAlphabet = &nuc;
|
|
101
|
-
if (_alphabet==alphabetCode::AMINOACID) selectedAlphabet = &ami;
|
|
102
|
-
|
|
95
|
+
}
|
|
103
96
|
|
|
104
97
|
std::unique_ptr<replacementModel> repModel;
|
|
105
98
|
|
|
@@ -134,8 +127,9 @@ std::shared_ptr<stochasticProcess> modelFactory::getStochasticProcess() {
|
|
|
134
127
|
repModel = std::make_unique<tamura92>(theta, TrTv);
|
|
135
128
|
break;
|
|
136
129
|
}
|
|
137
|
-
|
|
138
|
-
|
|
130
|
+
case modelCode::WYANGMODEL:
|
|
131
|
+
throw std::runtime_error("Model not implemented: " + std::to_string(static_cast<int>(_model)));
|
|
132
|
+
break;
|
|
139
133
|
case modelCode::CPREV45:
|
|
140
134
|
repModel = std::make_unique<pupAll>(datMatrixHolder::cpREV45);
|
|
141
135
|
break;
|
|
@@ -175,6 +169,9 @@ std::shared_ptr<stochasticProcess> modelFactory::getStochasticProcess() {
|
|
|
175
169
|
case modelCode::EHO_HELIX:
|
|
176
170
|
repModel = std::make_unique<pupAll>(datMatrixHolder::EHO_HELIX);
|
|
177
171
|
break;
|
|
172
|
+
case modelCode::EHO_OTHER:
|
|
173
|
+
repModel = std::make_unique<pupAll>(datMatrixHolder::EHO_OTHER);
|
|
174
|
+
break;
|
|
178
175
|
case modelCode::EX_EHO_BUR_EXT:
|
|
179
176
|
repModel = std::make_unique<pupAll>(datMatrixHolder::EX_EHO_BUR_EXT);
|
|
180
177
|
break;
|
|
@@ -226,11 +223,21 @@ std::shared_ptr<stochasticProcess> modelFactory::getStochasticProcess() {
|
|
|
226
223
|
alphabet* modelFactory::getAlphabet() {
|
|
227
224
|
if (_alphabet==alphabetCode::NULLCODE) {
|
|
228
225
|
std::cout << "alphabet was not set! returning null pointer\n";
|
|
229
|
-
|
|
226
|
+
_alphPtr = nullptr;
|
|
230
227
|
}
|
|
231
|
-
if (_alphabet==alphabetCode::NUCLEOTIDE) _alph = new nucleotide();
|
|
232
|
-
if (_alphabet==alphabetCode::AMINOACID) _alph = new amino();
|
|
233
|
-
|
|
228
|
+
// if (_alphabet==alphabetCode::NUCLEOTIDE) _alph = new nucleotide();
|
|
229
|
+
// if (_alphabet==alphabetCode::AMINOACID) _alph = new amino();
|
|
230
|
+
if (!_alphPtr) {
|
|
231
|
+
if (_alphabet == alphabetCode::NUCLEOTIDE) {
|
|
232
|
+
_alphPtr = std::make_unique<nucleotide>();
|
|
233
|
+
} else if (_alphabet == alphabetCode::AMINOACID) {
|
|
234
|
+
_alphPtr = std::make_unique<amino>();
|
|
235
|
+
} else {
|
|
236
|
+
return nullptr;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
return _alphPtr.get();
|
|
240
|
+
// return _alph;
|
|
234
241
|
}
|
|
235
242
|
|
|
236
243
|
bool modelFactory::isModelValid() {
|
|
@@ -239,9 +246,6 @@ bool modelFactory::isModelValid() {
|
|
|
239
246
|
|
|
240
247
|
|
|
241
248
|
|
|
242
|
-
modelFactory::~modelFactory()
|
|
243
|
-
{
|
|
244
|
-
delete _alph;
|
|
245
|
-
}
|
|
249
|
+
modelFactory::~modelFactory() {}
|
|
246
250
|
|
|
247
251
|
|
|
@@ -108,7 +108,7 @@ void rateMatrixSim::generate_substitution_log(int seqLength) {
|
|
|
108
108
|
for (int h = 0; h < seqLength; h++) {
|
|
109
109
|
int selectedRandomCategory = _rateSampler->drawSample() - 1;
|
|
110
110
|
_rateCategories[h] = selectedRandomCategory;
|
|
111
|
-
if (selectedRandomCategory
|
|
111
|
+
if (selectedRandomCategory >= _sp->categories()) {
|
|
112
112
|
ratesVec[h] = 0.0;
|
|
113
113
|
continue;
|
|
114
114
|
}
|
|
@@ -253,7 +253,7 @@ std::unique_ptr<sequenceContainer> rateMatrixSim::getSequenceContainer() {
|
|
|
253
253
|
// myseqData->add(*std::move(_simulatedSequences[i]));
|
|
254
254
|
// }
|
|
255
255
|
|
|
256
|
-
return
|
|
256
|
+
return outputSequences;
|
|
257
257
|
}
|
|
258
258
|
|
|
259
259
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|