Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"overrides": [
{
"files": [".prettierrc", ".babelrc", ".eslintrc", ".stylelintrc"],
"options": {
"options": {
"parser": "json"
}
}
Expand Down
4 changes: 2 additions & 2 deletions e2e/helpers/cleanupOutput.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ async function cleanupOutputFiles(outputDir, outputId) {
.filter(
(entry) =>
entry.includes(outputId) ||
entry.startsWith('RAxML_GUI_ModelTest_nucleotide')
entry.startsWith('RAxML_GUI_ModelTest_nucleotide'),
)
.map((entry) => fs.rm(path.join(outputDir, entry), { force: true }))
.map((entry) => fs.rm(path.join(outputDir, entry), { force: true })),
);
}

Expand Down
4 changes: 3 additions & 1 deletion e2e/helpers/waitForOutput.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ async function waitForOutputFile(filePaths, { timeout = 10 * 60 * 1000 } = {}) {
await new Promise((resolve) => setTimeout(resolve, 1000));
}

throw new Error(`Timed out waiting for output file: ${candidates.join(' or ')}`);
throw new Error(
`Timed out waiting for output file: ${candidates.join(' or ')}`,
);
}

module.exports = {
Expand Down
79 changes: 65 additions & 14 deletions e2e/modeltest-then-raxml-ng.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ test.describe('ModelTest then raxml-ng', () => {
expect(commandText).not.toMatch(/--model GTR(\s|$)/);

const modeltestFiles = (await fs.readdir(outputDir)).filter((filename) =>
filename.startsWith('RAxML_GUI_ModelTest_nucleotide')
filename.startsWith('RAxML_GUI_ModelTest_nucleotide'),
);
expect(modeltestFiles.length).toBeGreaterThan(0);

Expand All @@ -74,33 +74,84 @@ test.describe('ModelTest then raxml-ng', () => {
});
await expect(page.locator('#error-dialog-title')).toHaveCount(0);

await expect(page.getByText(`Result for output id '${outputId}'`)).toBeVisible();
await expect(page.getByText(`${outputId}.raxml.bestTree.tre`)).toBeVisible();
await expect(
page.getByText(`Result for output id '${outputId}'`),
).toBeVisible();
await expect(
page.getByText(`${outputId}.raxml.bestTree.tre`),
).toBeVisible();
await expect(page.getByText(`${outputId}.raxml.support.tre`)).toBeVisible();
await expect(page.getByText(`${outputId}.raxml.bootstraps.tre`)).toBeVisible();
await expect(
page.getByText(`${outputId}.raxml.bootstraps.tre`),
).toBeVisible();

const bestTreePath = path.join(outputDir, `${outputId}.raxml.bestTree.tre`);
const supportTreePath = path.join(
outputDir,
`${outputId}.raxml.support.tre`
`${outputId}.raxml.support.tre`,
);
const bootstrapsTreePath = path.join(
outputDir,
`${outputId}.raxml.bootstraps.tre`
`${outputId}.raxml.bootstraps.tre`,
);
const logPath = path.join(outputDir, `${outputId}.raxml.log.txt`);
const bestModelPath = path.join(outputDir, `${outputId}.raxml.bestModel.txt`);
const bestModelPath = path.join(
outputDir,
`${outputId}.raxml.bestModel.txt`,
);
const settingsPath = path.join(
outputDir,
`RAxML_GUI_Settings_${outputId}.txt`
`RAxML_GUI_Settings_${outputId}.txt`,
);

await expect.poll(async () => fs.stat(bestTreePath).then(() => true).catch(() => false)).toBe(true);
await expect.poll(async () => fs.stat(supportTreePath).then(() => true).catch(() => false)).toBe(true);
await expect.poll(async () => fs.stat(bootstrapsTreePath).then(() => true).catch(() => false)).toBe(true);
await expect.poll(async () => fs.stat(logPath).then(() => true).catch(() => false)).toBe(true);
await expect.poll(async () => fs.stat(bestModelPath).then(() => true).catch(() => false)).toBe(true);
await expect.poll(async () => fs.stat(settingsPath).then(() => true).catch(() => false)).toBe(true);
await expect
.poll(async () =>
fs
.stat(bestTreePath)
.then(() => true)
.catch(() => false),
)
.toBe(true);
await expect
.poll(async () =>
fs
.stat(supportTreePath)
.then(() => true)
.catch(() => false),
)
.toBe(true);
await expect
.poll(async () =>
fs
.stat(bootstrapsTreePath)
.then(() => true)
.catch(() => false),
)
.toBe(true);
await expect
.poll(async () =>
fs
.stat(logPath)
.then(() => true)
.catch(() => false),
)
.toBe(true);
await expect
.poll(async () =>
fs
.stat(bestModelPath)
.then(() => true)
.catch(() => false),
)
.toBe(true);
await expect
.poll(async () =>
fs
.stat(settingsPath)
.then(() => true)
.catch(() => false),
)
.toBe(true);

const bestTree = await fs.readFile(bestTreePath, 'utf8');
expect(bestTree).toContain('TAXON_');
Expand Down
9 changes: 6 additions & 3 deletions e2e/raxmlHPC.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ test.describe('raxmlHPC', () => {
const outputFilename = `${outputId}.tre`;
const bestTreePath = path.join(
outputDir,
`RAxML_bestTree.${outputFilename}`
`RAxML_bestTree.${outputFilename}`,
);
const infoPathTxt = path.join(outputDir, `RAxML_info.${outputId}.txt`);
const infoPathTre = path.join(outputDir, `RAxML_info.${outputFilename}`);
const settingsPath = path.join(
outputDir,
`RAxML_GUI_Settings_${outputId}.txt`
`RAxML_GUI_Settings_${outputId}.txt`,
);

const runButton = page.getByTestId('run-analysis');
Expand All @@ -82,7 +82,10 @@ test.describe('raxmlHPC', () => {
expect(bestTree).toContain('TAXON_');
expect(bestTree).toMatch(/[()]/);

const infoPath = (await fs.stat(infoPathTxt).then(() => infoPathTxt).catch(() => infoPathTre));
const infoPath = await fs
.stat(infoPathTxt)
.then(() => infoPathTxt)
.catch(() => infoPathTre);
const infoText = await fs.readFile(infoPath, 'utf8');
expect(infoText.length).toBeGreaterThan(0);
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"electron-webpack": "^2.8.2",
"nodemon": "^3.1.10",
"npm-run-all": "^4.1.5",
"prettier": "^3.6.2",
"prettier": "^3.9.6",
"shx": "^0.4.0",
"typescript": "^5.8.3",
"wait-on": "^9.1.0"
Expand Down
26 changes: 12 additions & 14 deletions src/app/AlignmentCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,10 @@ function AlignmentCard({ alignment }) {
...alignment.modelExtra,
setValue: alignment.modelExtra.onChange,
title: alignment.modelExtra.label,
options: alignment.modelExtra.options.map((model) => (
{
value: model,
title: model,
}
)),
options: alignment.modelExtra.options.map((model) => ({
value: model,
title: model,
})),
}}
/>
) : null}
Expand Down Expand Up @@ -207,10 +205,7 @@ function AlignmentCard({ alignment }) {
avatar={Type}
action={
<div>
<Tooltip
aria-label="remove-alignment"
title="Remove alignment"
>
<Tooltip aria-label="remove-alignment" title="Remove alignment">
<IconButton onClick={alignment.remove} size="large">
<DeleteForeverIcon />
</IconButton>
Expand All @@ -220,7 +215,8 @@ function AlignmentCard({ alignment }) {
aria-owns={anchorEl ? 'alignment-menu' : undefined}
aria-haspopup="true"
onClick={handleMenuClick}
size="large">
size="large"
>
<MoreVertIcon />
</IconButton>

Expand Down Expand Up @@ -342,7 +338,8 @@ function FinalAlignmentCard({ sx, alignment }) {
aria-owns={anchorEl ? 'alignment-menu' : undefined}
aria-haspopup="true"
onClick={handleMenuClick}
size="large">
size="large"
>
<MoreVertIcon />
</IconButton>

Expand Down Expand Up @@ -376,7 +373,7 @@ function FinalAlignmentCard({ sx, alignment }) {
checked={alignment.fillTaxonGapsWithEmptySeqeunces}
onChange={(event) => {
alignment.setFillTaxonGapsWithEmptySeqeunces(
event.target.checked
event.target.checked,
);
}}
value="fillTaxonGapsWithEmptySeqeunces"
Expand Down Expand Up @@ -406,7 +403,8 @@ function FinalAlignmentCard({ sx, alignment }) {
component="code"
sx={{
color: (theme) => theme.palette.primary.contrastText,
fontFamily: 'Consolas, "Liberation Mono", Menlo, Courier, monospace',
fontFamily:
'Consolas, "Liberation Mono", Menlo, Courier, monospace',
fontSize: '10px',
height: '100%',
overflowWrap: 'break-word',
Expand Down
7 changes: 2 additions & 5 deletions src/app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const VerticalHeading = styled(Typography)(({ theme }) => ({
}));

const App = () => {

const TabItems = store.runs.map((run) => (
<Tab
key={run.id}
Expand Down Expand Up @@ -270,7 +269,7 @@ const App = () => {
height: '100%',
overflowY: 'auto',
paddingBottom: '20px',
borderLeft: '1px solid #ccc'
borderLeft: '1px solid #ccc',
}}
>
<Box
Expand Down Expand Up @@ -401,9 +400,7 @@ const App = () => {
</IconButton>
<Box display="flex">
{/* In dev mode the app version shown is from electron, in production it is ours */}
<Box sx={{ marginRight: '20px' }}>
raxmlGUI {store.version}
</Box>
<Box sx={{ marginRight: '20px' }}>raxmlGUI {store.version}</Box>
<Box sx={{ marginRight: '20px' }}>
{binary.value} {binary.version}
</Box>
Expand Down
9 changes: 4 additions & 5 deletions src/app/AstralTreeCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import CardActions from '@mui/material/CardActions';
import Box from '@mui/material/Box';

function AstralTreeCard({ astralTree }) {
const { } = astralTree;
const {} = astralTree;

const [anchorEl, setAnchorEl] = React.useState(null);

Expand Down Expand Up @@ -44,9 +44,7 @@ function AstralTreeCard({ astralTree }) {
}}
>
<Box>
<Box display="flex" flexWrap="wrap" alignItems="center">

</Box>
<Box display="flex" flexWrap="wrap" alignItems="center"></Box>
</Box>
</Box>
);
Expand Down Expand Up @@ -91,7 +89,8 @@ function AstralTreeCard({ astralTree }) {
aria-owns={anchorEl ? 'astralTree-menu' : undefined}
aria-haspopup="true"
onClick={handleMenuClick}
size="large">
size="large"
>
<MoreVertIcon />
</IconButton>

Expand Down
13 changes: 6 additions & 7 deletions src/app/CitationModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
import CodeHighlight from './components/CodeHighlight';

function CitationModal({ citation }) {

return (
<Card
elevation={0}
Expand All @@ -22,13 +21,13 @@ function CitationModal({ citation }) {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
maxWidth: '700px'
maxWidth: '700px',
}}
>
<CardContent
sx={{
maxHeight: '600px',
overflowY: 'auto'
overflowY: 'auto',
}}
>
<Typography variant="h4">How to cite?</Typography>
Expand All @@ -43,7 +42,7 @@ function CitationModal({ citation }) {
aria-label="text format"
size="small"
>
{citation.formats.map(format => (
{citation.formats.map((format) => (
<ToggleButton
key={format.value}
value={format.value}
Expand All @@ -54,7 +53,7 @@ function CitationModal({ citation }) {
))}
</ToggleButtonGroup>
</Box>
{citation.content.map(article => (
{citation.content.map((article) => (
<Box key={article.name} mt={2}>
<Typography variant="subtitle2">{article.name}</Typography>
<CodeHighlight
Expand All @@ -63,7 +62,7 @@ function CitationModal({ citation }) {
sx={{
backgroundColor: (theme) => theme.palette.output.background,
borderRadius: '4px',
padding: '4px'
padding: '4px',
}}
/>
</Box>
Expand All @@ -90,7 +89,7 @@ function CitationModal({ citation }) {
}

CitationModal.propTypes = {
citation: PropTypes.object.isRequired
citation: PropTypes.object.isRequired,
};

export default observer(CitationModal);
8 changes: 5 additions & 3 deletions src/app/Console.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const Console = ({ run }) => {
component="code"
sx={{
color: (theme) => theme.palette.console.contrastText,
fontFamily: 'Consolas, "Liberation Mono", Menlo, Courier, monospace',
fontFamily:
'Consolas, "Liberation Mono", Menlo, Courier, monospace',
fontSize: '12px',
height: '100%',
position: 'absolute',
Expand All @@ -55,7 +56,8 @@ const Console = ({ run }) => {
component="code"
sx={{
color: (theme) => theme.palette.console.contrastText,
fontFamily: 'Consolas, "Liberation Mono", Menlo, Courier, monospace',
fontFamily:
'Consolas, "Liberation Mono", Menlo, Courier, monospace',
fontSize: '12px',
height: '100%',
position: 'absolute',
Expand All @@ -73,7 +75,7 @@ const Console = ({ run }) => {
};

Console.propTypes = {
run: PropTypes.object.isRequired
run: PropTypes.object.isRequired,
};

export default observer(Console);
Loading
Loading