Afegir taula al Visor amb no-coincidències i conversió Posició alineament-Chromatograma.

This commit is contained in:
2022-07-11 12:34:07 +02:00
parent aae557569b
commit 7cfa388197
+24 -1
View File
@@ -37,7 +37,8 @@ ui <- fluidPage(
actionButton("butvis", "Mostrar") actionButton("butvis", "Mostrar")
), ),
mainPanel( 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, { plotvis<-eventReactive( input$butvis, {
if (!is.null(obj$seq)){ if (!is.null(obj$seq)){
print("Inicio imagen") print("Inicio imagen")