-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
183 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export(metanetwork) | ||
export(run_metanetwork_app) | ||
importFrom(shiny,runApp) | ||
importFrom(utils,globalVariables) |
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,6 @@ | ||
#' Function to run the shiny app to generate the figure | ||
#' | ||
#' @export | ||
run_metanetwork_app <- function() { | ||
shiny::runApp(fs::path_package("metanetwork", "app")) | ||
} |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# internals | ||
#' @importFrom utils globalVariables | ||
#' @importFrom shiny runApp | ||
#' @noRd | ||
#' | ||
NULL | ||
|
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 |
---|---|---|
@@ -1,3 +1,37 @@ | ||
# metanetwork | ||
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) | ||
|
||
|
||
Package to generate circular hierarchical edge bundling graphs to represent metanetworks | ||
|
||
|
||
# Installation | ||
|
||
Package must be installed from GitHub. | ||
|
||
```R | ||
install.packages("remotes") | ||
remotes::install_github("inSilecoInc/metanetwork") | ||
``` | ||
|
||
# How to | ||
|
||
## Generate the example | ||
|
||
```R | ||
library("metanetwork") | ||
metanetwork( | ||
metanetwork:::nodes, | ||
metanetwork:::links, | ||
focus = c("Species", "Drivers", "Managers"), | ||
legend = FALSE, | ||
export = FALSE | ||
) | ||
``` | ||
|
||
## Shiny App | ||
|
||
```R | ||
library("metanetwork") | ||
run_metanetwork_app() | ||
``` |
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,3 @@ | ||
library(dplyr) | ||
library(metanetwork) | ||
|
||
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,5 @@ | ||
server <- function(input, output, session) { | ||
# INPUTS | ||
r <- reactiveValues() | ||
Check warning on line 3 in inst/app/server.R GitHub Actions / ubuntu-22.04 (release)
|
||
|
||
} |
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,55 @@ | ||
ui <- fluidPage( | ||
tags$head( | ||
tags$link(rel = "stylesheet", type = "text/css", href = "extra.css") | ||
), | ||
|
||
# Application title | ||
titlePanel("", "metanetwork"), | ||
|
||
# | ||
sidebarLayout( | ||
sidebarPanel( | ||
# Title | ||
h3(div("inSileco Metanetwork App")), | ||
|
||
# Panels | ||
tabsetPanel( | ||
id = "slc_mode", | ||
tabsetPanel( | ||
id = "params", | ||
# INPUT UIs | ||
tabPanel("params", | ||
icon = icon("user-check"), | ||
numericInput("line_witdh", "Line width", value = 1, step = 0.05) | ||
) | ||
) | ||
), | ||
hr(), | ||
# FOOTER | ||
HTML( | ||
paste0( | ||
"<div id='footer_left'><a href='https://insilecoinc.github.io/' target='_blank'><img src='img/insileco_logo256.png' alt='inSileco logo' width = '100%'/></a></div><div id='footer_right'><h5>This shiny app was built by <a href='https://insilecoinc.github.io/' target='_blank'>inSileco</a> with the ", | ||
a("R package shiny", | ||
href = "https://shiny.rstudio.com/", | ||
target = "_blank" | ||
), ", the source code is available on " | ||
) | ||
), | ||
a(icon("github"), | ||
href = "https://github.com/inSilecoInc/metanetwork", target = "_blank" | ||
), | ||
HTML(".</h5></div>") | ||
), | ||
|
||
# RIGHT PANEL | ||
mainPanel( | ||
tabsetPanel( | ||
id = "view_tabs", | ||
tabPanel( | ||
"Figure", | ||
icon = icon("chart-bar") | ||
) | ||
) | ||
) | ||
) | ||
) | ||
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,3 @@ | ||
*.html | ||
*.md | ||
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,60 @@ | ||
#map-map { | ||
height : 90vh !important; | ||
} | ||
|
||
#file_report { | ||
color: #337ab7; | ||
} | ||
|
||
.pending{ | ||
color: #ccc; | ||
font-size: 1.1em; | ||
} | ||
|
||
.green { | ||
color: #34c369; | ||
} | ||
|
||
.red { | ||
color: #f03561; | ||
} | ||
|
||
.blue { | ||
color: #399ad0; | ||
} | ||
|
||
.tbl_preview { | ||
padding: 4px; | ||
background-color: #eee; | ||
border: 1px solid #aaa; | ||
border-radius: 4px; | ||
} | ||
|
||
#report_html { | ||
max-height: 900px!important; | ||
} | ||
|
||
#iframe_report { | ||
height: 90vh; | ||
} | ||
|
||
#footer { | ||
width: 100%; | ||
} | ||
|
||
#footer_left { | ||
width: 16%; | ||
display:inline-table; | ||
} | ||
|
||
#footer_right { | ||
width: 84%; | ||
display:inline-table; | ||
text-align: center; | ||
} | ||
|
||
.shiny-notification { | ||
position:fixed; | ||
top: calc(85%); | ||
left: calc(10%); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.