aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations/biweight.R
blob: d0d8de41f5d97649c86602f479cf2d07ac1385a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
library(WGCNA)


myArgs <- commandArgs(trailingOnly = TRUE)
trait_vals <- as.numeric(unlist(strsplit(myArgs[1], split=" ")))
target_vals <- as.numeric(unlist(strsplit(myArgs[2], split=" ")))

BiweightMidCorrelation <- function(trait_val,target_val){
    # results <- bicorAndPvalue(x,y)
    return (list(c(results$bicor)[1],c(results$p)[1]))
}
cat(BiweightMidCorrelation(trait_vals,target_vals))