Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
migale
affiliationExplorer
Commits
a6ca07f6
Commit
a6ca07f6
authored
Feb 24, 2020
by
mahendra-mariadassou
Browse files
Various fixes
parent
0469ca5b
Changes
1
Show whitespace changes
Inline
Side-by-side
R/app_server.R
View file @
a6ca07f6
#' @import shiny
#' @importFrom DT renderDT editData
#' @importFrom phyloseq tax_table
#' @importFrom phyloseq tax_table
taxa_names taxa_sums
#' @importFrom phyloseq.extended write_phyloseq
#' @importFrom shinyjs hide show
#' @importFrom dplyr distinct
#' @importFrom tidyverse stringr
app_server
<-
function
(
input
,
output
,
session
)
{
# Load package data in the session (for testing purpose)
# data("physeq", package = "affiliationExplorer")
...
...
@@ -59,11 +58,13 @@ app_server <- function(input, output, session) {
select
=
"#table"
,
where
=
"afterEnd"
,
ui
=
checkboxInput
(
"seq"
,
label
=
"Sequence
display
"
,
label
=
"S
how s
equence"
,
value
=
FALSE
)
)
### Page 1 UI elements -----------------------------------------------
observeEvent
(
input
$
asv
,
{
# Extract Affiliation for a given OTU
data
$
affi
<-
extract_affiliation
(
affi
,
input
$
asv
)
...
...
@@ -103,7 +104,7 @@ app_server <- function(input, output, session) {
## Allow manual corrections
observeEvent
(
input
$
table_cell_edit
,
{
data
$
affi
<<-
DT
::
editData
(
data
$
affi
,
input
$
table_cell_edit
,
"table"
)
data
$
affi
[,]
<<-
DT
::
editData
(
data
$
affi
,
input
$
table_cell_edit
,
"table"
)
})
## Replace affiliation upon confirmation
...
...
@@ -118,6 +119,10 @@ app_server <- function(input, output, session) {
choices
=
data
$
amb_otus
,
selected
=
data
$
amb_otus
[
1
]
)
}
else
{
output
$
selection
<-
renderUI
({
HTML
(
paste
(
"Choose an affiliation before clicking on the \"Update ASV\" button"
))
})
}
}
)
...
...
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