PoisonAlien / maftools

Summarize, Analyze and Visualize MAF files from TCGA or in-house studies.
http://bioconductor.org/packages/release/bioc/html/maftools.html
MIT License
443 stars 218 forks source link

error in plotCBSsegments #539

Closed mhlolly closed 4 years ago

mhlolly commented 4 years ago

Hi, I met some problem when running plotCBSsegments, could you please help me solve it? Thank you.

>plotCBSsegments(cbsFile = 'C:/Users/Meredith/Desktop/maftools/tumor.txt',ref.build = 'hg38')

NULL
Error in rep(chr.colors, seg.spl.transformed[, .N, Chromosome][, N]) : 
  invalid 'times' argument

sessioninfo

> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936  LC_CTYPE=Chinese (Simplified)_China.936   
[3] LC_MONETARY=Chinese (Simplified)_China.936 LC_NUMERIC=C                              
[5] LC_TIME=Chinese (Simplified)_China.936    

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

other attached packages:
[1] data.table_1.12.8 tidyr_1.1.0       dplyr_0.8.5       maftools_2.4.05   ggplot2_3.3.1     ggthemes_4.2.0   

loaded via a namespace (and not attached):
 [1] tinytex_0.23       tidyselect_1.1.0   xfun_0.14          remotes_2.1.1      purrr_0.3.4        lattice_0.20-38   
 [7] splines_3.6.2      colorspace_1.4-1   vctrs_0.3.0        testthat_2.3.2     usethis_1.6.1      survival_3.1-12   
[13] rlang_0.4.6        pkgbuild_1.0.8     pillar_1.4.4       glue_1.4.1         withr_2.2.0        RColorBrewer_1.1-2
[19] sessioninfo_1.1.1  lifecycle_0.2.0    stringr_1.4.0      munsell_0.5.0      gtable_0.3.0       devtools_2.3.0    
[25] memoise_1.1.0      labeling_0.3       callr_3.4.3        ps_1.3.3           fansi_0.4.1        Rcpp_1.0.4.6      
[31] scales_1.1.1       backports_1.1.7    desc_1.2.0         pkgload_1.0.2      farver_2.0.3       fs_1.4.1          
[37] digest_0.6.25      stringi_1.4.6      processx_3.4.2     grid_3.6.2         rprojroot_1.3-2    cli_2.0.2         
[43] tools_3.6.2        magrittr_1.5       tibble_3.0.1       crayon_1.3.4       pkgconfig_2.0.3    ellipsis_0.3.1    
[49] Matrix_1.2-18      prettyunits_1.1.1  assertthat_0.2.1   rstudioapi_0.11    R6_2.4.1           compiler_3.6.2  

here's my example tumor.txt

ShixiangWang commented 4 years ago

Could you try reinstalling maftools by remotes::install_github("PoisonAlien/maftools#540") or remotes::install_github("ShixiangWang/maftools") and run plotting again?

mhlolly commented 4 years ago

Successfully plot. Thank you very much! But there are some probloem. As noted in the documentation: "tsb: If segmentation file contains many samples (as in gistic input), specify sample name here. Defualt plots all samples." However, I plotted only one sample even though I didn't specify the sample name.

The file plotted: Rplot01.pdf

ShixiangWang commented 4 years ago

@mhlolly I modify the option to keep it simple. If you want to plot all samples, set tsb = 'ALL'

mhlolly commented 4 years ago

OK, thanks a lot ♪(・ω・)ノ

clersdom commented 3 years ago

Hi @ShixiangWang I am trying to run

plotCBSsegments(cbsFile = cbsFile_mydat, maf = my_maf, labellAll = TRUE)

Error in plotCBSsegments(cbsFile = cbsFile_mydat, maf = LCars_all22_maf, : unused argument (labellAll = TRUE)

Then, I also tried what you have advised in here:

remotes::install_github("ShixiangWang/maftools") Error: Failed to install 'maftools' from GitHub: HTTP error 404. Not Found

Did you spell the repo owner (ShixiangWang) and repo name (maftools) correctly?

Any advise on how to solve this error? Thanks!

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

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

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

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

other attached packages: [1] dplyr_1.0.0 LncPath_1.1 igraph_1.2.5 edgeR_3.28.1 limma_3.42.2 maftools_2.4.10

loaded via a namespace (and not attached): [1] Rcpp_1.0.4.6 rstudioapi_0.11 magrittr_1.5 splines_3.6.0 tidyselect_1.1.0
[6] BiocParallel_1.20.1 lattice_0.20-38 R6_2.4.1 rlang_0.4.6 tools_3.6.0
[11] grid_3.6.0 data.table_1.12.8 remotes_2.1.1 ellipsis_0.3.1 survival_2.44-1.1
[16] tibble_3.0.1 lifecycle_0.2.0 crayon_1.3.4 Matrix_1.2-17 purrr_0.3.4
[21] RColorBrewer_1.1-2 vctrs_0.3.1 curl_4.3 glue_1.4.1 compiler_3.6.0
[26] pillar_1.4.4 generics_0.0.2 locfit_1.5-9.4 pkgconfig_2.0.3

ShixiangWang commented 3 years ago

Why did you use labellAll = TRUE? This option does not exist. @clersdom Please open a new issue if you have a problem using this function and describe what you expected there.

clersdom commented 3 years ago

https://bioconductor.riken.jp/packages/3.4/bioc/vignettes/maftools/inst/doc/maftools.html#integrating-somatic-variants-and-copy-number-alterations

I wanted to inegrate mutations and copy number data into one plot as in the link. I am not sure if this is by using a different version of maftools perhaps?

Thank you

ShixiangWang commented 3 years ago

See https://bioconductor.org/packages/release/bioc/vignettes/maftools/inst/doc/maftools.html#9_Analysis and the documentation by running ?maftools::plotCBSsegments in R console.

PoisonAlien commented 3 years ago

That is an old vignette. But you can still plot something similar.

> plotCBSsegments(cbsFile = tcga.ab.009.seg, maf = laml, tsb = "TCGA-AB-3009", genes = c("NF1", "CTCF"))

image

clersdom commented 3 years ago

I see. Thank you both, that helps!