Mercurial > repos > davidvanzessen > test_plotting_merged
comparison RScript.r @ 1:c43c63f4ef80 draft
Uploaded
author | davidvanzessen |
---|---|
date | Wed, 09 Oct 2013 07:29:08 -0400 |
parents | 0e6f33e21c60 |
children | aac19ac7cb21 |
comparison
equal
deleted
inserted
replaced
0:0e6f33e21c60 | 1:c43c63f4ef80 |
---|---|
119 completeVD = merge(VandDCount, cartegianProductVD, all.y=TRUE) | 119 completeVD = merge(VandDCount, cartegianProductVD, all.y=TRUE) |
120 completeVD$Length = as.numeric(completeVD$Length) | 120 completeVD$Length = as.numeric(completeVD$Length) |
121 completeVD$log = log(completeVD$Length) | 121 completeVD$log = log(completeVD$Length) |
122 completeVD$log[is.na(completeVD$log)] = 0 | 122 completeVD$log[is.na(completeVD$log)] = 0 |
123 l = split(completeVD, f=completeVD[,"Sample"]) | 123 l = split(completeVD, f=completeVD[,"Sample"]) |
124 png("HeatmapVD%d.png") | 124 png("HeatmapVD%d.png", width=100+(15*length(Vchain$v.name)), height=100+(15*length(Dchain$v.name))) |
125 lapply(l, FUN=plotVD) | 125 lapply(l, FUN=plotVD) |
126 dev.off() | 126 dev.off() |
127 | 127 |
128 | 128 |
129 plotVJ <- function(dat){ | 129 plotVJ <- function(dat){ |
140 completeVJ = merge(VandJCount, cartegianProductVJ, all.y=TRUE) | 140 completeVJ = merge(VandJCount, cartegianProductVJ, all.y=TRUE) |
141 completeVJ$Length = as.numeric(completeVJ$Length) | 141 completeVJ$Length = as.numeric(completeVJ$Length) |
142 completeVJ$log = log(completeVJ$Length) | 142 completeVJ$log = log(completeVJ$Length) |
143 completeVJ$log[is.na(completeVJ$log)] = 0 | 143 completeVJ$log[is.na(completeVJ$log)] = 0 |
144 l = split(completeVJ, f=completeVJ[,"Sample"]) | 144 l = split(completeVJ, f=completeVJ[,"Sample"]) |
145 png("HeatmapVJ%d.png") | 145 png("HeatmapVJ%d.png", width=100+(15*length(Vchain$v.name)), height=100+(15*length(Jchain$v.name))) |
146 lapply(l, FUN=plotVJ) | 146 lapply(l, FUN=plotVJ) |
147 dev.off() | 147 dev.off() |
148 | 148 |
149 plotDJ <- function(dat){ | 149 plotDJ <- function(dat){ |
150 ggplot() + | 150 ggplot() + |
160 completeDJ = merge(DandJCount, cartegianProductDJ, all.y=TRUE) | 160 completeDJ = merge(DandJCount, cartegianProductDJ, all.y=TRUE) |
161 completeDJ$Length = as.numeric(completeDJ$Length) | 161 completeDJ$Length = as.numeric(completeDJ$Length) |
162 completeDJ$log = log(completeDJ$Length) | 162 completeDJ$log = log(completeDJ$Length) |
163 completeDJ$log[is.na(completeDJ$log)] = 0 | 163 completeDJ$log[is.na(completeDJ$log)] = 0 |
164 l = split(completeDJ, f=completeDJ[,"Sample"]) | 164 l = split(completeDJ, f=completeDJ[,"Sample"]) |
165 png("HeatmapDJ%d.png") | 165 png("HeatmapDJ%d.png", width=100+(15*length(Dchain$v.name)), height=100+(15*length(Jchain$v.name))) |
166 lapply(l, FUN=plotDJ) | 166 lapply(l, FUN=plotDJ) |
167 dev.off() | 167 dev.off() |
168 | 168 |
169 | 169 |
170 sampleFile <- file("samples.txt") | 170 sampleFile <- file("samples.txt") |