Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
plugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Cosy-Bio
Drugst.One
plugin
Commits
c13a1569
Commit
c13a1569
authored
3 years ago
by
AndiMajore
Browse files
Options
Downloads
Patches
Plain Diff
fixed lodash warning message
parent
53e84a1d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
angular.json
+3
-0
3 additions, 0 deletions
angular.json
src/app/main-network.ts
+13
-13
13 additions, 13 deletions
src/app/main-network.ts
src/app/network-settings.ts
+3
-3
3 additions, 3 deletions
src/app/network-settings.ts
with
19 additions
and
16 deletions
angular.json
+
3
−
0
View file @
c13a1569
...
...
@@ -23,6 +23,9 @@
"externals"
:
"replace"
}
},
"allowedCommonJsDependencies"
:
[
"lodash"
],
"outputPath"
:
"dist/netex"
,
"index"
:
"src/index.html"
,
"main"
:
"src/main.ts"
,
...
...
This diff is collapsed.
Click to expand it.
src/app/main-network.ts
+
13
−
13
View file @
c13a1569
import
{
defaultConfig
,
IConfig
}
from
'
./config
'
;
import
{
NodeInteraction
,
Node
,
getProteinNodeId
,
NetexInteraction
}
from
'
./interfaces
'
;
import
*
as
merge
from
'
lodash/fp/merge
'
;
import
*
as
merge
from
'
lodash/fp/merge
'
;
export
function
getDatasetFilename
(
dataset
:
Array
<
[
string
,
string
]
>
):
string
{
return
`network-
${
JSON
.
stringify
(
dataset
).
replace
(
/
[\[\]\"
,
]
/g
,
''
)}
.json`
;
...
...
@@ -66,10 +66,10 @@ export class ProteinNetwork {
/** Maps user input node to network node object
* If user input node has no group, fall back to default
* If user input node has group that is not defined, throw error
*
* @param customNode
* @param config
* @returns
*
* @param customNode
* @param config
* @returns
*/
export
function
mapCustomNode
(
customNode
:
any
,
config
:
IConfig
):
Node
{
let
node
;
...
...
@@ -94,10 +94,10 @@ export class ProteinNetwork {
/** Maps user input edge to network edge object
* If user input edge has no group, fall back to default
* If user input edge has group that is not defined, throw error
*
* @param customEdge
* @param config
* @returns
*
* @param customEdge
* @param config
* @returns
*/
export
function
mapCustomEdge
(
customEdge
:
NodeInteraction
,
config
:
IConfig
):
any
{
let
edge
;
...
...
@@ -120,10 +120,10 @@ export function mapCustomEdge(customEdge: NodeInteraction, config: IConfig): any
/** Maps netex retrieved edge to network edge object
* Uses the default group for edge objects.
*
* @param customEdge
* @param config
* @returns
*
* @param customEdge
* @param config
* @returns
*/
export
function
mapNetexEdge
(
customEdge
:
NetexInteraction
,
config
:
IConfig
):
any
{
const
edge
=
JSON
.
parse
(
JSON
.
stringify
(
config
.
edgeGroups
.
default
));
...
...
This diff is collapsed.
Click to expand it.
src/app/network-settings.ts
+
3
−
3
View file @
c13a1569
...
...
@@ -3,7 +3,7 @@ import {
Node
,
}
from
'
./interfaces
'
;
import
{
IConfig
,
defaultConfig
}
from
'
./config
'
;
import
*
as
merge
from
'
lodash/fp/merge
'
;
import
*
as
merge
from
'
lodash/fp/merge
'
;
export
class
NetworkSettings
{
...
...
@@ -92,7 +92,7 @@ export class NetworkSettings {
static
getColor
(
color
:
'
protein
'
|
'
approvedDrug
'
|
'
unapprovedDrug
'
|
'
hostFont
'
|
'
drugFont
'
|
'
nonSeedHost
'
|
'
selectedForAnalysis
'
|
'
selectedForAnalysisText
'
|
'
edgeHostDrug
'
|
'
edgeHostDrugHighlight
'
|
'
edgeGeneGene
'
|
'
edgeGeneGeneHighlight
'
)
'
edgeHostDrug
'
|
'
edgeHostDrugHighlight
'
|
'
edgeGeneGene
'
|
'
edgeGeneGeneHighlight
'
)
/**
* Collection of all colors per use-case
*/
...
...
@@ -134,7 +134,7 @@ export class NetworkSettings {
}
else
{
node
=
merge
(
node
,
config
.
nodeGroups
[
node
.
group
]);
}
// note that seed and selected node style are applied after the node style is fetched.
// note that seed and selected node style are applied after the node style is fetched.
// this allows to overwrite only attributes of interest, therefor in e.g. seedNode group
// certain attributes like shape can remain undefined
// use lodash merge to not lose deep attributes, e.g. "font.size"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment