msasim 25.5.3__tar.gz → 25.9.4__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.5.3/msasim.egg-info → msasim-25.9.4}/PKG-INFO +1 -1
- {msasim-25.5.3 → msasim-25.9.4/msasim.egg-info}/PKG-INFO +1 -1
- {msasim-25.5.3 → msasim-25.9.4}/setup.py +1 -1
- {msasim-25.5.3 → msasim-25.9.4}/src/modelFactory.cpp +22 -18
- {msasim-25.5.3 → msasim-25.9.4}/src/rateMatrixSim.cpp +11 -10
- {msasim-25.5.3 → msasim-25.9.4}/LICENSE +0 -0
- {msasim-25.5.3 → msasim-25.9.4}/README.md +0 -0
- {msasim-25.5.3 → msasim-25.9.4}/_Sailfish/__init__.pyi +0 -0
- {msasim-25.5.3 → msasim-25.9.4}/_Sailfish/py.typed +0 -0
- {msasim-25.5.3 → msasim-25.9.4}/msasim/__init__.py +0 -0
- {msasim-25.5.3 → msasim-25.9.4}/msasim/sailfish.py +0 -0
- {msasim-25.5.3 → msasim-25.9.4}/msasim.egg-info/SOURCES.txt +0 -0
- {msasim-25.5.3 → msasim-25.9.4}/msasim.egg-info/dependency_links.txt +0 -0
- {msasim-25.5.3 → msasim-25.9.4}/msasim.egg-info/not-zip-safe +0 -0
- {msasim-25.5.3 → msasim-25.9.4}/msasim.egg-info/requires.txt +0 -0
- {msasim-25.5.3 → msasim-25.9.4}/msasim.egg-info/top_level.txt +0 -0
- {msasim-25.5.3 → msasim-25.9.4}/pyproject.toml +0 -0
- {msasim-25.5.3 → msasim-25.9.4}/setup.cfg +0 -0
- {msasim-25.5.3 → msasim-25.9.4}/src/main.cpp +0 -0
|
@@ -9,7 +9,7 @@ from datetime import datetime
|
|
|
9
9
|
now = datetime.now()
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
__version__ = f"{now.year % 100}.{now.month+1}.
|
|
12
|
+
__version__ = f"{now.year % 100}.{now.month+1}.4"
|
|
13
13
|
|
|
14
14
|
# The main interface is through Pybind11Extension.
|
|
15
15
|
# * 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
|
}
|
|
@@ -134,20 +134,21 @@ void rateMatrixSim::mutateSeqRecuresively(tree::nodeP currentNode, int seqLength
|
|
|
134
134
|
mutateSeqAlongBranch(node, seqLength);
|
|
135
135
|
if ((*_nodesToSave)[node->id()]) saveSequence(node->id(), node->name());
|
|
136
136
|
mutateSeqRecuresively(node, seqLength);
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
_subManager.undoSubs(currentNode->id(), _rootSequence, _rateCategories, _sp.get());
|
|
137
|
+
if (!_subManager.isEmpty(node->id())) {
|
|
138
|
+
_subManager.undoSubs(node->id(), _rootSequence, _rateCategories, _sp.get());
|
|
140
139
|
}
|
|
141
140
|
}
|
|
142
141
|
}
|
|
143
142
|
|
|
144
143
|
void rateMatrixSim::mutateSeqAlongBranch(tree::nodeP currentNode, int seqLength) {
|
|
145
144
|
const MDOUBLE distToFather = currentNode->dis2father();
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
145
|
+
mutateEntireSeq(currentNode, seqLength);
|
|
146
|
+
|
|
147
|
+
// if (distToFather > 0.5) {
|
|
148
|
+
// mutateEntireSeq(currentNode, seqLength);
|
|
149
|
+
// } else {
|
|
150
|
+
// mutateSeqGillespie(currentNode, seqLength, distToFather);
|
|
151
|
+
// }
|
|
151
152
|
// testSumOfRates();
|
|
152
153
|
}
|
|
153
154
|
|
|
@@ -252,7 +253,7 @@ std::unique_ptr<sequenceContainer> rateMatrixSim::getSequenceContainer() {
|
|
|
252
253
|
// myseqData->add(*std::move(_simulatedSequences[i]));
|
|
253
254
|
// }
|
|
254
255
|
|
|
255
|
-
return
|
|
256
|
+
return outputSequences;
|
|
256
257
|
}
|
|
257
258
|
|
|
258
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
|