ShixiangWang / DoAbsolute

:package: Automate Absolute Copy Number Calling using 'ABSOLUTE' package
Other
36 stars 11 forks source link

Result file examples.ABSOLUTE.RData does not exist, drop it. #24

Closed pigyun906 closed 1 year ago

pigyun906 commented 1 year ago

Hi, thank you for developing a useful tool.

As written #21 #22, I experienced the same error.

When I followed your example code and files, I met these errors. -> Setting results directory as test -> Removed previous error log file. -> Loading segmentation data... -> Loading Maf data... -> Checking data format of segmentation file... -> Keeping only chr 1-23 for CNV data... -> Keeping only chr 1-23 for Maf data... -> Creating temp directory ... -> Setting temp directory as /tmp/RtmpCPwIVY/Absolute -> Spliting seg data of samples to different files... --> Processing sample TCGA-DK-A1A6-10 ... ---> This sample has not Maf data, skipping... --> Processing sample TCGA-DK-A1A6-01 ... ---> Filtering mutations which vaf< 0.1 ... ---> Filtering Maf which count< 5 ... ---> Outputing corresponding Maf file... --> Processing sample TCGA-DK-A1A6-06 ... ---> Filtering mutations which vaf< 0.1 ... ---> Filtering Maf which count< 5 ... ---> Outputing corresponding Maf file... -> Spliting seg data of samples done. -> Running RunAbsolute...(be patient) -> RunAbsolute done. Retrieving results... --> Files in cache directory: [1] "tmp" -> Checking result files... Warning in DoAbsolute(Seg = Seg, Maf = Maf, platform = "SNP_6.0", copy.num.type = "total", : --> Result file /tmp/RtmpCPwIVY/Absolute/cache/TCGA-DK-A1A6-10.ABSOLUTE.RData does not exist, drop it. Warning in DoAbsolute(Seg = Seg, Maf = Maf, platform = "SNP_6.0", copy.num.type = "total", : --> Result file /tmp/RtmpCPwIVY/Absolute/cache/TCGA-DK-A1A6-01.ABSOLUTE.RData does not exist, drop it. Warning in DoAbsolute(Seg = Seg, Maf = Maf, platform = "SNP_6.0", copy.num.type = "total", : --> Result file /tmp/RtmpCPwIVY/Absolute/cache/TCGA-DK-A1A6-06.ABSOLUTE.RData does not exist, drop it. Error in DoAbsolute(Seg = Seg, Maf = Maf, platform = "SNP_6.0", copy.num.type = "total", : No result file to proceed.

The RData files are not created in the /tmp/RtmpCPwIVY/Absolute/cache/ folder, and when I modified the source code and checked the Rdata file, $mode.flag was "OVERSEG". I reinstalled ABSOLUTE and DoAbsolute by referring to the previous article, but I still have the same problem.

Thank you in advance for your help.

ShixiangWang commented 1 year ago

I will try the latest code and see if I can reproduce this. @pigyun906

pigyun906 commented 1 year ago

These are the first error logs I encountered

Detected error in sample TCGA-DK-A1A6-10 
Error message: the condition has length > 1 
Skipping this sample.
========
Detected error in sample TCGA-DK-A1A6-06 
Error message: the condition has length > 1 
Skipping this sample.
========
Detected error in sample TCGA-DK-A1A6-01 
Error message: the condition has length > 1 
Skipping this sample.
========

I attached my R environments.

> sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblasp-r0.3.3.so

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] parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] data.table_1.14.6   DoAbsolute_2.2.0    ABSOLUTE_1.0.6      numDeriv_2016.8-1.1

loaded via a namespace (and not attached):
 [1] remotes_2.4.2       purrr_0.3.4         DNAcopy_1.70.0      splines_4.2.0       lattice_0.20-45     miniUI_0.1.1.1      htmltools_0.5.3    
 [8] usethis_2.1.6       survival_3.4-0      rlang_1.0.6         pkgbuild_1.3.1      later_1.3.0         urlchecker_1.0.1    glue_1.6.2         
[15] withr_2.5.0         RColorBrewer_1.1-3  sessioninfo_1.2.2   foreach_1.5.2       lifecycle_1.0.3     stringr_1.4.1       gtable_0.3.1       
[22] devtools_2.4.5      htmlwidgets_1.5.4   codetools_0.2-18    memoise_2.0.1       callr_3.7.2         fastmap_1.1.0       doParallel_1.0.17  
[29] httpuv_1.6.6        ps_1.7.1            curl_4.3.2          Rcpp_1.0.9          xtable_1.8-4        promises_1.2.0.1    BiocManager_1.30.18
[36] cachem_1.0.6        pkgload_1.3.0       mime_0.12           fs_1.5.2            digest_0.6.29       stringi_1.7.8       processx_3.7.0     
[43] shiny_1.7.2         maftools_2.12.0     grid_4.2.0          rprojroot_2.0.3     cli_3.4.1           tools_4.2.0         magrittr_2.0.3     
[50] profvis_0.3.7       crayon_1.5.2        ellipsis_0.3.2      Matrix_1.5-1        prettyunits_1.1.1   rstudioapi_0.14     iterators_1.0.14   
[57] R6_2.5.1            compiler_4.2.0

Also, I checked the error as a result of the below code

mode.res = ABSOLUTE:::FitSample(seg.dat, mut, kQ, pi_theta_qz, sigma.h, 
                                                    kTauDom, kSigmaHDom, chr.arms.dat, verbose = verbose)
Error in if (is.na(mode.tab)) { : the condition has length > 1
In addition: Warning message:
In nlm(f = comb_1d_ll, p = d_grid[i], Q = Q, obs = obs, lambda_qz_res = lambda_qz_res,  :
  NA/Inf replaced by maximum positive value

Thank you

ShixiangWang commented 1 year ago

@pigyun906 I cannot reproduce this with the latest version from GitHub. I see you have installed the latest DoAbsolute, so please run the following code:

path_to_file = system.file("extdata", "ABSOLUTE_1.0.6.tar.gz", package = "DoAbsolute", mustWork = T)
install.packages(path_to_file, repos = NULL, type="source")

Then restart R session, and rerun the example test code again.

pigyun906 commented 1 year ago

I don't know what the problem was, but I followed your suggestion, and now it runs well. Maybe it was my mistake.

Thank you very much.