-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more logic to filter, created FilterDialog.tsx
- Loading branch information
Showing
5 changed files
with
286 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import { FC, useState } from 'react' | ||
|
||
import { ListItemText, ListSubheader, Switch } from '@mui/material' | ||
import Box from '@mui/material/Box' | ||
import List from '@mui/material/List' | ||
import ListItem from '@mui/material/ListItem' | ||
|
||
export const FilterDialog: FC = () => { | ||
const [EPPICorrValue, setEPPICorrValue] = useState<number>() | ||
const [PPPICorrValue, setPPPICorrValue] = useState<number>() | ||
const [PPPIConfValue, setPPPIConfValue] = useState<number>() | ||
const [PPDIConfValue, setPPDIConfValue] = useState<number>() | ||
const selectors = { | ||
EPPISelector: '[type = "PPI"][method = "E"]', // checkbox | ||
corrSelector: '[correlation <= ', // eppi-correlation spinner + checkbox | ||
PPPISelector: '[type = "PPI"][method = "P"]', // checkbox | ||
interConfSelector: '[interolog_conf <=', // PPPI correlation | ||
EPDISelector: '[type = "PDI"][method = "E"]', | ||
PPDISelector: '[type = "PDI"][method = "P"]', | ||
fimoConfSelector: '[fimo_conf >= ', | ||
} | ||
|
||
const applyFilters = () => { | ||
// Create selectors | ||
const eppiCorr = | ||
selectors.EPPISelector + selectors.corrSelector + EPPICorrValue + ']' | ||
const pppiCorr = | ||
selectors.PPPISelector + selectors.corrSelector + PPPICorrValue + ']' | ||
const pppiConf = | ||
selectors.PPPISelector + selectors.interConfSelector + PPPIConfValue + ']' | ||
const ppdiConf = | ||
selectors.PPDISelector + selectors.fimoConfSelector + PPDIConfValue + ']' | ||
} | ||
|
||
return ( | ||
<Box> | ||
<List | ||
sx={(theme) => ({ | ||
maxWidth: 360, | ||
bgcolor: theme.palette.background.default, | ||
})} | ||
subheader={<ListSubheader>Filter Interactions</ListSubheader>} | ||
> | ||
<ListItem> | ||
<ListItemText | ||
id='filter-option-1' | ||
primary='Hide ALL experimentally determined Protein-Protein interactions' | ||
/> | ||
<Switch edge='end' onChange={() => {}} checked={false} /> | ||
</ListItem> | ||
<ListItem> | ||
<ListItemText | ||
id='filter-option-2' | ||
primary='Hide only with correlation less than: 0.5 ' | ||
/> | ||
<Switch edge='end' onChange={() => {}} checked={false} /> | ||
</ListItem> | ||
<ListItem> | ||
<ListItemText | ||
id='filter-option-3' | ||
primary='Hide ALL predicted | ||
Protein-Protein interactions Hide only with correlation less than: | ||
0.5' | ||
/> | ||
<Switch edge='end' onChange={() => {}} checked={false} /> | ||
</ListItem> | ||
<ListItem> | ||
<ListItemText | ||
id='filter-option-4' | ||
primary='Hide only with confidence less than 2' | ||
/> | ||
<Switch edge='end' onChange={() => {}} checked={false} /> | ||
</ListItem> | ||
<ListItem> | ||
<ListItemText | ||
id='filter-option-5' | ||
primary='Hide only with confidence less than 2' | ||
/> | ||
<Switch edge='end' onChange={() => {}} checked={false} /> | ||
</ListItem> | ||
</List> | ||
</Box> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
const styles: any = [ | ||
{ | ||
selector: 'node', | ||
style: { | ||
'text-background-shape': 'roundrectangle', | ||
'text-background-color': 'white', | ||
'text-background-opacity': 0.9, | ||
'background-color': '#f4f4f4', | ||
'font-size': '11px', | ||
//'font-weight': 'bold', | ||
'text-halign': 'center', | ||
'border-width': '0px', | ||
//'width': 'auto', | ||
'text-background-padding': '2px', | ||
}, | ||
}, | ||
{ | ||
selector: '.compound-top', | ||
style: { | ||
shape: 'roundrectangle', | ||
'background-color': '#F3F3F3', | ||
'text-background-color': 'white', | ||
'text-wrap': 'wrap', | ||
width: '300px', | ||
color: '#000', | ||
'font-size': '10px', | ||
'font-weight': 'bold', | ||
'text-outline-width': '0px', | ||
'text-valign': 'top', | ||
}, | ||
}, | ||
{ | ||
selector: '#COMPOUND_DNA', | ||
style: { | ||
'background-opacity': '0', | ||
'text-background-opacity': '1', | ||
label: 'Protein-DNA\nInteractions', | ||
}, | ||
}, | ||
{ | ||
selector: '#COMPOUND_PROTEIN', | ||
style: { | ||
'background-opacity': '0', | ||
'text-background-opacity': '1', | ||
label: 'Protein-Protein\nInteractions', | ||
}, | ||
}, | ||
{ | ||
selector: '.protein-compound', | ||
style: { | ||
'background-opacity': 0, | ||
events: 'no', | ||
}, | ||
}, | ||
{ | ||
selector: '.protein-back[borderWidth]', | ||
style: { | ||
height: 'data(height)', | ||
width: 'data(width)', | ||
'pie-size': '100%', | ||
'pie-1-background-color': 'data(pie1Colour)', | ||
'pie-1-background-size': 'data(pie1Size)', | ||
'pie-1-background-opacity': 1, | ||
'pie-2-background-color': 'data(pie2Colour)', | ||
'pie-2-background-size': 'data(pie2Size)', | ||
'pie-2-background-opacity': 1, | ||
'pie-3-background-color': 'data(pie3Colour)', | ||
'pie-3-background-size': 'data(pie3Size)', | ||
'pie-3-background-opacity': 1, | ||
'pie-4-background-color': 'data(pie4Colour)', | ||
'pie-4-background-size': 'data(pie4Size)', | ||
'pie-4-background-opacity': 1, | ||
'border-width': 'data(borderWidth)', | ||
'border-color': '#99CC00', | ||
events: 'no', | ||
}, | ||
}, | ||
{ | ||
selector: '.protein-node', | ||
style: { | ||
height: '36px', | ||
width: '36px', | ||
padding: '3px 3px 3px 3px', | ||
'text-valign': 'center', | ||
content: 'data(content)', | ||
events: 'yes', | ||
'z-index': 10, | ||
}, | ||
}, | ||
{ | ||
selector: '[id $= "QUERY_BACK"]', | ||
style: { | ||
height: '60px', | ||
width: '60px', | ||
}, | ||
}, | ||
{ | ||
selector: '[id $= "QUERY_NODE"]', | ||
style: { | ||
height: '48px', | ||
width: '48px', | ||
'font-size': '11px', | ||
'z-index': 10000000, | ||
}, | ||
}, | ||
{ | ||
selector: '.dna-node', | ||
style: { | ||
shape: 'square', | ||
width: '34px', | ||
height: '34px', | ||
'border-width': '4px', | ||
padding: '3px 3px 3px 3px', | ||
'border-color': '#030303', | ||
'text-valign': 'center', | ||
content: 'data(content)', | ||
'z-index': 10, | ||
}, | ||
}, | ||
{ | ||
selector: 'edge', | ||
style: { | ||
width: 'data(size)', | ||
'line-style': 'data(lineStyle)', | ||
'line-color': 'data(lineColor)', | ||
'control-point-distance': '50px', | ||
'control-point-weight': '0.5', | ||
}, | ||
}, | ||
{ | ||
selector: '.protein-edge', | ||
style: { | ||
'curve-style': 'bezier', | ||
'mid-target-arrow-shape': 'none', | ||
}, | ||
}, | ||
{ | ||
selector: '.dna-edge', | ||
style: { | ||
'curve-style': 'unbundled-bezier', | ||
'mid-target-arrow-shape': 'triangle', | ||
'mid-target-arrow-color': 'data(lineColor)', | ||
}, | ||
}, | ||
{ | ||
selector: '.chr-edge', | ||
style: { | ||
'curve-style': 'unbundled-bezier', | ||
'mid-target-arrow-shape': 'triangle', | ||
'mid-target-arrow-color': 'data(arrowColor)', | ||
'control-point-distance': '50px', | ||
'control-point-weight': '0.5', | ||
}, | ||
}, | ||
{ | ||
selector: '.loaded', | ||
style: { | ||
'background-color': '#3C3C3C', | ||
'text-background-color': '#3C3C3C', | ||
color: '#FFFFFF', | ||
}, | ||
}, | ||
{ | ||
selector: '#noInteractionLabel', | ||
style: { | ||
shape: 'circle', | ||
content: 'No interactions found for this gene.', | ||
width: '1px', | ||
height: '1px', | ||
color: '#000', | ||
'text-background-opacity': '0', | ||
'font-size': 15, | ||
}, | ||
}, | ||
] | ||
export default styles |
Oops, something went wrong.