[Patchwork-commits] r180 - pkg/patchwork/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jun 25 15:00:50 CEST 2013
Author: sebastian_d
Date: 2013-06-25 15:00:49 +0200 (Tue, 25 Jun 2013)
New Revision: 180
Modified:
pkg/patchwork/R/patchwork.Medians_n_AI.r
Log:
small fix (hopefully) removing medians that have been set to NA
Modified: pkg/patchwork/R/patchwork.Medians_n_AI.r
===================================================================
--- pkg/patchwork/R/patchwork.Medians_n_AI.r 2013-06-25 12:16:16 UTC (rev 179)
+++ pkg/patchwork/R/patchwork.Medians_n_AI.r 2013-06-25 13:00:49 UTC (rev 180)
@@ -5,7 +5,7 @@
for (i in 1:nrow(segs))
{
ix = kbsegs$chr==as.character(segs$chr[i]) & ( kbsegs$pos > segs$start[i] & kbsegs$pos < segs$end[i] )
- segs$median[i] = median(kbsegs$ratio[ix])
+ segs$median[i] = median(kbsegs$ratio[ix],na.rm=T)
ix2 = alf$achr==as.character(segs$chr[i]) & ( alf$apos > segs$start[i] & alf$apos < segs$end[i] )
segs$snvs[i] = sum(ix2)
More information about the Patchwork-commits
mailing list