Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
david Chavalarias
clinicaltrials
Commits
dda561c3
Commit
dda561c3
authored
Jun 12, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add one level in TW.Clusters to allow metadata alongside the facets inverted index
parent
5a095c4c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
19 deletions
+21
-19
extras_explorerjs.js
extras_explorerjs.js
+12
-11
settings_explorerjs.js
settings_explorerjs.js
+1
-1
Tinaweb.js
tinawebJS/Tinaweb.js
+2
-1
sigma.parseCustom.js
tinawebJS/sigma.parseCustom.js
+5
-5
sigmaUtils.js
tinawebJS/sigmaUtils.js
+1
-1
No files found.
extras_explorerjs.js
View file @
dda561c3
...
@@ -35,11 +35,11 @@ function changeGraphAppearanceByFacets( manualflag ) {
...
@@ -35,11 +35,11 @@ function changeGraphAppearanceByFacets( manualflag ) {
// attribute counts: nb of classes
// attribute counts: nb of classes
// POSS here distinguish [ty][attTitle].classes.length and ranges.length
// POSS here distinguish [ty][attTitle].classes.length and ranges.length
var
attNbClasses
=
TW
.
Clusters
[
ty
][
attTitle
].
length
var
attNbClasses
=
TW
.
Clusters
[
ty
][
attTitle
].
invIdx
.
length
var
attNbNodes
=
currentNbNodes
var
attNbNodes
=
currentNbNodes
if
(
attNbClasses
)
{
if
(
attNbClasses
)
{
let
lastClass
=
TW
.
Clusters
[
ty
][
attTitle
][
attNbClasses
-
1
]
let
lastClass
=
TW
.
Clusters
[
ty
][
attTitle
]
.
invIdx
[
attNbClasses
-
1
]
if
(
lastClass
.
labl
&&
lastClass
.
labl
==
'_non_numeric_'
&&
lastClass
.
nids
)
{
if
(
lastClass
.
labl
&&
lastClass
.
labl
==
'_non_numeric_'
&&
lastClass
.
nids
)
{
if
(
lastClass
.
nids
.
length
)
{
if
(
lastClass
.
nids
.
length
)
{
attNbNodes
-=
lastClass
.
nids
.
length
attNbNodes
-=
lastClass
.
nids
.
length
...
@@ -133,18 +133,18 @@ function RunLouvain() {
...
@@ -133,18 +133,18 @@ function RunLouvain() {
let
nClasses
=
0
let
nClasses
=
0
for
(
let
typ
in
louvainValNids
)
{
for
(
let
typ
in
louvainValNids
)
{
let
revIdx
=
louvainValNids
[
typ
][
"clust_louvain"
][
'map'
]
let
re
in
vIdx
=
louvainValNids
[
typ
][
"clust_louvain"
][
'map'
]
// init a new legend in TW.Clusters
// init a new legend in TW.Clusters
TW
.
Clusters
[
typ
][
'clust_louvain'
]
=
[]
TW
.
Clusters
[
typ
][
'clust_louvain'
]
=
{
'meta'
:{},
'invIdx'
:[]}
for
(
let
entry
in
revIdx
)
{
for
(
let
entry
in
re
in
vIdx
)
{
let
len
=
revIdx
[
entry
].
length
let
len
=
re
in
vIdx
[
entry
].
length
if
(
len
)
{
if
(
len
)
{
TW
.
Clusters
[
typ
][
'clust_louvain'
].
push
({
TW
.
Clusters
[
typ
][
'clust_louvain'
].
invIdx
.
push
({
'labl'
:
`
${
entry
}
(
${
len
}
)`
,
'labl'
:
`
${
entry
}
(
${
len
}
)`
,
'fullLabl'
:
`
${
typ
}
||Louvain||
${
entry
}
(
${
len
}
)`
,
'fullLabl'
:
`
${
typ
}
||Louvain||
${
entry
}
(
${
len
}
)`
,
'nids'
:
revIdx
[
entry
],
'nids'
:
re
in
vIdx
[
entry
],
'val'
:
entry
'val'
:
entry
})
})
nClasses
++
nClasses
++
...
@@ -191,10 +191,11 @@ function SomeEffect( ValueclassCode ) {
...
@@ -191,10 +191,11 @@ function SomeEffect( ValueclassCode ) {
var
activetypesKey
=
getActivetypesKey
()
var
activetypesKey
=
getActivetypesKey
()
// console.log( "\t"+activetypesKey)
// console.log( "\t"+activetypesKey)
// we have our precomputed idmaps for nodes_2_colour
// we have our precomputed idmaps for nodes_2_colour
// -------------------------------------------------
// -------------------------------------------------
for
(
var
k
in
TW
.
Clusters
[
nodeType
][
cluType
][
iClu
].
nids
)
{
for
(
var
k
in
TW
.
Clusters
[
nodeType
][
cluType
]
.
invIdx
[
iClu
].
nids
)
{
var
nid
=
TW
.
Clusters
[
nodeType
][
cluType
][
iClu
].
nids
[
k
]
var
nid
=
TW
.
Clusters
[
nodeType
][
cluType
]
.
invIdx
[
iClu
].
nids
[
k
]
nodes_2_colour
[
nid
]
=
true
nodes_2_colour
[
nid
]
=
true
}
}
...
@@ -280,7 +281,7 @@ function set_ClustersLegend ( daclass, groupedByTicks ) {
...
@@ -280,7 +281,7 @@ function set_ClustersLegend ( daclass, groupedByTicks ) {
LegendDiv
+=
' <div class="legend-scale">'
LegendDiv
+=
' <div class="legend-scale">'
LegendDiv
+=
' <ul class="legend-labels">'
LegendDiv
+=
' <ul class="legend-labels">'
var
legendInfo
=
groupedByTicks
||
TW
.
Clusters
[
curType
][
daclass
]
var
legendInfo
=
groupedByTicks
||
TW
.
Clusters
[
curType
][
daclass
]
.
invIdx
// valueclasses (values or intervals or classes) are already sorted in TW.Clusters
// valueclasses (values or intervals or classes) are already sorted in TW.Clusters
for
(
var
l
in
legendInfo
)
{
for
(
var
l
in
legendInfo
)
{
...
...
settings_explorerjs.js
View file @
dda561c3
...
@@ -294,7 +294,7 @@ TW.conf = (function(TW){
...
@@ -294,7 +294,7 @@ TW.conf = (function(TW){
// show verbose console logs...
// show verbose console logs...
logFetchers
:
false
,
// ...about ajax/fetching of graph data
logFetchers
:
false
,
// ...about ajax/fetching of graph data
logParsers
:
false
,
// ...about parsing said data
logParsers
:
false
,
// ...about parsing said data
logFacets
:
fals
e
,
// ...about parsing node attribute:value facets
logFacets
:
tru
e
,
// ...about parsing node attribute:value facets
logSettings
:
false
,
// ...about settings at Tina and Sigma init time
logSettings
:
false
,
// ...about settings at Tina and Sigma init time
logSelections
:
false
logSelections
:
false
}
}
...
...
tinawebJS/Tinaweb.js
View file @
dda561c3
...
@@ -1028,7 +1028,8 @@ var TinaWebJS = function ( sigmacanvas ) {
...
@@ -1028,7 +1028,8 @@ var TinaWebJS = function ( sigmacanvas ) {
// attributes' facet-options init & handler
// attributes' facet-options init & handler
fillAttrsInForm
()
fillAttrsInForm
(
'choose-attr'
)
fillAttrsInForm
(
'choose-titling-metric'
,
'metric'
)
document
.
getElementById
(
'choose-attr'
).
onchange
=
showAttrConf
document
.
getElementById
(
'choose-attr'
).
onchange
=
showAttrConf
// cancelSelection(false);
// cancelSelection(false);
...
...
tinawebJS/sigma.parseCustom.js
View file @
dda561c3
...
@@ -291,8 +291,8 @@ function facetsBinning (valuesIdx) {
...
@@ -291,8 +291,8 @@ function facetsBinning (valuesIdx) {
// console.warn("all raw vals before binning" valuesIdx[cat][at].vals)
// console.warn("all raw vals before binning" valuesIdx[cat][at].vals)
//
new array of valueclass/interval/bin object
s
//
meta + new array of values/intervals with inverted index to node id
s
facetIdx
[
cat
][
at
]
=
[]
facetIdx
[
cat
][
at
]
=
{
meta
:{},
invIdx
:[]}
// the full array of values of the accepted type
// the full array of values of the accepted type
...
@@ -376,7 +376,7 @@ function facetsBinning (valuesIdx) {
...
@@ -376,7 +376,7 @@ function facetsBinning (valuesIdx) {
for
(
var
pval
in
valuesIdx
[
cat
][
at
].
map
)
{
for
(
var
pval
in
valuesIdx
[
cat
][
at
].
map
)
{
var
idList
=
valuesIdx
[
cat
][
at
].
map
[
pval
]
var
idList
=
valuesIdx
[
cat
][
at
].
map
[
pval
]
facetIdx
[
cat
][
at
].
push
({
facetIdx
[
cat
][
at
].
invIdx
.
push
({
// simple label
// simple label
'labl'
:
`
${
pval
}
(
${
idList
.
length
}
)`
,
'labl'
:
`
${
pval
}
(
${
idList
.
length
}
)`
,
// verbose label
// verbose label
...
@@ -550,12 +550,12 @@ function facetsBinning (valuesIdx) {
...
@@ -550,12 +550,12 @@ function facetsBinning (valuesIdx) {
// save these bins as the cluster index (aka faceting)
// save these bins as the cluster index (aka faceting)
if
(
newTick
.
nids
.
length
)
{
if
(
newTick
.
nids
.
length
)
{
facetIdx
[
cat
][
at
].
push
(
newTick
)
facetIdx
[
cat
][
at
].
invIdx
.
push
(
newTick
)
}
}
}
}
// finally add the 'trash' category with any non_numeric vals
// finally add the 'trash' category with any non_numeric vals
facetIdx
[
cat
][
at
].
push
({
facetIdx
[
cat
][
at
].
invIdx
.
push
({
'labl'
:
'_non_numeric_'
,
'labl'
:
'_non_numeric_'
,
'fullLabl'
:
'`${cat}||${at}||_non_numeric_'
,
'fullLabl'
:
'`${cat}||${at}||_non_numeric_'
,
'nids'
:
valuesIdx
[
cat
][
at
].
map
[
'_non_numeric_'
],
'nids'
:
valuesIdx
[
cat
][
at
].
map
[
'_non_numeric_'
],
...
...
tinawebJS/sigmaUtils.js
View file @
dda561c3
...
@@ -803,7 +803,7 @@ function heatmapColoring(daclass) {
...
@@ -803,7 +803,7 @@ function heatmapColoring(daclass) {
var
ty
=
actypes
[
0
]
var
ty
=
actypes
[
0
]
// our binning
// our binning
var
tickThresholds
=
TW
.
Clusters
[
ty
][
daclass
]
var
tickThresholds
=
TW
.
Clusters
[
ty
][
daclass
]
.
invIdx
// verifications
// verifications
if
(
tickThresholds
.
length
-
1
!=
nColors
)
{
if
(
tickThresholds
.
length
-
1
!=
nColors
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment