From 7cfa388197cbc4e881f36ec395c9ae02fe6affac Mon Sep 17 00:00:00 2001 From: marcelcosta Date: Mon, 11 Jul 2022 12:34:07 +0200 Subject: [PATCH] =?UTF-8?q?Afegir=20taula=20al=20Visor=20amb=20no-coincid?= =?UTF-8?q?=C3=A8ncies=20i=20conversi=C3=B3=20Posici=C3=B3=20alineament-Ch?= =?UTF-8?q?romatograma.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chromatoR/app.R | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/chromatoR/app.R b/chromatoR/app.R index cb278f9..50bc472 100644 --- a/chromatoR/app.R +++ b/chromatoR/app.R @@ -37,7 +37,8 @@ ui <- fluidPage( actionButton("butvis", "Mostrar") ), mainPanel( - plotOutput("visor",width=1000) + plotOutput("visor",width=1000), + tableOutput("visTab") ) ) ) @@ -241,6 +242,28 @@ server <- function(input, output) { } }) + output$visTab <- renderTable({ + observeEvent(obj$seq, {}) + + if (!is.null(obj$seq) & input$old != ""){ + print(3) + alignament<-msaClustalW(c("Reference"=toupper(input$old),"Predicted"=obj_ab@primarySeq %>% as.character), type="dna") + + pred<-(alignament@unmasked[2] %>% as.character() %>% strsplit(""))[[1]] + ref<-(alignament@unmasked[1] %>% as.character() %>% strsplit(""))[[1]] + cons<-pred == ref + + aln<-data.frame(pred, ref, cons, PosAln=1:length(pred)) + aln<-mutate(aln, cons=case_when( + cons == T~"", + TRUE~"?" + )) + + aln %>% filter(pred != "-") %>% add_column("PosChrom"=1:nrow(.)) %>% + merge(test, all=T) %>% filter(cons == "?") %>% arrange(PosAln) + } + }) + plotvis<-eventReactive( input$butvis, { if (!is.null(obj$seq)){ print("Inicio imagen")