Mercurial > repos > vandelj > giant_limma_analysis
comparison src/utils.R @ 2:3dc31e252649 draft default tip
"planemo upload for repository https://github.com/juliechevalier/GIANT/tree/master commit 89b7d0e8812f53222691cffe29bd48be6519829d"
author | vandelj |
---|---|
date | Fri, 25 Sep 2020 08:52:08 +0000 |
parents | f274c8d45613 |
children |
comparison
equal
deleted
inserted
replaced
1:9f2ddab68c9e | 2:3dc31e252649 |
---|---|
16 | 16 |
17 #extendedDist function to correlation measure | 17 #extendedDist function to correlation measure |
18 distExtended <- function(x,method) { | 18 distExtended <- function(x,method) { |
19 if(method %in% c("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski"))return(dist(x,method = method)) | 19 if(method %in% c("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski"))return(dist(x,method = method)) |
20 if(method %in% c("pearson", "spearman", "kendall"))return(as.dist(1-cor(t(x),method=method))/2) | 20 if(method %in% c("pearson", "spearman", "kendall"))return(as.dist(1-cor(t(x),method=method))/2) |
21 if(method %in% c("absPearson", "absSpearman", "absKendall"))return(as.dist(1-abs(cor(t(x),method=method)))) | 21 if(method %in% c("absPearson", "absSpearman", "absKendall"))return(as.dist(1-abs(cor(t(x),method=tolower(substr(method,4,15)))))) |
22 return(NULL) | 22 return(NULL) |
23 } | 23 } |
24 | 24 |
25 ##comment function to display message and optionnaly add it to log file | 25 ##comment function to display message and optionnaly add it to log file |
26 | 26 |