RegulatoryGenomicsGroup / chicdiff

A differential caller for capture Hi-C data
4 stars 3 forks source link

plotDiffBaits() error: Aesthetics must be either length 1 or the same as the data (1): colour, x, y #6

Closed AdrijaK closed 4 years ago

AdrijaK commented 5 years ago

When giving a vector of bait numbers to plotDiffBaits(), I get an error: Aesthetics must be either length 1 or the same as the data (1): colour, x, y This does not happen if I use one bait as an input.

Example:

outputRds = "path/to/_results.Rds"
countputRds = "path/to/_countput.Rds"
baitmapFile = "path/to/my.baitmap"
digestmapFile="path/to/my.rmap"
baits_of_interest_names = c(24120,562589,138765,329941)
plotDiffBaits(outputRds, countputRds, baitmapFile, baits_of_interest_names)

error: Aesthetics must be either length 1 or the same as the data (1): colour, x, y

# visualise one bait (works)
plotDiffBaits(outputRds, countputRds, baitmapFile, 24120)

# visualise one bait (works)
plotDiffBaits(outputRds, countputRds, baitmapFile, baits_of_interest_names[1])

Session info:

sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: RHEL

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

locale:
 [1] LC_CTYPE=da_DK.UTF-8       LC_NUMERIC=C               LC_TIME=da_DK.UTF-8       
 [4] LC_COLLATE=da_DK.UTF-8     LC_MONETARY=da_DK.UTF-8    LC_MESSAGES=da_DK.UTF-8   
 [7] LC_PAPER=da_DK.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=da_DK.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] Chicdiff_0.5                data.table_1.12.6           devtools_2.2.1             
 [4] usethis_1.5.1               ggplot2_3.2.1               DESeq2_1.26.0              
 [7] SummarizedExperiment_1.16.0 DelayedArray_0.12.0         BiocParallel_1.20.0        
[10] matrixStats_0.55.0          Biobase_2.46.0              GenomicRanges_1.38.0       
[13] GenomeInfoDb_1.22.0         IRanges_2.20.0              S4Vectors_0.24.0           
[16] BiocGenerics_0.32.0        

loaded via a namespace (and not attached):
 [1] bitops_1.0-6           fs_1.3.1               bit64_0.9-7            RColorBrewer_1.1-2    
 [5] rprojroot_1.3-2        tools_3.6.0            backports_1.1.5        R6_2.4.0              
 [9] rpart_4.1-15           Hmisc_4.2-0            DBI_1.0.0              lazyeval_0.2.2        
[13] colorspace_1.4-1       nnet_7.3-12            withr_2.1.2            gridExtra_2.3         
[17] prettyunits_1.0.2      processx_3.4.1         bit_1.1-14             compiler_3.6.0        
[21] fdrtool_1.2.15         cli_1.1.0              htmlTable_1.13.2       desc_1.2.0            
[25] labeling_0.3           harmonicmeanp_3.0      slam_0.1-46            scales_1.0.0          
[29] checkmate_1.9.4        hexbin_1.27.3          genefilter_1.68.0      callr_3.3.2           
[33] Delaporte_7.0.2        stringr_1.4.0          digest_0.6.22          foreign_0.8-71        
[37] rmarkdown_1.16         FMStable_0.1-2         XVector_0.26.0         base64enc_0.1-3       
[41] pkgconfig_2.0.3        htmltools_0.4.0        Chicago_1.12.0         sessioninfo_1.1.1     
[45] lpsymphony_1.12.0      htmlwidgets_1.5.1      rlang_0.4.1            rstudioapi_0.10       
[49] RSQLite_2.1.2          IHW_1.12.0             acepack_1.4.1          RCurl_1.95-4.12       
[53] magrittr_1.5           GenomeInfoDbData_1.2.2 Formula_1.2-3          Matrix_1.2-17         
[57] Rcpp_1.0.2             munsell_0.5.0          yaml_2.2.0             stringi_1.4.3         
[61] MASS_7.3-51.4          zlibbioc_1.32.0        pkgbuild_1.0.6         grid_3.6.0            
[65] blob_1.2.0             crayon_1.3.4           lattice_0.20-38        cowplot_1.0.0         
[69] splines_3.6.0          annotate_1.64.0        locfit_1.5-9.1         zeallot_0.1.0         
[73] knitr_1.25             ps_1.3.0               pillar_1.4.2           geneplotter_1.64.0    
[77] pkgload_1.0.2          XML_3.98-1.20          glue_1.3.1             evaluate_0.14         
[81] latticeExtra_0.6-28    remotes_2.1.0          vctrs_0.2.0            testthat_2.3.0        
[85] gtable_0.3.0           assertthat_0.2.1       xfun_0.10              xtable_1.8-4          
[89] survival_2.44-1.1      tibble_2.1.3           AnnotationDbi_1.48.0   memoise_1.1.0         
[93] cluster_2.0.8          ellipsis_0.3.0
mspivakov commented 5 years ago

Thanks for your report. It'd be great if you could share with us the dataset that triggers this problem - the smaller, the better. Would this be possible? You don't need to tell us what experimental conditions the data relate to.

AdrijaK commented 4 years ago

Thank you for your patience. I re-ran the pipeline and it seems that the issue got resolved.