From d7a7e946a38cb9e1ff0c92ec73fe0799f11520dd Mon Sep 17 00:00:00 2001 From: Marcel Date: Sat, 9 Jul 2022 09:56:51 +0200 Subject: [PATCH] =?UTF-8?q?Correcci=C3=B3=20de=20posici=C3=B3=20al=20viewe?= =?UTF-8?q?r.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chromatoR/app.R | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chromatoR/app.R b/chromatoR/app.R index e5a0d13..a573223 100644 --- a/chromatoR/app.R +++ b/chromatoR/app.R @@ -249,9 +249,8 @@ server <- function(input, output) { max<-min+width let<-obj_ab@primarySeq %>% as.character %>% strsplit("") - ## He de trobar els dos T en una fila - picks_x<-unlist(t(obj_ab@peakPosMatrix))[apply(obj_ab@peakAmpMatrix,1,function(x) x == max(x,na.rm=T)) %>% - as.list() %>% unlist()] + peakpos<-apply(obj_ab@peakAmpMatrix,1,function(x) which(x == max(x,na.rm=T))[1]) + picks_x<-sapply(1:length(peakpos), function(i) obj_ab@peakPosMatrix[i, peakpos[i]]) picks<-data.frame(rows=picks_x, Base=let[[1]], num=1:length(let[[1]])) %>% filter(num >= min & num <= max) #%>% mutate(rows=rows-min)