Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
fdec01f
transfered changes of InteractionsView from repos branch to main repo…
y330 Aug 8, 2024
5c1da39
Added topbar, added functionality for showing query gene when no gene…
y330 Aug 21, 2024
5b235f9
topbar modified
y330 Aug 26, 2024
56378cc
Added Legend, Added proper icons for topbar, as per design in eplant v2,
y330 Sep 15, 2024
8e11d0f
1. Tried to add load gene button to node popup, came to the conclusio…
y330 Sep 22, 2024
9759b93
Added more logic to filter, created FilterDialog.tsx
y330 Sep 30, 2024
22a531b
s
bdls-jamal Oct 8, 2024
3f7c725
s
bdls-jamal Oct 8, 2024
cef9be2
s
bdls-jamal Oct 8, 2024
80a043f
testing cluster view
bdls-jamal Oct 8, 2024
c844be5
working version of cluster tree
bdls-jamal Oct 8, 2024
895d26f
working with newick data cluster tree
bdls-jamal Oct 9, 2024
492634b
nothing is working
y330 Oct 10, 2024
c573d0a
changes to use on desktop pc
bdls-jamal Oct 10, 2024
e0f0d05
working but failed nav view
bdls-jamal Oct 11, 2024
3e19354
Merge branch 'NavigatorView' of https://github.com/bdls-jamal/ePlant …
bdls-jamal Oct 11, 2024
8855fd3
Updated filter dialog to actually contain all the neccesary elements …
y330 Oct 21, 2024
048ad81
m
bdls-jamal Oct 22, 2024
6439a59
Cluster implementation working with getInitialData, getInitialState, …
bdls-jamal Oct 22, 2024
3f7ff85
Filters for interactions view are now functional! also made some twea…
y330 Oct 23, 2024
78f239b
Changes to fix naming conventions and some styling points of Navigato…
bdls-jamal Oct 24, 2024
1947cbb
Cleaned up all errors, merged FilterDialog with Topbar for added func…
y330 Oct 29, 2024
e0c5004
fixed use of thematic colours and darkmode implementation
bdls-jamal Oct 31, 2024
07f8cb0
changes made to add another svg element, titles, and icon
bdls-jamal Nov 7, 2024
a9951a4
added progress for load gene button
y330 Nov 12, 2024
c900f12
m
bdls-jamal Nov 15, 2024
f4d8b48
Commit to save history of working tooltips(not yet customized but dec…
bdls-jamal Nov 19, 2024
cff1a8a
Fixes to dark mode for default genome colour
bdls-jamal Nov 19, 2024
2988c53
testing changes
bdls-jamal Nov 20, 2024
b54ad4a
Merge branch 'BioAnalyticResource:staging' into NavigatorView
bdls-jamal Nov 20, 2024
a3d5ae2
m
bdls-jamal Nov 20, 2024
a35182a
No longer needed view
bdls-jamal Nov 20, 2024
e89a723
m
bdls-jamal Nov 21, 2024
05f4a2c
changed some comment formatting
bdls-jamal Nov 27, 2024
b5e57d2
s
bdls-jamal Nov 28, 2024
2fb296f
No more caching issues using queryClient, resolved by adding unique k…
bdls-jamal Nov 29, 2024
b349dd9
Removed use of queryClient, added constants file to make main file a …
bdls-jamal Dec 2, 2024
d7a406a
Added tooltips, fixed caching, fixed gramene links
bdls-jamal Dec 5, 2024
77d94bb
Updates to code to change view and load/change to gene when an efp li…
bdls-jamal Dec 12, 2024
c3cd9d9
removed unused files and unused imports
bdls-jamal Dec 12, 2024
df8c561
Merge branch 'staging' into yonah-InteractionsView
mwkyuen Dec 18, 2024
65c5184
Merge branch 'staging' into yonah-InteractionsView
mwkyuen Dec 18, 2024
e93004c
Fixed error where dashed PPI edges were not being drawn, also added c…
y330 Jan 2, 2025
5daa927
Changes to test using a helper function for view switching
bdls-jamal Jan 15, 2025
e534524
converted async awaits to .then, cleaned up sublocalization fetch fun…
y330 Jan 16, 2025
ecb494b
Moved view and gene switching functionality to main views folder for …
bdls-jamal Jan 29, 2025
6211fdd
Changes for eslint
bdls-jamal Jan 29, 2025
6871c6d
Changes to add other species links to the working icons
bdls-jamal Jan 29, 2025
e512102
Changes to grey out links if unavailable
bdls-jamal Jan 29, 2025
c65f05f
Added snackbar alert for protein localization colour error. Interacti…
y330 Jan 30, 2025
eef5f25
Fixed loading error. Interactons view ready to merge
y330 Jan 30, 2025
402512c
Merge branch 'staging' into NavigatorView
bdls-jamal Feb 4, 2025
68da4ea
Install map requirements
bdls-jamal Feb 4, 2025
df7d5ed
Additions to tutorial
bdls-jamal Feb 4, 2025
b1485f4
Added navigator view citation
bdls-jamal Feb 4, 2025
dd338a1
Update .eslintrc.cjs to remove tsdoc rules
bdls-jamal Feb 6, 2025
c47f4fe
changes: Added jsdoc to all functions, changed colors of apply filter…
y330 Feb 25, 2025
6575026
removed unnessecary positionQueryBack function i added
y330 Feb 25, 2025
7b151ee
removed usless imports
y330 Feb 25, 2025
079ad90
lint:fix
y330 Feb 25, 2025
72e54f5
Upgrading GitHub Actions to v4
asherpasha Mar 7, 2025
af27a7e
Fixed a minor bug.
asherpasha Mar 7, 2025
17bed69
Trying to fix a bug.
asherpasha Mar 7, 2025
faca7d8
Trying to fix a bug.
asherpasha Mar 7, 2025
60682cd
Trying to fix a bug.
asherpasha Mar 7, 2025
e9765c7
Trying to fix a bug.
asherpasha Mar 7, 2025
835ae19
Trying to fix a bug.
asherpasha Mar 7, 2025
2121b25
Testing temp key.
asherpasha Mar 7, 2025
03adc37
Testing temp key.
asherpasha Mar 7, 2025
49cd94d
Testing env vars.
asherpasha Mar 7, 2025
668beee
Testing...
asherpasha Mar 7, 2025
ad1b0d6
Prettier changes
bdls-jamal Mar 13, 2025
6a5351a
Merge branch 'NavigatorView' of https://github.com/bdls-jamal/ePlant …
bdls-jamal Mar 13, 2025
18a149a
Prettier fixes
bdls-jamal Mar 20, 2025
7edc2ab
Delete yarn.lock as it is for local package installs
bdls-jamal Mar 20, 2025
274a050
Delete Eplant/views/NavigatorViewer/placeholder.tsx
bdls-jamal Mar 20, 2025
840b331
Delete Eplant/views/NavigatorViewer/indexplaceholder.tsx
bdls-jamal Mar 20, 2025
c406c5f
Fixes tooltip behaviour to persist after a click
bdls-jamal Mar 30, 2025
558e357
Name changes for icon files used in the NavigatorView
bdls-jamal Apr 1, 2025
dbd6975
Removed unused imports/packages and some minor description changes
bdls-jamal Apr 1, 2025
5326afb
Remove unused packages
bdls-jamal Apr 1, 2025
01918fd
Resolve eslint warning
bdls-jamal Apr 1, 2025
a921146
Changed cell efp icon export to use the same structure as the others
bdls-jamal Apr 1, 2025
6638d26
Fixed navigator view icon to match the repository style
bdls-jamal Apr 1, 2025
187366d
Fixed import names for icons used in the navigator view
bdls-jamal Apr 1, 2025
0d8153d
Changes to fix based on review comments
bdls-jamal Apr 1, 2025
33a4aed
Updates to the comments of some functions
bdls-jamal Apr 1, 2025
073b937
Changes for npx prettier
bdls-jamal Apr 1, 2025
79f6613
Unused import
bdls-jamal Apr 2, 2025
0d651d6
Merge pull request #155 from asherpasha/staging
asherpasha Apr 3, 2025
44eea9a
Add some TODOs
bdls-jamal Apr 4, 2025
2b9625e
Merge branch 'kobi-NavigatorView' of https://github.com/BioAnalyticRe…
bdls-jamal Apr 4, 2025
f71f67e
Changes to some of the descriptions
bdls-jamal Apr 4, 2025
2ac1881
Changed order of the similarity bars
bdls-jamal Apr 4, 2025
522c456
Removal of extractPrimaryGene as it is redundant. Using activeGeneId …
bdls-jamal Apr 4, 2025
ce0c5ee
Changed useEffect to use activeGeneId as a check rather than apiUrl
bdls-jamal Apr 4, 2025
3e2987f
Add navigator description to the file
bdls-jamal Apr 5, 2025
3ae7a1f
Prettier changes again
bdls-jamal Apr 5, 2025
87b8b74
Merge branch 'staging' into kobi-NavigatorView
bdls-jamal Apr 5, 2025
d782422
Styling changes different to eplant2
bdls-jamal Apr 6, 2025
a61144b
Merge branch 'kobi-NavigatorView' of https://github.com/BioAnalyticRe…
bdls-jamal Apr 6, 2025
9840f70
Prettier fixes
bdls-jamal Apr 6, 2025
ae0a792
Merge pull request #156 from BioAnalyticResource/kobi-NavigatorView
bdls-jamal Apr 7, 2025
66d1224
Small fixes to layout and tooltips; major tooltip revamp needed after…
VinLau May 23, 2025
ead82cf
prettier fix
VinLau May 23, 2025
e1c5bfe
Merge branch 'staging' into yonah-InteractionsView
bdls-jamal May 27, 2025
e9be118
add new package lock for build error
VinLau May 29, 2025
da9cc76
Update vite.config.ts to uncomment eslint()
bdls-jamal Jun 26, 2025
6c88e6e
Update .gitignore to remove docker files
bdls-jamal Jun 26, 2025
9221631
Merge pull request #153 from BioAnalyticResource/yonah-InteractionsView
bdls-jamal Jun 26, 2025
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
9 changes: 7 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = {
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error'
'simple-import-sort/exports': 'error',
},
'overrides': [
{
Expand Down Expand Up @@ -55,5 +55,10 @@ module.exports = {
]
}
}
]
],
"settings": {
"react": {
"version": "detect"
}
}
}
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ jobs:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '22.x'
- run: npm ci
- run: npm run build
env:
BASE_URL: '/ePlant'
VITE_MAPS_API_KEY: ${{ secrets.VITE_MAPS_API_KEY }}
11 changes: 5 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,21 @@ jobs:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '22.x'
- run: npm ci
- run: npm run build
env:
BASE_URL: '/ePlant'
VITE_MAPS_API_KEY: ${{ secrets.VITE_MAPS_API_KEY }}
VITE_MAPS_ID: ${{ secrets.VITE_MAPS_ID }}
- run: mv dist _site
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
deploy:
environment:
name: github-pages
Expand All @@ -42,4 +41,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
4 changes: 2 additions & 2 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '20.x'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ dist

# notes files
*-notes.md
.DS_Store
.DS_Store
4 changes: 4 additions & 0 deletions Eplant/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import ExperimentEFP from './views/ExperimentEFP'
import FallbackView from './views/FallbackView'
import GeneInfoView from './views/GeneInfoView'
import GetStartedView from './views/GetStartedView'
import InteractionsViewer from './views/InteractionsViewer'
import NavigatorView from './views/NavigatorViewer'
import PlantEFP from './views/PlantEFP'
import PublicationViewer from './views/PublicationViewer'
import WorldEFP from './views/WorldEFP'
Expand Down Expand Up @@ -35,6 +37,8 @@ const userViews = [
ExperimentEFP,
WorldEFP,
ChromosomeViewer,
InteractionsViewer,
NavigatorView,
]

// List of views that are used to lookup a view by id
Expand Down
2 changes: 1 addition & 1 deletion Eplant/state/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export function atomWithStorage<T>(

// TODO: This should probably be removed
// Atom with storage that doesn't persist when persistAtom is set to false
function atomWithOptionalStorage<T>(
export function atomWithOptionalStorage<T>(
key: string,
initialValue: T,
serialize: (value: T) => string = JSON.stringify,
Expand Down
70 changes: 70 additions & 0 deletions Eplant/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
- [How to create a new `View`](#how-to-create-a-new-view)
- [Steps to Update `config.ts`](#steps-to-update-configts)
- [Example](#example)
- [View Switching Functionality](#view-switching-functionality)
- [Documentation and Commenting Style](#documentation-and-commenting-style)
- [Eslint Code Standards](#eslint-code-standards)
- [Local Testing Requirements](#local-testing-requirements)
- [Eplant2](#eplant2)
- [API](#api)

Expand Down Expand Up @@ -366,6 +370,72 @@ const genericViews = [GetStartedView, FallbackView, NewView]
const views = [...genericViews, ...userViews]
```

#### View Switching Functionality

If your new view has function to swap to a different view and/or gene available on ePlant, you may benefit from the generalized view switching component file (name tbd).

To utilize the component:

1. Import createViewSwitchProvider into your index file and export it:

```
export const ViewSwitchProvider = createViewSwitchProvider();
```

2. Import your exported provider into your view's main component and wrap your component in the view's return statement:

```
const App = () => {
return (
<ViewSwitchProvider>
<YourComponent />
</ViewSwitchProvider>
);
};
```

3. Import and use useViewSwitch in your main component whenever you want to invoke the switching functionality. For example: `switchViewAndGene('Cell eFP', geneName);`

There are 3 main swithing functions you can invoke based on needs.

```
/** Function to switch view only */
switchViewOnly: (viewId: string) => Promise<void>;

/** Function to switch gene only */
switchGeneOnly: (geneName: string, speciesUrl?: string) => Promise<void>;

/** Function to switch both view and gene */
switchViewAndGene: (viewId: string, geneName: string, speciesUrl?: string) => Promise<void>;
```

## Documentation and Commenting Style

It is important to maintain a common standard for commenting code and documentation. If you want to make contributions to the project, we ask that you follow the TSdoc(typescript) commenting style. As an example this includes adding function/class headers and comments as seen below:

```
/**
* Extracts the primary gene identifier from the API URL
*
* @param url - The complete API URL containing query parameters
* @returns The primary gene identifier, or an empty string not found
*
* Uses regex to find the primaryGene parameter in the URL
*/
function extractPrimaryGene(url: string): string {
const match = url.match(/primaryGene=([^&]+)/);
return match ? match[1] : "";
}
```

## ESlint Code Standards

The codebase relies on ESlint to handle automatic checking for issues with the code. With ESlint, you will not need to manually parse all of your code for accurate documentation, imports order, etc. When running ePlant locally in a browser, if there are any outstanding issues, it will be made known to you automatically. A common way to fix any issues without much thought is to run `npx eslint . --fix`. The `.` can be replaced if you do not want to check and fix every file in your current working directory. Documentation issues are not as big of a concern as others and your local site may work as normal, but to keep in line with our standards, please resolve any issues and warnings before making a pull request.

## Local Testing Requirements

To allow ESlint to work, and to run the site locally you are required to install Node.js and NPM on your system. Once installed, you can activate a local connection to the site using `npm run dev` and connecting to the generated web access point.

## Eplant2

https://bar.utoronto.ca/eplant/
Expand Down
5 changes: 5 additions & 0 deletions Eplant/util/ErrorBoundary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ export default class ErrorBoundary extends Component<
this.state = { hasError: false }
}
componentDidCatch(error: Error, info: ErrorInfo) {
console.log(
'Error caught by ErrorBoundary:',
error.message,
info.componentStack
)
this.setState({ hasError: true })
}
render() {
Expand Down
1 change: 0 additions & 1 deletion Eplant/views/ChromosomeViewer/Viewer/GeneInfoPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const GeneInfoPopup: FC<GeneInfoPopupProps> = (props) => {
const geneticElements = useGeneticElements()
const setGeneticElements = useSetGeneticElements()
const theme = useTheme()

useEffect(() => {
if (props.gene != gene) {
setOpen(props.open)
Expand Down
21 changes: 0 additions & 21 deletions Eplant/views/InteractionsViewer/InteractionsView.tsx

This file was deleted.

77 changes: 77 additions & 0 deletions Eplant/views/InteractionsViewer/components/GeneDialog.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import React, { FC, useEffect, useState } from 'react'

import GeneticElement from '@eplant/GeneticElement'
import arabidopsis from '@eplant/Species/arabidopsis'
import {
useActiveGeneId,
useGeneticElements,
useSetGeneticElements,
} from '@eplant/state'
import Box from '@mui/material/Box'
import useTheme from '@mui/material/styles/useTheme'
import Table from '@mui/material/Table'
import TableBody from '@mui/material/TableBody'
import TableCell from '@mui/material/TableCell'
import TableRow from '@mui/material/TableRow'

import { GeneItem } from '../../ChromosomeViewer/types'
interface GeneDialogProps {
gene: GeneItem
}
/** Gene dialog to show gene infomation when hovering over gene node. currently not implemented due to restrictions of cytoscape
* @param {GeneItem} gene GeneItem object to show in table format in the dialog
* */
const GeneDialog: FC<GeneDialogProps> = ({ gene }) => {
// Global State
const [activeGeneId, setActiveGeneId] = useActiveGeneId()
const geneticElements = useGeneticElements()
const setGeneticElements = useSetGeneticElements()
const theme = useTheme()

const handleLoadGeneClick = (event: React.MouseEvent<HTMLElement>) => {
if (gene != null) {
const geneticElement = new GeneticElement(
gene.id,
gene.annotation,
arabidopsis,
gene.aliases
)

setGeneticElements([...geneticElements[0], geneticElement])
setActiveGeneId(gene.id)
}
}

return (
<div
style={{
minWidth: '350px',
maxWidth: '350px',
minHeight: '150px',
maxHeight: '400px',
paddingInline: 2,
paddingBlockStart: 1,
paddingBlockEnd: 2,
border: '2px solid white',
}}
>
{/* GENE INFO TABLE */}
<table>
<tr>
<td className='label'>Identifier</td>
<td>{gene.id}</td>
</tr>
<tr>
<td className='label'>Aliases</td>
<td>{gene.aliases.length > 0 ? gene.aliases : 'N/A'}</td>
</tr>
<tr>
<td className='label'>Annotation</td>
<td>{gene.annotation != '' ? gene.annotation : 'N/A'}</td>
</tr>
</table>
</div>
)
}

export default GeneDialog
51 changes: 51 additions & 0 deletions Eplant/views/InteractionsViewer/components/NumberInput.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import { ChangeEvent } from 'react'

import InputAdornment from '@mui/material/InputAdornment'
import TextField from '@mui/material/TextField'

interface numberInputProps {
label: string
changeFunc: (event: ChangeEvent) => void
prefix?: string
}

/** Number selector for filter dialog
* @param {string} label number selector label
* @param {func} changeFunc function to call on change
* @param {string} prefix prefix to prepend to number
*/
const NumberInput = (props: numberInputProps) => {
return (
<>
<TextField
label={props.label}
size='small'
variant='outlined'
color='secondary'
type='number'
margin='dense'
onChange={(event: ChangeEvent) => {
props.changeFunc(event)
}}
inputProps={{
defaultValue: 0,
step: 0.1,
min: -1,
max: 1,
}}
InputProps={
props.prefix
? {
startAdornment: (
<InputAdornment position='start'>
{props.prefix}
</InputAdornment>
),
}
: {}
}
/>
</>
)
}
export default NumberInput
Loading