comparison corr.R @ 3:7bdd29cdfed8

more debug messages
author Ido Tamir <ido.tamir@imp.ac.at>
date Sun, 18 Aug 2013 16:56:56 +0200
parents 1eb46757d8bb
children fcf85568a102
comparison
equal deleted inserted replaced
2:1eb46757d8bb 3:7bdd29cdfed8
28 suppressWarnings(Reduce(union, coverages)) #supress because missing chromosomes spit warinings 28 suppressWarnings(Reduce(union, coverages)) #supress because missing chromosomes spit warinings
29 } 29 }
30 30
31 ## adds mappable regions as 0 coverage to track 31 ## adds mappable regions as 0 coverage to track
32 covWith0 <- function(cov, mappable){ 32 covWith0 <- function(cov, mappable){
33 c0 <- setdiff(mappable, cov) 33 print(paste("cov:",cov))
34 c0 <- setdiff(mappable, cov)
34 cus <- if(length(c0) > 0){ 35 cus <- if(length(c0) > 0){
35 elementMetadata(c0)$score <- 0 36 elementMetadata(c0)$score <- 0
36 sort(c(c0, cov)) 37 sort(c(c0, cov))
37 }else{ 38 }else{
38 sort(cov) 39 sort(cov)
47 } 48 }
48 49
49 50
50 ## correlation dist 51 ## correlation dist
51 corrDist <- function(covRles, outnames){ 52 corrDist <- function(covRles, outnames){
52 vl <- length(covRles) 53 print("calculating correlation")
54 vl <- length(covRles)
53 v <- 1:vl 55 v <- 1:vl
54 o <- matrix(NA,vl,vl) 56 o <- matrix(NA,vl,vl)
55 colnames(o) <- outnames 57 colnames(o) <- outnames
56 rownames(o) <- outnames 58 rownames(o) <- outnames
57 tri <- lower.tri(o, diag=FALSE) 59 tri <- lower.tri(o, diag=FALSE)