mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 11:17:24 +01:00
preset editor: Remove species slider
This commit is contained in:
parent
2926bb4da0
commit
0d1070cc19
1 changed files with 9 additions and 29 deletions
|
|
@ -35,14 +35,6 @@ preset_editor_ui <- function(id) {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
sliderInput(
|
|
||||||
NS(id, "n_species"),
|
|
||||||
"Required number of species per gene",
|
|
||||||
min = 0,
|
|
||||||
max = 18,
|
|
||||||
step = 1,
|
|
||||||
value = 10
|
|
||||||
),
|
|
||||||
selectInput(
|
selectInput(
|
||||||
NS(id, "reference_genes"),
|
NS(id, "reference_genes"),
|
||||||
"Reference genes",
|
"Reference genes",
|
||||||
|
|
@ -97,7 +89,6 @@ preset_editor_server <- function(id) {
|
||||||
methods = method_ids,
|
methods = method_ids,
|
||||||
species_ids = species[replicative == TRUE, id],
|
species_ids = species[replicative == TRUE, id],
|
||||||
gene_ids = genes$id,
|
gene_ids = genes$id,
|
||||||
min_n_species = 10,
|
|
||||||
reference_gene_ids = genes[suggested | verified == TRUE, id]
|
reference_gene_ids = genes[suggested | verified == TRUE, id]
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
@ -117,24 +108,6 @@ preset_editor_server <- function(id) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
species_ids <- reactive({
|
|
||||||
if (input$species == "replicative") {
|
|
||||||
species[replicative == TRUE, id]
|
|
||||||
} else if (input$species == "all") {
|
|
||||||
species$id
|
|
||||||
} else {
|
|
||||||
input$custom_species
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
observeEvent(species_ids(), {
|
|
||||||
updateSliderInput(
|
|
||||||
session,
|
|
||||||
"n_species",
|
|
||||||
max = length(species_ids())
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
observeEvent(input$reference_genes, {
|
observeEvent(input$reference_genes, {
|
||||||
if (input$reference_genes == "custom") {
|
if (input$reference_genes == "custom") {
|
||||||
updateTabsetPanel(
|
updateTabsetPanel(
|
||||||
|
|
@ -152,6 +125,14 @@ preset_editor_server <- function(id) {
|
||||||
})
|
})
|
||||||
|
|
||||||
new_preset <- reactive({
|
new_preset <- reactive({
|
||||||
|
species_ids <- if (input$species == "replicative") {
|
||||||
|
species[replicative == TRUE, id]
|
||||||
|
} else if (input$species == "all") {
|
||||||
|
species$id
|
||||||
|
} else {
|
||||||
|
input$custom_species
|
||||||
|
}
|
||||||
|
|
||||||
reference_gene_ids <- if (input$reference_genes == "tpeold") {
|
reference_gene_ids <- if (input$reference_genes == "tpeold") {
|
||||||
genes[verified | suggested == TRUE, id]
|
genes[verified | suggested == TRUE, id]
|
||||||
} else if (input$reference_genes == "verified") {
|
} else if (input$reference_genes == "verified") {
|
||||||
|
|
@ -162,9 +143,8 @@ preset_editor_server <- function(id) {
|
||||||
|
|
||||||
geposan::preset(
|
geposan::preset(
|
||||||
methods = method_ids,
|
methods = method_ids,
|
||||||
species_ids = species_ids(),
|
species_ids = species_ids,
|
||||||
gene_ids = genes$id,
|
gene_ids = genes$id,
|
||||||
min_n_species = input$n_species,
|
|
||||||
reference_gene_ids = reference_gene_ids
|
reference_gene_ids = reference_gene_ids
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue