This example plots the co-occurrence data embeded in a sparse matrix. The data is obtained from a disease co-occurrence anaysis on pubmed articles that are related to Epilepsy. For more details see PubMedMiner.jl
using JLD
top_coo_sp, top_mesh_labels = jldopen("chord_data.jld", "r") do file
read(file, "top_coo_sp", "top_mesh_labels")
end
display(top_coo_sp)
display(top_mesh_labels)
49×49 SparseMatrixCSC{Int64,Int64} with 2187 stored entries: [1 , 1] = 2455 [2 , 1] = 255 [3 , 1] = 156 [4 , 1] = 39 [5 , 1] = 298 [6 , 1] = 28 [7 , 1] = 38 [8 , 1] = 46 [9 , 1] = 51 [10, 1] = 62 ⋮ [37, 49] = 2 [39, 49] = 12 [40, 49] = 1 [41, 49] = 4 [43, 49] = 14 [44, 49] = 11 [45, 49] = 2 [46, 49] = 2 [47, 49] = 1 [48, 49] = 1 [49, 49] = 292
49-element Array{String,1}: "Intellectual Disability" "Mental Disorders" "Brain Diseases" "Brain Neoplasms" "Syndrome" "Epilepsy, Temporal Lobe" "Epilepsies, Partial" "Pregnancy Complications" "Cognition Disorders" "Epilepsy, Absence" "Epilepsy, Tonic-Clonic" "Schizophrenia" "Psychotic Disorders" ⋮ "Dementia" "Depressive Disorder" "Acute Disease" "Learning Disorders" "Malformations of Cortical Development" "Neurotic Disorders" "Personality Disorders" "Bipolar Disorder" "Hydrocephalus" "Memory Disorders" "Attention Deficit Disorder with Hyperactivity" "Psychophysiologic Disorders"
using PlotlyJSFactory
using PlotlyJS
p = create_chord_plot(top_coo_sp, labels = top_mesh_labels)
relayout!(p, title="Co-occurrances between top 50 MeSH terms")
JupyterPlot(p)
Plotly javascript loaded.
To load again call
init_notebook(true)
WARNING: Method definition (::Type{PlotlyJS.SyncPlot{TD} where TD<:PlotlyJS.AbstractPlotlyDisplay})(PlotlyJS.Plot{TT} where TT<:PlotlyJS.AbstractTrace) in module PlotlyJS at /Users/isa/.julia/v0.6/PlotlyJS/src/display.jl:136 overwritten at /Users/isa/.julia/v0.6/PlotlyJS/src/displays/ijulia.jl:187.