Error: Faceting variables must have at least one value when plotting with ChIPQC
3
1
Entering edit mode
thekatybrown ▴ 10
@thekatybrown-11354
Last seen 8.3 years ago

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 chipqc • 15k views
ADD COMMENT
1
Entering edit mode
@thomas-carroll-7019
Last seen 2.0 years ago
United States/New York/The Rockefeller …

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 COMMENT
0
Entering edit mode

Thank you for confirming that the issue was simply that.

 

Best,

Marge

ADD REPLY
0
Entering edit mode
@thomas-carroll-7019
Last seen 2.0 years ago
United States/New York/The Rockefeller …
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 COMMENT
1
Entering edit mode

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 REPLY
0
Entering edit mode

Exactly solve my problem! How come you found a solution like this! You are genius.

ADD REPLY
0
Entering edit mode
Gopal • 0
@2565c96f
Last seen 2.8 years ago
India

Hi,

I am also encountering the same error. please find below the error:

ChIPQCreport(exampleExp) Saving 7 x 7 in image Error: Faceting variables must have at least one value Run rlang::last_error() to see where the error occurred.

when I print the values of exampleExp vector is gives below matrix:

exampleExp Samples: 10 : 0HRCON 0HRTEST ... 24HRCON 24HRTEST Tissue Factor Replicate Peaks 0HRCON 0HR CON 1 12225244 0HRTEST 0HR TEST 1 11593244 4HRCON 4HR CON 1 12884412 4HRTEST 4HR TEST 1 12860229 8HRCON 8HR CON 1 10020653 8HRTEST 8HR TEST 1 9765600 12HRCON 12HR CON 1 10453447 12HRTEST 12HR TEST 1 10464475 24HRCON 24HR CON 1 12213548 24HRTEST 24HR TEST 1 10179055 Reads Map% Filt% Dup% ReadL FragL RelCC SSD RiP% 0HRCON 1087241 100 18.7 0 71 0 0 2.81 100 0HRTEST 1039223 100 16.0 0 69 0 0 1.91 100 4HRCON 1153942 100 18.3 0 70 0 0 2.76 100 4HRTEST 1142941 100 17.5 0 72 0 0 2.45 100 8HRCON 906957 100 19.6 0 67 0 0 2.78 100 8HRTEST 887761 100 18.7 0 70 0 0 2.52 100 12HRCON 952973 100 19.1 0 69 0 0 2.71 100 12HRTEST 948303 100 20.0 0 70 0 0 2.98 100 24HRCON 1098853 100 20.5 0 70 0 0 3.39 100 24HRTEST 913668 100 20.1 0 71 0 0 2.90 100

Please find below the session information:

sessionInfo() R version 3.6.3 (2020-02-29) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Amazon Linux 2

Matrix products: default BLAS: /usr/local/lib64/R/lib/libRblas.so LAPACK: /usr/local/lib64/R/lib/libRlapack.so

Random number generation: RNG: Mersenne-Twister Normal: Inversion Sample: Rounding

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

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

other attached packages: [1] ChIPQC_1.21.0.20210323 DiffBind_2.14.0 [3] SummarizedExperiment_1.16.1 DelayedArray_0.12.3 [5] BiocParallel_1.20.1 matrixStats_0.61.0 [7] Biobase_2.46.0 GenomicRanges_1.38.0 [9] GenomeInfoDb_1.22.1 IRanges_2.20.2 [11] S4Vectors_0.24.4 BiocGenerics_0.32.0 [13] ggplot2_3.3.5

loaded via a namespace (and not attached): [1] amap_0.8-18 [2] colorspace_2.0-2 [3] rjson_0.2.20 [4] hwriter_1.3.2 [5] ellipsis_0.3.2 [6] XVector_0.26.0 [7] farver_2.1.0 [8] ggrepel_0.9.1 [9] bit64_4.0.5 [10] AnnotationDbi_1.48.0 [11] fansi_1.0.2 [12] codetools_0.2-16 [13] splines_3.6.3 [14] TxDb.Rnorvegicus.UCSC.rn4.ensGene_3.2.2 [15] cachem_1.0.6 [16] Nozzle.R1_1.1-1 [17] Rsamtools_2.2.3 [18] annotate_1.64.0 [19] GO.db_3.10.0 [20] dbplyr_2.1.1 [21] png_0.1-7 [22] pheatmap_1.0.12 [23] graph_1.64.0 [24] TxDb.Hsapiens.UCSC.hg18.knownGene_3.2.2 [25] compiler_3.6.3 [26] httr_1.4.2 [27] GOstats_2.52.0 [28] backports_1.4.1 [29] assertthat_0.2.1 [30] Matrix_1.2-18 [31] fastmap_1.1.0 [32] TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2 [33] limma_3.42.2 [34] prettyunits_1.1.1 [35] tools_3.6.3 [36] gtable_0.3.0 [37] glue_1.6.0 [38] GenomeInfoDbData_1.2.2 [39] Category_2.52.1 [40] reshape2_1.4.4 [41] systemPipeR_1.20.0 [42] dplyr_1.0.7 [43] batchtools_0.9.15 [44] rappdirs_0.3.3 [45] ShortRead_1.44.3 [46] Rcpp_1.0.8 [47] TxDb.Dmelanogaster.UCSC.dm3.ensGene_3.2.2 [48] TxDb.Mmusculus.UCSC.mm9.knownGene_3.2.2 [49] vctrs_0.3.8 [50] Biostrings_2.54.0 [51] rtracklayer_1.46.0 [52] iterators_1.0.13 [53] TxDb.Mmusculus.UCSC.mm10.knownGene_3.10.0 [54] stringr_1.4.0 [55] lifecycle_1.0.1 [56] gtools_3.9.2 [57] XML_3.99-0.3 [58] edgeR_3.28.1 [59] zlibbioc_1.32.0 [60] scales_1.1.1 [61] BSgenome_1.54.0 [62] VariantAnnotation_1.32.0 [63] hms_1.1.1 [64] RBGL_1.62.1 [65] RColorBrewer_1.1-2 [66] yaml_2.2.1 [67] curl_4.3.2 [68] memoise_2.0.1 [69] biomaRt_2.42.1 [70] latticeExtra_0.6-29 [71] stringi_1.7.6 [72] RSQLite_2.2.9 [73] genefilter_1.68.0 [74] foreach_1.5.1 [75] checkmate_2.0.0 [76] GenomicFeatures_1.38.2 [77] caTools_1.18.2 [78] chipseq_1.36.0 [79] rlang_0.4.12 [80] pkgconfig_2.0.3 [81] bitops_1.0-7 [82] TxDb.Celegans.UCSC.ce6.ensGene_3.2.2 [83] lattice_0.20-38 [84] purrr_0.3.4 [85] labeling_0.4.2 [86] GenomicAlignments_1.22.1 [87] bit_4.0.4 [88] tidyselect_1.1.1 [89] GSEABase_1.48.0 [90] AnnotationForge_1.28.0 [91] plyr_1.8.6 [92] magrittr_2.0.1 [93] R6_2.5.1 [94] gplots_3.1.1 [95] generics_0.1.1 [96] base64url_1.4 [97] DBI_1.1.2 [98] pillar_1.6.4 [99] withr_2.4.3 [100] survival_3.1-8 [101] RCurl_1.98-1.5 [102] tibble_3.1.6 [103] crayon_1.4.2 [104] KernSmooth_2.23-16 [105] utf8_1.2.2 [106] BiocFileCache_1.10.2 [107] jpeg_0.1-9 [108] progress_1.2.2 [109] locfit_1.5-9.4 [110] grid_3.6.3 [111] data.table_1.14.2 [112] blob_1.2.2 [113] Rgraphviz_2.30.0 [114] digest_0.6.29 [115] xtable_1.8-4 [116] brew_1.0-6 [117] openssl_1.4.6 [118] munsell_0.5.0 [119] askpass_1.1

Please help me.... gopal

ADD COMMENT

Login before adding your answer.

Traffic: 655 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6