Mercurial > repos > idot > coverage_correlation
comparison corr.R @ 6:fcf85568a102
dont know how this worked. added coverages to mappable
author | Ido Tamir <ido.tamir@imp.ac.at> |
---|---|
date | Sun, 18 Aug 2013 17:18:16 +0200 |
parents | 7bdd29cdfed8 |
children | ecad2cd5038f |
comparison
equal
deleted
inserted
replaced
5:9abd178b46bd | 6:fcf85568a102 |
---|---|
122 | 122 |
123 getCoverages <- function(infiles, formats){ | 123 getCoverages <- function(infiles, formats){ |
124 apply(data.frame(file=infiles,format=formats),1, function(row){ getCoverage(row['file'], row['format']) }) | 124 apply(data.frame(file=infiles,format=formats),1, function(row){ getCoverage(row['file'], row['format']) }) |
125 } | 125 } |
126 | 126 |
127 getMappable <- function(mappable){ | 127 getMappable <- function(coverages, mappable){ |
128 if(is.na(mappable)){ | 128 print(paste("creating mappability", mappable)) |
129 if(is.na(mappable)){ | |
129 createMappable(coverages) | 130 createMappable(coverages) |
130 }else{ | 131 }else{ |
131 import(mappable, format="bed", asRangedData = FALSE) | 132 import(mappable, format="bed", asRangedData = FALSE) |
132 } | 133 } |
133 } | 134 } |
148 print("parsed input parameters") | 149 print("parsed input parameters") |
149 print(lpp) | 150 print(lpp) |
150 | 151 |
151 | 152 |
152 coverages <- getCoverages(infiles, formats) | 153 coverages <- getCoverages(infiles, formats) |
153 mappability <- getMappable(mappable) | 154 mappability <- getMappable(coverages, mappable) |
154 | 155 |
155 calcAndPlot(coverages, outnames, mappability, outnamePDF, outnameMat,title) | 156 calcAndPlot(coverages, outnames, mappability, outnamePDF, outnameMat,title) |
156 | 157 |
157 | 158 |
158 | 159 |