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
452 stars 222 forks source link

An error occurred while generating oncoplots #1071

Open haeseo00 opened 2 weeks ago

haeseo00 commented 2 weeks ago

Describe the issue

I am in the process of generating oncoplots. When I executed the command to create the oncoplots, the following error message appeared in <top_bar_data[, colnames(numMat), drop = FALSE]: 'subscript out of bounds.' > As a result, the oncoplots were not generated.

Command I have 38 MAF files, which I merged before proceeding.

maf_directory <- "D:/matched_tissue_MAF_files"
maf_files <- list.files(path = maf_directory, pattern = "\\.maf$", full.names = TRUE)

maf_list <- lapply(maf_files, function(file) {
  read.maf(maf = file)
})

merged_maf <- merge_mafs(maf_list)

print(merged_maf)

tiff(file = "D:/matched_tissue_MAF_files/20241107_ova_wes_matched_tissue_all_oncoprint_hs.tiff",
     width = 18, heigh = 8, units = "in", res = 600)
oncoplot(maf = merged_maf, top = 10)
dev.off()

[error]
top_bar_data[, colnames(numMat), drop = FALSE]: 'subscript out of bounds.'

Session info

R version 4.4.1 (2024-06-14 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)

Matrix products: default

locale:
[1] LC_COLLATE=Korean_Korea.utf8  LC_CTYPE=Korean_Korea.utf8   
[3] LC_MONETARY=Korean_Korea.utf8 LC_NUMERIC=C                 
[5] LC_TIME=Korean_Korea.utf8    

time zone: Asia/Seoul
tzcode source: internal

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

other attached packages:
[1] data.table_1.16.2 dplyr_1.1.4       maftools_2.20.0  

loaded via a namespace (and not attached):
 [1] vctrs_0.6.5        cli_3.6.3          rlang_1.1.4       
 [4] processx_3.8.4     generics_0.1.3     glue_1.8.0        
 [7] ps_1.8.1           pkgbuild_1.4.5     fansi_1.0.6       
[10] grid_4.4.1         tibble_3.2.1       lifecycle_1.0.4   
[13] DNAcopy_1.78.0     compiler_4.4.1     RColorBrewer_1.1-3
[16] pkgconfig_2.0.3    rstudioapi_0.17.1  R.oo_1.27.0       
[19] R.utils_2.12.3     lattice_0.22-6     R6_2.5.1          
[22] tidyselect_1.2.1   utf8_1.2.4         curl_5.2.3        
[25] pillar_1.9.0       splines_4.4.1      callr_3.7.6       
[28] magrittr_2.0.3     R.methodsS3_1.8.2  Matrix_1.7-0      
[31] tools_4.4.1        desc_1.4.3         survival_3.6-4    
[34] remotes_2.5.0
PoisonAlien commented 2 weeks ago

Hi,

It's hard to guess the issue. Is it possible to share the maf object? Also please paste the print(merged_maf) output