Question: Error: Faceting variables must have at least one value when plotting with ChIPQC
1
gravatar for thekatybrown
3.2 years ago by
thekatybrown10
thekatybrown10 wrote:

Hi,

I am trying to use the "ChIPQCreport" command in the ChIPQC package.

My design table is as follows:

  SampleID Tissue Factor Condition Treatment Replicate                                  bamReads                               Peaks
1  K9-10-1  Heart     10         A         C         1 peakcalling_bams.dir/K9-10-1_filtered.bam conservative_peaks.dir/10_Heart.tsv
2  K9-10-2  Heart     10         A         C         2 peakcalling_bams.dir/K9-10-2_filtered.bam conservative_peaks.dir/10_Heart.tsv
3  K9-10-3  Heart     10         A         C         3 peakcalling_bams.dir/K9-10-3_filtered.bam conservative_peaks.dir/10_Heart.tsv
4  K9-13-1  Liver     13         B         D         1 peakcalling_bams.dir/K9-13-1_filtered.bam conservative_peaks.dir/13_Heart.tsv
5  K9-13-2  Liver     13         B         D         2 peakcalling_bams.dir/K9-13-2_filtered.bam conservative_peaks.dir/13_Heart.tsv
6  K9-13-3  Liver     13         B         D         3 peakcalling_bams.dir/K9-13-3_filtered.bam conservative_peaks.dir/13_Heart.tsv

The following two commands run successfully:

samples = read.table('ChIPQC_design_conservative.tsv', sep="\t", header=1)

experiment = ChIPQC(samples)

 

This command fails:

ChIPQCreport(experiment)


with the error message:

Saving 7 x 7 in image
Error: Faceting variables must have at least one value

The traceback is:

10: stop("Faceting variables must have at least one value", call. = FALSE)
9: layout_base(data, vars, drop = drop)
8: plyr::unrowname(layout_base(data, vars, drop = drop))
7: layout_wrap(data, facet$facets, facet$nrow, facet$ncol, facet$as.table,
       facet$drop, facet$dir)
6: facet_train_layout.wrap(facet, c(list(plot_data), data))
5: facet_train_layout(facet, c(list(plot_data), data))
4: train_layout(panel, plot$facet, layer_data, plot$data)
3: ggplot_build(x)
2: print.ggplot(x)
1: function (x, ...)
   UseMethod("print")(x)

If I run plotCC, plotRegi, plotPeakProfile or plotFribl in isolation I get the same error but the other individual plotting commands work.  I have tried "facet=F" and various combinations of facetBy columns but I get the same error every time.

I have Bioconductor version 3.3 and my session info is as follows:

R version 3.3.0 (2016-05-03)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Scientific Linux release 6.8 (Carbon)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] reshape2_1.4.1             ChIPQC_1.8.3               DiffBind_2.0.1             SummarizedExperiment_1.2.3 Biobase_2.32.0            
 [6] GenomicRanges_1.24.2       GenomeInfoDb_1.8.3         IRanges_2.6.0              S4Vectors_0.10.0           BiocGenerics_0.18.0       
[11] ggplot2_2.1.0

Thanks,

Katy

chipqc • 7.0k views
ADD COMMENTlink modified 3.2 years ago by Thomas Carroll400 • written 3.2 years ago by thekatybrown10
Answer: Error: Faceting variables must have at least one value when plotting with ChIPQC
0
gravatar for Thomas Carroll
3.2 years ago by
United States/New York/The Rockefeller University
Thomas Carroll400 wrote:
hi Katy, I can't see a problem with the setup or your code. Would you be able to save the ChIPQCexperiment object ("experiment" here) and send to me privately at tc.informatics@gmail.com. best, tom On Thu, Aug 25, 2016 at 11:49 AM, thekatybrown [bioc] < noreply@bioconductor.org> wrote: > Activity on a post you are following on support.bioconductor.org > > User thekatybrown <https: support.bioconductor.org="" u="" 11354=""/> wrote Question: > Error: Faceting variables must have at least one value when plotting with > ChIPQC <https: support.bioconductor.org="" p="" 86483=""/>: > > Hi, > > I am trying to use the "ChIPQCreport" command in the ChIPQC package. > > My design table is as follows: > > SampleID Tissue Factor Condition Treatment Replicate > bamReads Peaks > 1 K9-10-1 Heart 10 A C 1 > peakcalling_bams.dir/K9-10-1_filtered.bam conservative_peaks.dir/10_ > Heart.tsv > 2 K9-10-2 Heart 10 A C 2 > peakcalling_bams.dir/K9-10-2_filtered.bam conservative_peaks.dir/10_ > Heart.tsv > 3 K9-10-3 Heart 10 A C 3 > peakcalling_bams.dir/K9-10-3_filtered.bam conservative_peaks.dir/10_ > Heart.tsv > 4 K9-13-1 Liver 13 B D 1 > peakcalling_bams.dir/K9-13-1_filtered.bam conservative_peaks.dir/13_ > Heart.tsv > 5 K9-13-2 Liver 13 B D 2 > peakcalling_bams.dir/K9-13-2_filtered.bam conservative_peaks.dir/13_ > Heart.tsv > 6 K9-13-3 Liver 13 B D 3 > peakcalling_bams.dir/K9-13-3_filtered.bam conservative_peaks.dir/13_ > Heart.tsv > > The following two commands run successfully: > > samples = read.table('ChIPQC_design_conservative.tsv', sep="\t", header=1) > > experiment = ChIPQC(samples) > > > > This command fails: > > ChIPQCreport(experiment) > > > with the error message: > > Saving 7 x 7 in image > Error: Faceting variables must have at least one value > > The traceback is: > > 10: stop("Faceting variables must have at least one value", call. = FALSE) > 9: layout_base(data, vars, drop = drop) > 8: plyr::unrowname(layout_base(data, vars, drop = drop)) > 7: layout_wrap(data, facet$facets, facet$nrow, facet$ncol, facet$as.table, > facet$drop, facet$dir) > 6: facet_train_layout.wrap(facet, c(list(plot_data), data)) > 5: facet_train_layout(facet, c(list(plot_data), data)) > 4: train_layout(panel, plot$facet, layer_data, plot$data) > 3: ggplot_build(x) > 2: print.ggplot(x) > 1: function (x, ...) > UseMethod("print")(x) > > If I run plotCC, plotRegi, plotPeakProfile or plotFribl in isolation I get > the same error but the other individual plotting commands work. I have > tried "facet=F" and various combinations of facetBy columns but I get the > same error every time. > > I have Bioconductor version 3.3 and my session info is as follows: > > R version 3.3.0 (2016-05-03) > Platform: x86_64-pc-linux-gnu (64-bit) > Running under: Scientific Linux release 6.8 (Carbon) > > locale: > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > LC_MONETARY=en_US.UTF-8 > [6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 > LC_NAME=C LC_ADDRESS=C > LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] stats4 parallel stats graphics grDevices utils datasets > methods base > > other attached packages: > [1] reshape2_1.4.1 ChIPQC_1.8.3 > DiffBind_2.0.1 SummarizedExperiment_1.2.3 > Biobase_2.32.0 > [6] GenomicRanges_1.24.2 GenomeInfoDb_1.8.3 > IRanges_2.6.0 S4Vectors_0.10.0 > BiocGenerics_0.18.0 > [11] ggplot2_2.1.0 > > Thanks, > > Katy > > ------------------------------ > > Post tags: ChipQC, chipqc > > You may reply via email or visit Error: Faceting variables must have at least one value when plotting with ChIPQC >
ADD COMMENTlink written 3.2 years ago by Thomas Carroll400

Hello,

If you found a solution could you please share it here?

I just came across the exact same problem and the error disappeared replacing dashes with underscores in all the entries of the sample sheet: was the issue related to this?

Cheers,

Marge

ADD REPLYlink modified 3.2 years ago • written 3.2 years ago by Marge0
Answer: Error: Faceting variables must have at least one value when plotting with ChIPQC
0
gravatar for Thomas Carroll
3.2 years ago by
United States/New York/The Rockefeller University
Thomas Carroll400 wrote:

hi Katy,

Did Marge's solution solve your problem? I can confirm this is the a problem and we will enforce valid names internally for the future release so it wont pop up again. You can solve it by updating names as she suggested.

R has a function make.names() which can edit a vector of characters into a form suitable for syntactically valid names.

> make.names("K9-10-2")
[1] "K9.10.2"

You could update your samplesheet using this on the SampleID column

best,

tom

 

ADD COMMENTlink written 3.2 years ago by Thomas Carroll400

Thank you for confirming that the issue was simply that.

 

Best,

Marge

ADD REPLYlink written 3.1 years ago by Marge0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 343 users visited in the last hour