# HG changeset patch # User workflow4metabolomics # Date 1600934942 0 # Node ID bed23aa27b4b1c0e7485e3533d037808da2232a8 # Parent db6549f27ad12844b96822abf6bdb0938ca143bd "planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 50478425b4773ebcb393c0e31f1e622b7406dcbb" diff -r db6549f27ad1 -r bed23aa27b4b abims_xcms_summary.xml --- a/abims_xcms_summary.xml Tue May 12 16:39:28 2020 -0400 +++ b/abims_xcms_summary.xml Thu Sep 24 08:09:02 2020 +0000 @@ -1,4 +1,4 @@ - + Create a summary of XCMS analysis @@ -87,6 +87,10 @@ Changelog/News -------------- +**Version 3.6.1+galaxy2 - 23/09/2020** + +- BUGFIX: "Error: object 'sampleNamesList' not found" in case of .RData input from CAMERA + .. _News: https://bioconductor.org/packages/release/bioc/news/xcms/NEWS **Version 3.6.1+galaxy1 - 05/04/2020** diff -r db6549f27ad1 -r bed23aa27b4b lib.r --- a/lib.r Tue May 12 16:39:28 2020 -0400 +++ b/lib.r Thu Sep 24 08:09:02 2020 +0000 @@ -149,7 +149,11 @@ par(mfrow = c(3, 1), mar = c(4, 4, 1, 0.5)) - group_colors <- brewer.pal(length(unique(xdata$sample_group)), "Set1") + if(length(unique(xdata$sample_group))<10){ + group_colors <- brewer.pal(length(unique(xdata$sample_group)), "Set1") + }else{ + group_colors <- hcl.colors(length(unique(xdata$sample_group)), palette="Dark 3") + } names(group_colors) <- unique(xdata$sample_group) col_per_samp <- as.character(xdata$sample_group) for(i in 1:length(group_colors)){col_per_samp[col_per_samp==(names(group_colors)[i])]<-group_colors[i]} @@ -172,7 +176,11 @@ pdf(file="raw_vs_adjusted_rt.pdf", width=16, height=12) # Color by group - group_colors <- brewer.pal(length(unique(xdata$sample_group)), "Set1") + if(length(unique(xdata$sample_group))<10){ + group_colors <- brewer.pal(length(unique(xdata$sample_group)), "Set1") + }else{ + group_colors <- hcl.colors(length(unique(xdata$sample_group)), palette="Dark 3") + } if (length(group_colors) > 1) { names(group_colors) <- unique(xdata$sample_group) plotAdjustedRtime(xdata, col = group_colors[xdata$sample_group]) @@ -241,10 +249,14 @@ pdf(pdfname, width=16, height=10) # Color by group - group_colors <- brewer.pal(length(unique(xdata$sample_group)), "Set1") + if(length(unique(xdata$sample_group))<10){ + group_colors <- brewer.pal(length(unique(xdata$sample_group)), "Set1") + }else{ + group_colors <- hcl.colors(length(unique(xdata$sample_group)), palette="Dark 3") + } if (length(group_colors) > 1) { names(group_colors) <- unique(xdata$sample_group) - plot(chrom, col = group_colors[as.factor(chrom$sample_group)], main=main, peakType = "none") + plot(chrom, col = group_colors[chrom$sample_group], main=main, peakType = "none") legend("topright", legend=names(group_colors), col=group_colors, cex=0.8, lty=1) } diff -r db6549f27ad1 -r bed23aa27b4b repository_dependencies.xml --- a/repository_dependencies.xml Tue May 12 16:39:28 2020 -0400 +++ b/repository_dependencies.xml Thu Sep 24 08:09:02 2020 +0000 @@ -1,5 +1,5 @@ - - + + \ No newline at end of file diff -r db6549f27ad1 -r bed23aa27b4b xcms_summary.r --- a/xcms_summary.r Tue May 12 16:39:28 2020 -0400 +++ b/xcms_summary.r Thu Sep 24 08:09:02 2020 +0000 @@ -73,7 +73,10 @@ if (!exists("sampleNamesList")) sampleNamesList <- list("sampleNamesMakeNames"=make.names(sampnames(xobject))) } # if the RData come from CAMERA -if (exists("xa")) xobject <- xa@xcmsSet +if (exists("xa")) { + xobject <- xa@xcmsSet + if (!exists("sampleNamesList")) sampleNamesList <- list("sampleNamesMakeNames"=make.names(xa@xcmsSet@phenoData$sample_name)) +} # if the RData come from XCMS 3.x if (exists("xdata")) { xobject <- xdata