Mercurial > repos > lecorguille > xcms_plot_chromatogram
comparison lib.r @ 15:bd5a0cfb57ed draft
"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 50478425b4773ebcb393c0e31f1e622b7406dcbb"
| author | workflow4metabolomics |
|---|---|
| date | Thu, 24 Sep 2020 08:08:06 +0000 |
| parents | 8de3ef63e2ef |
| children | bf87ce10267e |
comparison
equal
deleted
inserted
replaced
| 14:8de3ef63e2ef | 15:bd5a0cfb57ed |
|---|---|
| 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") |
