Browse Source

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

main
marcelcosta 2 years ago
parent
commit
7cfa388197
1 changed files with 24 additions and 1 deletions
  1. +24
    -1
      chromatoR/app.R

+ 24
- 1
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")

Loading…
Cancel
Save