aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations/biweight.R
blob: 05f7145fee7e4b758c65ec405174ec012fc69243 (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))