Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save motifs and tracks in mongo #19

Merged
merged 1 commit into from
Nov 8, 2024
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 src/client/components/network-editor/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ export class NetworkEditorController {
fetch(`/api/${this.networkIDStr}`, {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ networkName })
body: JSON.stringify({ name: networkName })
});
}

Expand Down
4 changes: 1 addition & 3 deletions src/client/components/network-editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,9 @@ async function loadNetwork(id, cy, controller, recentNetworksController) {
}
const networkJson = await networkResult.json();

cy.add(networkJson.network.elements);
cy.data({
name: networkJson.networkName,
name: networkJson.name,
parameters: networkJson.parameters,
geneSetCollection: networkJson.geneSetCollection,
demo: Boolean(networkJson.demo)
});

Expand Down
13 changes: 4 additions & 9 deletions src/client/components/report/report.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { getComparator } from '../network-editor/data-table';
import { getComparator } from '../util';
import { Select, MenuItem } from '@mui/material';
import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Paper } from '@mui/material';
import makeStyles from '@mui/styles/makeStyles';
Expand Down Expand Up @@ -31,6 +31,7 @@ async function fetchReport(secret) {

const counts = await countRes.json();
const networks = await networkRes.json();
console.log(counts, networks);

return { counts, networks };
} catch(err) {
Expand Down Expand Up @@ -68,7 +69,7 @@ export function Report({ secret }) {
Sort:
  
<Select value={orderBy} onChange={(event) => setOrderBy(event.target.value)} className={classes.orderBy}>
<MenuItem value="networkName">Name</MenuItem>
<MenuItem value="name">Name</MenuItem>
<MenuItem value="creationTime">Creation Time</MenuItem>
<MenuItem value="lastAccessTime">Last Accessed Time</MenuItem>
</Select>
Expand All @@ -84,9 +85,6 @@ export function Report({ secret }) {
<TableHead>
<TableRow>
<TableCell><b>Network Name</b></TableCell>
<TableCell align="right"><b>Nodes</b></TableCell>
<TableCell align="right"><b>Edges</b></TableCell>
<TableCell align="right"><b>Type</b></TableCell>
<TableCell align="right"><b>Creation Time</b></TableCell>
<TableCell align="right"><b>Last Access Time</b></TableCell>
<TableCell align="right"> </TableCell>
Expand All @@ -101,10 +99,7 @@ export function Report({ secret }) {
key={network._id}
sx={{ '&:last-child td, &:last-child th': { border: 0 } }}
>
<TableCell component="th" scope="row">{network.networkName}</TableCell>
<TableCell align="right">{network.nodeCount}</TableCell>
<TableCell align="right">{network.edgeCount}</TableCell>
<TableCell align="right">{network.inputType}</TableCell>
<TableCell component="th" scope="row">{network.name}</TableCell>
<TableCell align="right">{createTime}</TableCell>
<TableCell align="right">{accessTime}</TableCell>
<TableCell align="right"><a href={`/document/${network._id}`} target="_blank" rel = "noopener noreferrer">open</a></TableCell>
Expand Down
Loading