Skip to content

Commit df7517f

Browse files
committed
Disable modeltest on Win 7
1 parent 701d97c commit df7517f

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

src/app/AlignmentCard.js

+1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ function _ModelTestButton({ alignment }) {
158158
}}
159159
loading={alignment.modeltestLoading}
160160
onClick={alignment.runModelTest}
161+
disabled={alignment.modeltestDisabled}
161162
>
162163
Run ModelTest
163164
</LoadingButton>

src/app/store/Alignment.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import * as raxmlNgSettings from '../../settings/raxmlng';
1313
import StoreBase from './StoreBase';
1414
import Partition, { FinalPartition } from './Partition';
1515
import { getFinalDataType } from '../../common/typecheckAlignment';
16+
import os from 'os';
17+
import electronutil from 'electron-util';
1618

1719
const raxmlMatrixOptions = raxmlSettings.matrixOptions;
1820
const raxmlNgModelOptions = raxmlNgSettings.modelOptions;
@@ -237,6 +239,10 @@ class Alignment extends StoreBase {
237239
this.ngAscertainmentBias = new RaxmlNgModelASC(this);
238240
this.partition = new Partition(this);
239241

242+
const [majorVersion, minorVersion] = os.release().split('.');
243+
this.modeltestDisabled =
244+
electronutil.is.windows && majorVersion === '6' && minorVersion === '1';
245+
240246
this.listen();
241247
}
242248

@@ -387,7 +393,7 @@ class Alignment extends StoreBase {
387393
}
388394
// I couldnt find information if ModelTest checks for ASC_
389395
this.run.substitutionAscertainment.setValue('none');
390-
396+
391397
// Check for invariant sites
392398
if (/I$/.test(model)) {
393399
this.run.substitutionI.setValue('+I (ML estimate)');

src/app/store/Run.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ const winBinaries =
3434
majorVersion === '6' && minorVersion === '1'
3535
? [
3636
// TODO: add raxml ng windows exe
37-
{ name: 'modeltest-ng.exe', version: '0.1.7' },
37+
// TODO: Crashes on Win7, disabled for now
38+
// { name: 'modeltest-ng.exe', version: '0.1.7' },
3839
{ name: 'raxmlHPC_Win7.exe', multithreaded: false, version: '8.2.10' },
3940
{
4041
name: 'raxmlHPC-SSE3_Win7.exe',
@@ -711,7 +712,7 @@ class Run extends StoreBase {
711712
this.outputNamePlaceholder = `${id}`;
712713
this.atomAfterRun = createAtom('AfterRun');
713714
this.atomFinished = createAtom('finished');
714-
this.modeltestName = binaries.filter((b) => b.name.includes('modeltest'))[0].name;
715+
this.modeltestName = binaries.filter((b) => b.name.includes('modeltest'))[0]?.name;
715716
}
716717

717718
id = 0;
@@ -990,7 +991,6 @@ class Run extends StoreBase {
990991
}
991992

992993
@computed get modelTestIsRunningOnAlignment() {
993-
// return this.alignments.some(alignment => alignment.modeltestLoading);
994994
const running = this.alignments.some(
995995
(alignment) => alignment.modeltestLoading
996996
);

0 commit comments

Comments
 (0)