Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Grifs committed Jun 7, 2022
2 parents 2ce5869 + 84c4e54 commit 3e3d8c6
Show file tree
Hide file tree
Showing 45 changed files with 4,096 additions and 412 deletions.
58 changes: 55 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,70 @@
# CHANGELOG

## Version 5.3.0

### Functionality

- Add filters to the sample selection component

## Version 5.2.0

### Functionality

- Add exporting of report in Markdown format
- Add browser access to restarting the API
- Display tooltip for clipboard and download buttons in export menu

### Other

- Filter functionality made dynamic so that new filter groups can be added as needed
- Improve sturdiness against invalid input
- Filter a-link references on 'do-not-route' before sending to the router

### Deployment changes

- Requires extra translations for each filter type in `deployments.json`

## Version 5.1.0

### Functionality

- URL Queries: ComPass accepts URL queries and runs the complete analysis automatically. For instance, the following URI:

```
http://localhost:3000/disease?autorun&signature=HSPA1A+DNAJB1+DDIT4+-TSEN2&numTableHead=10
```

will run the Disease workflow using the signature `HSPA1A DNAJB1 DDIT4` and will show 10 entries for the top table.

- Export: Add buttons to export data and plots to a file or copy it to the clipboard. A popup window is available with all the possible export features on the right bottom of the screen.

- Correlation workflow has filters.

- Sample tables can be sorted by clicking the columns header

### Other

- Ghost mode has been improved, it no longer requires explicit timings in the scenarios
- Moved scss files from `src/js` to `src/sass`, so any alternative versions of e.g. `_variables.scss` or `_main.custom.scss` should now be placed in the new folder

## Version 5.0.2

- Fix mistake in sample selection column truncation code

## Version 5.0.0-alpha4
## Version 5.0.1

- The head and tail tables use pictures to display the treatment type
- Adapt the behaviour for the autocomplete when there is only one option to choose from and if the entered value matches the single autocomplete value

## Version 5.0.0

## Functionality
### Functionality

- A new 'Genetic' workflow is created useful for searching for genetic perturbations.
- Inverting the filter selection can be done using the `ALT` (Option on Mac) modifier key instead of the `a` key
- Filter values are populated dynamically based on the data available through the API

## Other
### Other

- The dependency stack has been cleaned and (partly) updated
- Cycle dependencies have been updated to the latest versions except for `@cycle/state`.
Expand Down
65 changes: 50 additions & 15 deletions deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
"services": {
"filter": {
"values": {
"dose": ["sample_entry"],
"cell": ["sample_entry"],
"trtType": ["sample_entry"]
}
},
"common": {
Expand All @@ -22,22 +19,41 @@
},
"ghost": {
"compound": {
"treatment": "BRD-K93645900",
"index": 0,
"sample": ["A375_6H_BRD_K93645900_10"],
"signature": "-CRCP"
"params": {
"typer": 500,
"treatment": "BRD-K93645900",
"samples": "A375_6H_BRD_K93645900_10",
"trtType": "trt_cp"
}
},
"ligand": {
"treatment": "ANGPT1",
"index": 0,
"sample": ["HCC515_4H_CMAP_CYT_SRP3007_50"],
"signature": "FBXO11 SLC35 F5BAG4 RIF1"
"params": {
"typer": 500,
"treatment": "ANGPT1",
"samples": "HCC515_4H_CMAP_CYT_SRP3007_50",
"trtType": "trt_cp"
}
},
"genetic": {
"treatment": "PARP2",
"index": 0,
"sample": ["DER001_HCC515_96H_X1_F1B6_DUO52HI53LO:B03"],
"signature": "-COPS7A -KEAP1 -CCNB1 -HMG20B -ELOVL6 -DERA LPL -PLEKHJ1 -TPI1 ST3GAL5 -HAT1 -MLF2 -FOXG1 -STRAP -MRPL4 -EDN1 -PON2 KMT2A FRMD4A -C16orf58"
"params": {
"typer": 500,
"treatment": "PARP2",
"samples": "DER001_HCC515_96H_X1_F1B6_DUO52HI53LO",
"trtType": "trt_cp"
}
},
"disease": {
"params": {
"typer": 100,
"signature": "HSPA1A DNAJB1 DDIT4 -TSEN2"
}
},
"correlation": {
"params": {
"typer": 100,
"signature1": "HSPA1A DNAJB1 DDIT4 -TSEN2",
"signature2": "DNAJB1 DDIT4 -TSEN2"
}
}
},
"modelTranslations": [
Expand All @@ -50,6 +66,21 @@
"ui": "Secondary ID",
"model": "jnjb",
"comment": ""
},
{
"ui": "Cell",
"model": "cell",
"comment": "Filter group name"
},
{
"ui": "Dose",
"model": "dose",
"comment": "Filter group name"
},
{
"ui": "Type",
"model": "trtType",
"comment": "Filter group name"
}
]
},
Expand All @@ -59,6 +90,10 @@
"api": {
"url": "http://localhost:8090/jobs?context=luciusapi&appName=luciusapi&sync=true&timeout=30"
},
"init": {
"url": "http://localhost:8090/",
"contextOptions": "context-factory=spark.jobserver.context.SessionContextFactory&spark.scheduler.mode=FAIR&spark.jobserver.context-creation-timeout=60&spark.memory.fraction=0.7&spark.dynamicAllocation.enabled=false&spark.executor.instances=6&spark.executor.cores=4&spark.executor.memory=4g&spark.yarn.executor.memoryOverhead=2g&spark.yarn.am.memory=4G&spark.driver.memory=4G"
},
"sourire": {
"url": "http://localhost:9999/molecule/"
},
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="UTF-8">
<title>ComPass v4</title>
<title>ComPass v5</title>
<link rel="shortcut icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Roboto:400" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300" rel="stylesheet">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "LuciusWeb",
"version": "5.0.2",
"version": "5.3.0",
"description": "Web interface for ComPass aka Lucius",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/BinnedPlots/BinnedPlots.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const isEmptyState = (state) => {

// For this component, when is a API result empty?
const isEmptyData = (data) => {
return data.length == 0
return data == undefined || data.length == 0
}

const makeVega = (elementID) => {
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/BinnedPlots/CorrelationPlot.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const isEmptyState = (state) => {

// For this component, when is a API result empty?
const isEmptyData = (data) => {
return data.length == 0
return data == undefined || data.length == 0
}

const makeVega = (elementID) => {
Expand Down
50 changes: 45 additions & 5 deletions src/js/components/CorrelationForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ENTER_KEYCODE } from '../utils/keycodes.js'
import { SignatureCheck, checkLens1, checkLens2 } from '../components/SignatureCheck'
import dropRepeats from 'xstream/extra/dropRepeats'
import { loggerFactory } from '../utils/logger'
import { typer } from '../utils/searchUtils'

const stateTemplate = {
form: {
Expand All @@ -21,8 +22,29 @@ const stateTemplate = {

// Granular access to global state and parts of settings
const formLens = {
get: state => ({ core: state.form, settings: { form: state.settings.form, api: state.settings.api } }),
set: (state, childState) => ({ ...state, form: childState.core })
get: state => ({
core: state.form,
settings: {
form: state.settings.form,
api: state.settings.api
},
search1: state.routerInformation.params?.signature1,
search2: state.routerInformation.params?.signature2,
searchAutoRun: state.routerInformation.params?.autorun,
searchTyper: state.routerInformation.params?.typer,
}),
set: (state, childState) => ({
...state,
form: childState.core,
routerInformation: {
...state.routerInformation,
pageState: {
...state.routerInformation.pageState,
signature1: childState.core.query1,
signature2: childState.core.query2,
}
}
})
};

function CorrelationForm(sources) {
Expand Down Expand Up @@ -79,15 +101,20 @@ function CorrelationForm(sources) {
});

// Update in query, or simply ENTER
const typer1$ = typer(state$, 'search1', 'searchTyper')
const newQuery1$ = xs.merge(
sources.DOM.select('.Query1').events('input').map(ev => ev.target.value),
// Ghost
state$.map(state => state.core.query1).compose(dropRepeats())
state$.map(state => state.core.query1).compose(dropRepeats()),
typer1$,
)

const typer2$ = typer(state$, 'search2', 'searchTyper')
const newQuery2$ = xs.merge(
sources.DOM.select('.Query2').events('input').map(ev => ev.target.value),
// Ghost
state$.map(state => state.core.query2).compose(dropRepeats())
state$.map(state => state.core.query2).compose(dropRepeats()),
typer2$,
)

// Updated state is propagated and picked up by the necessary components
Expand Down Expand Up @@ -187,12 +214,25 @@ function CorrelationForm(sources) {
const childReducer1$ = signatureCheck1.onion
const childReducer2$ = signatureCheck2.onion

// Auto start query
// Only run once, even if query is changed and then reverted to original value
const searchAutoRun$ = state$
.filter(
(state) => state.searchAutoRun == "" || state.searchAutoRun == "yes"
)
.filter((state) => state.search1 == state.core.query1 && state.search2 == state.core.query2)
.filter((state) => state.core.validated1 == true && state.core.validated2 == true)
.mapTo(true)
.compose(dropRepeats(equals))


// When GO clicked or enter -> send updated 'value' to sink
// Maybe catch when no valid query?
const query$ = xs.merge(
update$,
// Ghost mode
sources.onion.state$.map(state => state.core.ghost).filter(ghost => ghost).compose(dropRepeats())
sources.onion.state$.map(state => state.core.ghost).filter(ghost => ghost).compose(dropRepeats()),
searchAutoRun$,
)
.compose(sampleCombine(state$))
.map(([update, state]) => ({query1: state.core.query1, query2: state.core.query2}))
Expand Down
Loading

0 comments on commit 3e3d8c6

Please sign in to comment.