-
+
{run.inputIsAlignment
? run.alignments.map((alignment) => (
{
))
: null}
{run.inputIsTree && run.hasAstralTree ? (
-
+
) : null}
diff --git a/src/app/Model.js b/src/app/Model.js
index eb45d1fd..ed51cb96 100644
--- a/src/app/Model.js
+++ b/src/app/Model.js
@@ -8,7 +8,6 @@ import TextField from '@mui/material/TextField';
import Typography from '@mui/material/Typography';
const Model = ({ run }) => {
-
// TODO: Check marginTop: 2 hack, doesn't seem exactly aligned to top
if (run.usesModeltestNg) {
return (
@@ -90,7 +89,8 @@ const Model = ({ run }) => {
title="Random seed"
sx={{ width: 60 }}
value={run.randomSeed}
- onChange={(e) => run.setRandomSeed(e.target.value)} />
+ onChange={(e) => run.setRandomSeed(e.target.value)}
+ />
) : null}
{
);
};
-
Model.propTypes = {
run: PropTypes.object.isRequired,
};
diff --git a/src/app/Output.js b/src/app/Output.js
index f872ff68..22741255 100644
--- a/src/app/Output.js
+++ b/src/app/Output.js
@@ -13,7 +13,7 @@ const Output = ({ run }) => {
const haveResult = resultFilenames.length > 0;
return (
- ( {
slotProps={{
input: {
readOnly: true,
- }
- }} />
+ },
+ }}
+ />
run.setOutputName(e.target.value)}
- error={!run.outputNameOk} />
+ onChange={(e) => run.setOutputName(e.target.value)}
+ error={!run.outputNameOk}
+ />
- { haveResult ? Result for output id '{run.outputName}' : null }
- { resultFilenames.map(filename =>
- theme.palette.primary.contrastText,
- display: 'flex',
- alignItems: 'flex-end',
- cursor: 'pointer',
- }}
- onClick={() => run.openFile(join(run.outputDir, filename))}
- underline="hover">
-
- Result for output id '{run.outputName}'
+ ) : null}
+ {resultFilenames.map((filename) => (
+ theme.palette.primary.contrastText,
+ display: 'flex',
+ alignItems: 'flex-end',
+ cursor: 'pointer',
}}
+ onClick={() => run.openFile(join(run.outputDir, filename))}
+ underline="hover"
>
- {filename}
-
-
- )}
+
+ theme.palette.primary.contrastText,
+ }}
+ >
+ {filename}
+
+
+ ))}
- { run.haveAlignments || haveResult ? (
+ {run.haveAlignments || haveResult ? (
-
+
- ) : null }
- )
+ ) : null}
+
);
};
diff --git a/src/app/PartitionEditor.js b/src/app/PartitionEditor.js
index 52b7cbc1..bba871b5 100644
--- a/src/app/PartitionEditor.js
+++ b/src/app/PartitionEditor.js
@@ -26,68 +26,72 @@ function PartitionEditor({ alignment }) {
const { partToAdd } = partition;
return (
- ( theme.palette.input.background,
display: 'flex',
flexDirection: 'column',
- alignItems: 'flex-start'
+ alignItems: 'flex-start',
}}
>
Partition editor
-
-
- {alignment.filename}: {alignment.numSequences} sequences of length {alignment.length}
- Partition coverage: {partition.currentEndValue} / {partition.maxEndValue}
+
+
+
+ {alignment.filename}: {alignment.numSequences} sequences of length{' '}
+ {alignment.length}
+
+
+ Partition coverage: {partition.currentEndValue} /{' '}
+ {partition.maxEndValue}
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- {partition.errorMessage || ' '}
+
+ {partition.errorMessage || ' '}
+
@@ -95,7 +99,8 @@ function PartitionEditor({ alignment }) {
sx={{
width: '100%',
'& .MuiInputBase-input': {
- fontFamily: 'Consolas, "Liberation Mono", Menlo, Courier, monospace',
+ fontFamily:
+ 'Consolas, "Liberation Mono", Menlo, Courier, monospace',
},
}}
id="partition"
@@ -110,23 +115,36 @@ function PartitionEditor({ alignment }) {
variant="outlined"
/>
-
- { partition.isDefault ? null : (
+
+ {partition.isDefault ? null : (
-
+
)}
-
+
- )
+
);
}
PartitionEditor.propTypes = {
alignment: PropTypes.object.isRequired,
- className: PropTypes.string
+ className: PropTypes.string,
};
const PartitionEditorObserver = observer(PartitionEditor);
@@ -134,7 +152,7 @@ const PartitionEditorObserver = observer(PartitionEditor);
function PartitionOnCard({ alignment }) {
// const [partitionText, setPartitionText] = React.useState(alignment.partitionText);
const [partitionText, setPartitionText] = React.useState(
- alignment.partitionFileContent
+ alignment.partitionFileContent,
);
function handleChange(event) {
@@ -159,7 +177,7 @@ function PartitionOnCard({ alignment }) {
marginTop: -30,
backgroundColor: 'rgba(0,0,0,0)', // transparent background
display: 'flex',
- alignItems: 'flex-start'
+ alignItems: 'flex-start',
}}
elevation={0}
>
@@ -176,7 +194,7 @@ function PartitionOnCard({ alignment }) {
padding: 0,
marginTop: '10px',
marginLeft: 1,
- marginRight: 1
+ marginRight: 1,
}}
margin="normal"
helperText={alignment.partitionHelperText || ''}
@@ -203,12 +221,12 @@ function PartitionOnCard({ alignment }) {
PartitionOnCard.propTypes = {
alignment: PropTypes.object.isRequired,
- className: PropTypes.string
+ className: PropTypes.string,
};
const PartitionOnCardObserver = observer(PartitionOnCard);
export {
PartitionEditorObserver as default,
- PartitionOnCardObserver as PartitionOnCard
+ PartitionOnCardObserver as PartitionOnCard,
};
diff --git a/src/app/PartitionFileCard.js b/src/app/PartitionFileCard.js
index 32b83d30..de4690eb 100644
--- a/src/app/PartitionFileCard.js
+++ b/src/app/PartitionFileCard.js
@@ -67,14 +67,15 @@ function PartitionFileCard({ run }) {
component="code"
sx={{
color: (theme) => theme.palette.primary.contrastText,
- fontFamily: 'Consolas, "Liberation Mono", Menlo, Courier, monospace',
+ fontFamily:
+ 'Consolas, "Liberation Mono", Menlo, Courier, monospace',
fontSize: '12px',
height: '100%',
overflowWrap: 'break-word',
whiteSpace: 'pre-wrap',
}}
>
- { run.partitionFileContent }
+ {run.partitionFileContent}
diff --git a/src/app/Raxml.js b/src/app/Raxml.js
index 36da8897..938c0912 100644
--- a/src/app/Raxml.js
+++ b/src/app/Raxml.js
@@ -17,72 +17,72 @@ const Raxml = ({ run, store }) => {
store.setAppSnack();
}, [run.command, store]);
- return (
+ return (
+
-
-
-
- {run.modelTestIsRunningOnAlignment ? (
-
- ) : null}
- {run.running ? (
-
- ) : null}
+
+
+ {run.modelTestIsRunningOnAlignment ? (
-
+ ) : null}
+ {run.running ? (
+
+ ) : null}
+
+
-
-
-
-
-
-
-
- {run.command}
-
- Command
+
+
+
+
+
+
+
+ {run.command}
+ Command
- );
+
+ );
};
Raxml.propTypes = {
diff --git a/src/app/TreeCard.js b/src/app/TreeCard.js
index b1d3c7c0..e11b529d 100644
--- a/src/app/TreeCard.js
+++ b/src/app/TreeCard.js
@@ -3,8 +3,8 @@ import { observer } from 'mobx-react-lite';
import PropTypes from 'prop-types';
import IconButton from '@mui/material/IconButton';
import MoreVertIcon from '@mui/icons-material/MoreVert';
-import CircularProgress from "@mui/material/CircularProgress";
-import Chip from "@mui/material/Chip";
+import CircularProgress from '@mui/material/CircularProgress';
+import Chip from '@mui/material/Chip';
import Menu from '@mui/material/Menu';
import MenuItem from '@mui/material/MenuItem';
import Card from '@mui/material/Card';
@@ -27,7 +27,7 @@ function TreeCard({ sx, tree }) {
return () => {
callback();
setAnchorEl(null);
- }
+ };
}
return (
@@ -58,35 +58,43 @@ function TreeCard({ sx, tree }) {
aria-owns={anchorEl ? 'tree-menu' : undefined}
aria-haspopup="true"
onClick={handleMenuClick}
- size="large">
+ size="large"
+ >
-
}
- title={ tree.name }
- subheader={ '' }
+ title={tree.name}
+ subheader={''}
/>
- { tree.loading ? (
+ {tree.loading ? (
- ) : null }
+ ) : null}
-
-
+
);
-};
+}
//
{tree.name}
-
TreeCard.propTypes = {
tree: PropTypes.object.isRequired,
sx: PropTypes.object,
diff --git a/src/app/bootstrap.js b/src/app/bootstrap.js
index e983d97d..8989ea4c 100644
--- a/src/app/bootstrap.js
+++ b/src/app/bootstrap.js
@@ -8,9 +8,12 @@ if (process.env.NODE_ENV === 'development') {
ipcRenderer.send(ipc.ALIGNMENT_EXAMPLE_FILES_GET_REQUEST);
}
-ipcRenderer.on(ipc.ALIGNMENT_EXAMPLE_FILES_GET_SUCCESS, (event, exampleFiles) => {
- initDev(exampleFiles);
-});
+ipcRenderer.on(
+ ipc.ALIGNMENT_EXAMPLE_FILES_GET_SUCCESS,
+ (event, exampleFiles) => {
+ initDev(exampleFiles);
+ },
+);
function initDev(exampleFiles) {
// if (exampleFiles.length === 0) {
@@ -28,7 +31,9 @@ function initDev(exampleFiles) {
// 'mixed_data.txt',
// 'multistate.txt',
'nucleotide.txt',
- ].map(filename => ({ path: path.join(exampleFilesDir, 'fasta', filename) }));
+ ].map((filename) => ({
+ path: path.join(exampleFilesDir, 'fasta', filename),
+ }));
const usePhylipFiles = [
// 'AA.txt',
// 'align_allvariant.txt',
@@ -46,7 +51,9 @@ function initDev(exampleFiles) {
// 'fail_bad_name.txt',
// 'test_invariant_sites.txt',
// 'test_lower_case_bases.txt',
- ].map(filename => ({ path: path.join(exampleFilesDir, 'phylip', filename) }));
+ ].map((filename) => ({
+ path: path.join(exampleFilesDir, 'phylip', filename),
+ }));
const useFiles = [].concat(useFastaFiles, usePhylipFiles);
store.activeRun.addAlignments(useFiles);
store.activeRun.setOutputDir(exampleFiles.outdir);
diff --git a/src/app/components/CodeHighlight.js b/src/app/components/CodeHighlight.js
index 7edd3313..e156ba6b 100644
--- a/src/app/components/CodeHighlight.js
+++ b/src/app/components/CodeHighlight.js
@@ -11,7 +11,11 @@ function CodeHighlight({ code, language, sx }) {
useEffect(() => {
if (Prism.languages.hasOwnProperty(language)) {
- const highlightHTML = Prism.highlight(code, Prism.languages[language], language);
+ const highlightHTML = Prism.highlight(
+ code,
+ Prism.languages[language],
+ language,
+ );
codeNode.current.innerHTML = highlightHTML;
}
}, [code, language]);
@@ -27,7 +31,7 @@ function CodeHighlight({ code, language, sx }) {
whiteSpace: 'pre-wrap',
}}
>
- { code }
+ {code}
);
diff --git a/src/app/components/ErrorBoundary.js b/src/app/components/ErrorBoundary.js
index 23c125f5..f7f40d28 100644
--- a/src/app/components/ErrorBoundary.js
+++ b/src/app/components/ErrorBoundary.js
@@ -22,7 +22,7 @@ class ErrorBoundary extends React.Component {
handleClose = () => {
this.setState({ error: null });
- }
+ };
render() {
const { error } = this.state;
@@ -36,7 +36,7 @@ class ErrorBoundary extends React.Component {
Oops! Something went wrong.
-
+
);
}
diff --git a/src/app/components/ErrorDialog.js b/src/app/components/ErrorDialog.js
index f8eca1d1..dc64bf7f 100644
--- a/src/app/components/ErrorDialog.js
+++ b/src/app/components/ErrorDialog.js
@@ -14,12 +14,15 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import Button from '@mui/material/Button';
import Alert from '@mui/material/Alert';
import { ipcRenderer } from 'electron';
-import { reportIssueToGitHub, getMailtoLinkToReportError } from '../../common/utils';
+import {
+ reportIssueToGitHub,
+ getMailtoLinkToReportError,
+} from '../../common/utils';
import * as ipc from '../../constants/ipc';
const handleReload = () => {
ipcRenderer.send(ipc.RELOAD);
-}
+};
export default function ErrorDialog({ error, onClose, needReload, title }) {
const [reported, setReported] = React.useState(false);
@@ -31,17 +34,19 @@ export default function ErrorDialog({ error, onClose, needReload, title }) {
const handleReportToGithub = () => {
reportIssueToGitHub(error);
setReported(true);
- }
+ };
const handleReportToMail = () => {
setReported(true);
- }
+ };
const mailtoContent = getMailtoLinkToReportError(error);
- const closeMessage = needReload ? (
- reported ? 'Reload' : 'Ignore and reload'
- ) : 'Close';
+ const closeMessage = needReload
+ ? reported
+ ? 'Reload'
+ : 'Ignore and reload'
+ : 'Close';
const resetAndClose = () => {
setReported(false);
@@ -90,10 +95,7 @@ export default function ErrorDialog({ error, onClose, needReload, title }) {
Please help us solve the issue by reporting it.
) : (
-
+
Thanks for reporting the issue!
);
@@ -168,4 +170,4 @@ ErrorDialog.propTypes = {
onClose: PropTypes.func.isRequired,
needReload: PropTypes.bool,
title: PropTypes.string,
-}
+};
diff --git a/src/app/components/ModifiedDialog.js b/src/app/components/ModifiedDialog.js
index 18c11143..06815868 100644
--- a/src/app/components/ModifiedDialog.js
+++ b/src/app/components/ModifiedDialog.js
@@ -22,7 +22,9 @@ export default function ModifiedDialog({ show, onClose, messages }) {