Mercurial > repos > lecorguille > xcms_plot_chromatogram
comparison lib.r @ 12:0cab69429e1e draft
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 50478425b4773ebcb393c0e31f1e622b7406dcbb"
author | workflow4metabolomics |
---|---|
date | Thu, 24 Sep 2020 08:08:50 +0000 |
parents | 37d31fd64eb4 |
children | 024974037c4e |
comparison
equal
deleted
inserted
replaced
11:37d31fd64eb4 | 12:0cab69429e1e |
---|---|
254 }else{ | 254 }else{ |
255 group_colors <- hcl.colors(length(unique(xdata$sample_group)), palette="Dark 3") | 255 group_colors <- hcl.colors(length(unique(xdata$sample_group)), palette="Dark 3") |
256 } | 256 } |
257 if (length(group_colors) > 1) { | 257 if (length(group_colors) > 1) { |
258 names(group_colors) <- unique(xdata$sample_group) | 258 names(group_colors) <- unique(xdata$sample_group) |
259 plot(chrom, col = group_colors[as.factor(chrom$sample_group)], main=main, peakType = "none") | 259 plot(chrom, col = group_colors[chrom$sample_group], main=main, peakType = "none") |
260 legend("topright", legend=names(group_colors), col=group_colors, cex=0.8, lty=1) | 260 legend("topright", legend=names(group_colors), col=group_colors, cex=0.8, lty=1) |
261 } | 261 } |
262 | 262 |
263 # Color by sample | 263 # Color by sample |
264 plot(chrom, col = rainbow(length(xdata@phenoData@data$sample_name)), main=main, peakType = "none") | 264 plot(chrom, col = rainbow(length(xdata@phenoData@data$sample_name)), main=main, peakType = "none") |