Mercurial > repos > idot > coverage_correlation
comparison corr.R @ 12:f3e037496c18
its even checking the levels
author | Ido Tamir <ido.tamir@imp.ac.at> |
---|---|
date | Sun, 18 Aug 2013 21:33:43 +0200 |
parents | 74bfa2464411 |
children | de452b96da8e |
comparison
equal
deleted
inserted
replaced
11:74bfa2464411 | 12:f3e037496c18 |
---|---|
144 | 144 |
145 changeSeqInfo <- function(coverages){ | 145 changeSeqInfo <- function(coverages){ |
146 seqinfo <- mergeSeqInfo(coverages) | 146 seqinfo <- mergeSeqInfo(coverages) |
147 lapply(coverages, function(cov){ | 147 lapply(coverages, function(cov){ |
148 si <- as.data.frame(cov@seqinfo) | 148 si <- as.data.frame(cov@seqinfo) |
149 si <- data.frame(chr=rownames(si), si) | 149 si <- data.frame(chr=rownames(si), si, stringsAsFactors=FALSE) |
150 sis <- subset(seqinfo, seqnames %in% si$chr) | 150 sis <- subset(seqinfo, seqnames %in% si$chr) |
151 sis <- sis[match(si$chr, sis$seqnames),] | |
151 si <- Seqinfo(seqnames=as.character(sis$seqnames), seqlengths=sis$seqlengths, isCircular=sis$isCircular, genome=sis$genome) | 152 si <- Seqinfo(seqnames=as.character(sis$seqnames), seqlengths=sis$seqlengths, isCircular=sis$isCircular, genome=sis$genome) |
152 cov@seqinfo <- si | 153 cov@seqinfo <- si |
153 cov | 154 cov |
154 }) | 155 }) |
155 } | 156 } |
156 | 157 |
157 args <- commandArgs(TRUE) | 158 args <- commandArgs(TRUE) |