Skip to content

Commit 69ceccf

Browse files
committed
Bugs correction
1 parent 1db18ea commit 69ceccf

2 files changed

Lines changed: 17 additions & 23 deletions

File tree

R/ReViewCNV.R

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -403,15 +403,18 @@ ReViewCNV <- function(host = "0.0.0.0", port = 3838, launch = TRUE) {
403403
return(fast_call_1)
404404
})
405405

406-
CNV_all_Chromosomes <- shiny::reactive({
406+
CNV <- shiny::reactive({
407407
if (is.null(input$FastCall_Results_1) || input$Genome == "") {
408408
return(NULL)
409409
} else {
410410
fast_call_1() |>
411411
dplyr::left_join(
412412
Chromosomes_Coordinates(),
413413
dplyr::join_by(Chromosome)
414-
)
414+
)|>
415+
rename(End = End.y) |>
416+
rename(Start = Start.y) |>
417+
rename(level.x = level)
415418
}
416419
})
417420

@@ -782,15 +785,6 @@ ReViewCNV <- function(host = "0.0.0.0", port = 3838, launch = TRUE) {
782785

783786
# CNV for all Chromosomes ----------------------------------------------------
784787

785-
CNV <- shiny::reactive({
786-
shiny::req(input$FastCall_Results_1, input$Genome)
787-
788-
CNV_all_Chromosomes() |>
789-
dplyr::left_join(
790-
Chromosomes_Coordinates(),
791-
dplyr::join_by(Chromosome)
792-
)
793-
})
794788

795789
rect <- shiny::reactive({
796790
shiny::req(input$FastCall_Results_1, input$Genome)
@@ -890,6 +884,7 @@ ReViewCNV <- function(host = "0.0.0.0", port = 3838, launch = TRUE) {
890884

891885
rect <- c(rect_Chromosome)
892886

887+
893888
if (dim(rect_CNV_2AMP)[1] > 0) {
894889
rect <- append(rect, rect_2AMP)
895890
}
@@ -905,6 +900,9 @@ ReViewCNV <- function(host = "0.0.0.0", port = 3838, launch = TRUE) {
905900
if (dim(rect_CNV_2DEL)[1] > 0) {
906901
rect <- append(rect, rect_2DEL)
907902
}
903+
904+
return(rect)
905+
908906
})
909907

910908
# Plot all chromosomes ----------------------------------------------------

tools/ReViewCNV.R

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -380,15 +380,18 @@ server <- function(input, output, session) {
380380
return(fast_call_1)
381381
})
382382

383-
CNV_all_Chromosomes <- shiny::reactive({
383+
CNV <- shiny::reactive({
384384
if (is.null(input$FastCall_Results_1) || input$Genome == "") {
385385
return(NULL)
386386
} else {
387387
fast_call_1() |>
388388
dplyr::left_join(
389389
Chromosomes_Coordinates(),
390390
dplyr::join_by(Chromosome)
391-
)
391+
) |>
392+
rename(End = End.y) |>
393+
rename(Start = Start.y) |>
394+
rename(level.x = level)
392395
}
393396
})
394397

@@ -756,16 +759,6 @@ server <- function(input, output, session) {
756759

757760
# CNV for all Chromosomes ----------------------------------------------------
758761

759-
CNV <- shiny::reactive({
760-
shiny::req(input$FastCall_Results_1, input$Genome)
761-
762-
CNV_all_Chromosomes() |>
763-
dplyr::left_join(
764-
Chromosomes_Coordinates(),
765-
dplyr::join_by(Chromosome)
766-
)
767-
})
768-
769762
rect <- shiny::reactive({
770763
shiny::req(input$FastCall_Results_1, input$Genome)
771764

@@ -879,6 +872,8 @@ server <- function(input, output, session) {
879872
if (dim(rect_CNV_2DEL)[1] > 0) {
880873
rect <- append(rect, rect_2DEL)
881874
}
875+
876+
return(rect)
882877
})
883878

884879
# Plot all chromosomes ----------------------------------------------------
@@ -5745,4 +5740,5 @@ server <- function(input, output, session) {
57455740
)
57465741
}
57475742

5743+
57485744
shinyApp(ui, server)

0 commit comments

Comments
 (0)