From 8e02689e428eb75ea41e47e4eaaf5a45acbf32a8 Mon Sep 17 00:00:00 2001 From: marcelcosta Date: Fri, 8 Jul 2022 16:39:04 +0200 Subject: [PATCH] =?UTF-8?q?Inici=20de=20correcci=C3=B3=20de=20posici=C3=B3?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chromatoR/app.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chromatoR/app.R b/chromatoR/app.R index 7d04f99..e5a0d13 100644 --- a/chromatoR/app.R +++ b/chromatoR/app.R @@ -249,9 +249,11 @@ server <- function(input, output) { max<-min+width let<-obj_ab@primarySeq %>% as.character %>% strsplit("") - picks_x<-apply(obj_ab@peakPosMatrix, 1, max, na.rm=T) + ## 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()] - picks<-data.frame(rows=apply(obj_ab@peakPosMatrix, 1, max, na.rm=T), Base=let[[1]], num=1:length(let[[1]])) %>% + picks<-data.frame(rows=picks_x, Base=let[[1]], num=1:length(let[[1]])) %>% filter(num >= min & num <= max) #%>% mutate(rows=rows-min) ranPeaks<-range(picks$rows)