akdess / CaSpER

78 stars 28 forks source link

error of loh <- readBAFExtractOutput #62

Open deb0612 opened 3 years ago

deb0612 commented 3 years ago

Dear sir, I tried to create loh and got error below:

loh <- readBAFExtractOutput ( path="RNA-leukemia002A_baf", sequencing.type="bulk") Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file 'RNA-leukemia002A_baf/NA': No such file or directory

lmasatti commented 3 years ago

Hi, Try to change the path, you need to fill it with the path of the folder where you have your file instead of the name of the file. At the same time your file need to be a ".snp" file not an "_baf", change both and see if it works.

rLannes commented 3 years ago

Hi, Thanks for making casper!

Unfortunately, I got the same issue, cmd and results :

loh <- readBAFExtractOutput( path="/Users/romain/Documents/reviewJCO/test_baf_T19979",

  • sequencing.type="bulk") Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file '/Users/romain/Documents/reviewJCO/test_baf_T19979/NA': No such file or directory names(loh) <- gsub(".snp", "", names(loh)) Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'gsub': object 'loh' not found

my directory is: test_baf_T19979 my file is: test_baf_T19979.snp The content of the directory is: % ls /Users/romain/Documents/reviewJCO/test_baf_T19979
10_allele_counts.bin 13_allele_counts.bin 16_allele_counts.bin 19_allele_counts.bin 21_allele_counts.bin 3_allele_counts.bin 6_allele_counts.bin 9_allele_counts.bin 11_allele_counts.bin 14_allele_counts.bin 17_allele_counts.bin 1_allele_counts.bin 22_allele_counts.bin 4_allele_counts.bin 7_allele_counts.bin X_allele_counts.bin 12_allele_counts.bin 15_allele_counts.bin 18_allele_counts.bin 20_allele_counts.bin 2_allele_counts.bin 5_allele_counts.bin 8_allele_counts.bin Y_allele_counts.bin

Thank for your help.

sessionInfo() R version 4.1.1 (2021-08-10) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Big Sur 11.5.2

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages: [1] CaSpER_0.2.0 GenomicRanges_1.44.0 GenomeInfoDb_1.28.4 GOstats_2.58.0
[5] graph_1.70.0 Category_2.58.0 org.Hs.eg.db_3.13.0 GO.db_3.13.0
[9] AnnotationDbi_1.54.1 Biobase_2.52.0 limma_3.48.3 biomaRt_2.48.3
[13] ape_5.5 ggnetwork_0.5.10 intergraph_2.0-2 igraph_1.2.6
[17] gridExtra_2.3 ggpubr_0.4.0 mclust_5.4.7 reshape_0.8.8
[21] IRanges_2.26.0 S4Vectors_0.30.0 BiocGenerics_0.38.0 pheatmap_1.0.12
[25] signal_0.7-7 Rcpp_1.0.7 umap_0.2.7.0 reticulate_1.22
[29] Rtsne_0.15 gridGraphics_0.5-1 beanplot_1.2 RColorBrewer_1.1-2
[33] scales_1.1.1 viridis_0.6.1 viridisLite_0.4.0 ggridges_0.5.3
[37] ggplot2_3.3.5 svd_0.5 qlcMatrix_0.9.7 sparsesvd_0.2
[41] slam_0.1-48 dplyr_1.0.7 devtools_2.4.2 usethis_2.0.1
[45] robustbase_0.93-9 SeuratObject_4.0.2 Seurat_4.0.4 infercnv_1.8.1
[49] Matrix_1.3-4

loaded via a namespace (and not attached): [1] rappdirs_0.3.3 AnnotationForge_1.34.0 scattermore_0.7
[4] coda_0.19-4 tidyr_1.1.3 bit64_4.0.5
[7] irlba_2.3.3 multcomp_1.4-17 DelayedArray_0.18.0
[10] data.table_1.14.0 rpart_4.1-15 KEGGREST_1.32.0
[13] RCurl_1.98-1.5 doParallel_1.0.16 generics_0.1.0
[16] callr_3.7.0 cowplot_1.1.1 lambda.r_1.2.4
[19] TH.data_1.0-10 RSQLite_2.2.8 RANN_2.6.1
[22] future_1.22.1 bit_4.0.4 xml2_1.3.2
[25] spatstat.data_2.1-0 httpuv_1.6.3 SummarizedExperiment_1.22.0 [28] assertthat_0.2.1 hms_1.1.0 promises_1.2.0.1
[31] argparse_2.1.1 progress_1.2.2 DEoptimR_1.0-9
[34] fansi_0.5.0 dbplyr_2.1.1 caTools_1.18.2
[37] readxl_1.3.1 Rgraphviz_2.36.0 DBI_1.1.1
[40] htmlwidgets_1.5.4 futile.logger_1.4.3 spatstat.geom_2.2-2
[43] purrr_0.3.4 ellipsis_0.3.2 RSpectra_0.16-0
[46] backports_1.2.1 annotate_1.70.0 libcoin_1.0-8
[49] deldir_0.2-10 MatrixGenerics_1.4.3 vctrs_0.3.8
[52] SingleCellExperiment_1.14.1 remotes_2.4.0 ROCR_1.0-11
[55] abind_1.4-5 cachem_1.0.6 withr_2.4.2
[58] sctransform_0.3.2 prettyunits_1.1.1 goftest_1.2-2
[61] cluster_2.1.2 lazyeval_0.2.2 crayon_1.4.1
[64] genefilter_1.74.0 labeling_0.4.2 edgeR_3.34.1
[67] pkgconfig_2.0.3 nlme_3.1-153 pkgload_1.2.2
[70] rlang_0.4.11 globals_0.14.0 lifecycle_1.0.0
[73] miniUI_0.1.1.1 sandwich_3.0-1 filelock_1.0.2
[76] BiocFileCache_2.0.0 cellranger_1.1.0 rprojroot_2.0.2
[79] polyclip_1.10-0 matrixStats_0.61.0 lmtest_0.9-38
[82] carData_3.0-4 zoo_1.8-9 processx_3.5.2
[85] png_0.1-7 bitops_1.0-7 KernSmooth_2.23-20
[88] Biostrings_2.60.2 blob_1.2.2 stringr_1.4.0
[91] coin_1.4-1 parallelly_1.28.1 rstatix_0.7.0
[94] ggsignif_0.6.3 GSEABase_1.54.0 memoise_2.0.0
[97] magrittr_2.0.1 plyr_1.8.6 ica_1.0-2
[100] gplots_3.1.1 zlibbioc_1.38.0 compiler_4.1.1
[103] fitdistrplus_1.1-5 cli_3.0.1 XVector_0.32.0
[106] listenv_0.8.0 patchwork_1.1.1 pbapply_1.5-0
[109] ps_1.6.0 formatR_1.11 MASS_7.3-54
[112] mgcv_1.8-36 tidyselect_1.1.1 stringi_1.7.4
[115] forcats_0.5.1 askpass_1.1 locfit_1.5-9.4
[118] ggrepel_0.9.1 tools_4.1.1 future.apply_1.8.1
[121] rio_0.5.27 rstudioapi_0.13 foreach_1.5.1
[124] foreign_0.8-81 rjags_4-10 farver_2.1.0
[127] digest_0.6.28 shiny_1.7.0 car_3.0-11
[130] broom_0.7.9 later_1.3.0 RcppAnnoy_0.0.19
[133] httr_1.4.2 colorspace_2.0-2 XML_3.99-0.8
[136] fs_1.5.0 tensor_1.5 splines_4.1.1
[139] RBGL_1.68.0 uwot_0.1.10 spatstat.utils_2.2-0
[142] phyclust_0.1-30 plotly_4.9.4.1 sessioninfo_1.1.1
[145] xtable_1.8-4 jsonlite_1.7.2 futile.options_1.0.1
[148] modeltools_0.2-23 testthat_3.0.4 R6_2.5.1
[151] pillar_1.6.2 htmltools_0.5.2 mime_0.11
[154] glue_1.4.2 fastmap_1.1.0 codetools_0.2-18
[157] pkgbuild_1.2.0 mvtnorm_1.1-2 utf8_1.2.2
[160] lattice_0.20-45 spatstat.sparse_2.0-0 tibble_3.1.4
[163] network_1.17.1 curl_4.3.2 leiden_0.3.9
[166] gtools_3.9.2 zip_2.2.0 openxlsx_4.2.4
[169] openssl_1.4.5 survival_3.2-13 statnet.common_4.5.0
[172] docopt_0.7.1 desc_1.3.0 munsell_0.5.0
[175] fastcluster_1.2.3 GenomeInfoDbData_1.2.6 iterators_1.0.13
[178] haven_2.4.3 reshape2_1.4.4 gtable_0.3.0
[181] spatstat.core_2.3-0

gr8ape commented 2 years ago

@rLannes Did you ever sort this out? I encountered the exact same issue. I was able to get around by 1) replacing .baf files with .snp extensions and 2) placing them within a subdirectory, under the original baf results folder call "/bulk" . Not sure if this is something to do with versioning, but this requirement was not listed in the documentation.

SaritaPoonia commented 2 years ago

I also encountered the same issue and solved it in 2 steps given by @gr8ape.

jgarces02 commented 2 years ago

Hi @rLannes, where did you find files _XX_allelecounts.bin? Thanks

rLannes commented 2 years ago

Hi @rLannes, where did you find files _XX_allelecounts.bin? Thanks

sorry, it was 6 months go. I don't remember... and I did not keep those files. Good luck!

sunshine1126 commented 1 year ago

Hi, Thanks for making casper!

Unfortunately, I got the same issue, cmd and results :

loh <- readBAFExtractOutput( path="/Users/romain/Documents/reviewJCO/test_baf_T19979",

  •                        sequencing.type="bulk")

Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file '/Users/romain/Documents/reviewJCO/test_baf_T19979/NA': No such file or directory

names(loh) <- gsub(".snp", "", names(loh)) Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'gsub': object 'loh' not found

my directory is: test_baf_T19979 my file is: test_baf_T19979.snp The content of the directory is: % ls /Users/romain/Documents/reviewJCO/test_baf_T19979 10_allele_counts.bin 13_allele_counts.bin 16_allele_counts.bin 19_allele_counts.bin 21_allele_counts.bin 3_allele_counts.bin 6_allele_counts.bin 9_allele_counts.bin 11_allele_counts.bin 14_allele_counts.bin 17_allele_counts.bin 1_allele_counts.bin 22_allele_counts.bin 4_allele_counts.bin 7_allele_counts.bin X_allele_counts.bin 12_allele_counts.bin 15_allele_counts.bin 18_allele_counts.bin 20_allele_counts.bin 2_allele_counts.bin 5_allele_counts.bin 8_allele_counts.bin Y_allele_counts.bin

Thank for your help.

sessionInfo() R version 4.1.1 (2021-08-10) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Big Sur 11.5.2

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages: [1] CaSpER_0.2.0 GenomicRanges_1.44.0 GenomeInfoDb_1.28.4 GOstats_2.58.0 [5] graph_1.70.0 Category_2.58.0 org.Hs.eg.db_3.13.0 GO.db_3.13.0 [9] AnnotationDbi_1.54.1 Biobase_2.52.0 limma_3.48.3 biomaRt_2.48.3 [13] ape_5.5 ggnetwork_0.5.10 intergraph_2.0-2 igraph_1.2.6 [17] gridExtra_2.3 ggpubr_0.4.0 mclust_5.4.7 reshape_0.8.8 [21] IRanges_2.26.0 S4Vectors_0.30.0 BiocGenerics_0.38.0 pheatmap_1.0.12 [25] signal_0.7-7 Rcpp_1.0.7 umap_0.2.7.0 reticulate_1.22 [29] Rtsne_0.15 gridGraphics_0.5-1 beanplot_1.2 RColorBrewer_1.1-2 [33] scales_1.1.1 viridis_0.6.1 viridisLite_0.4.0 ggridges_0.5.3 [37] ggplot2_3.3.5 svd_0.5 qlcMatrix_0.9.7 sparsesvd_0.2 [41] slam_0.1-48 dplyr_1.0.7 devtools_2.4.2 usethis_2.0.1 [45] robustbase_0.93-9 SeuratObject_4.0.2 Seurat_4.0.4 infercnv_1.8.1 [49] Matrix_1.3-4

loaded via a namespace (and not attached): [1] rappdirs_0.3.3 AnnotationForge_1.34.0 scattermore_0.7 [4] coda_0.19-4 tidyr_1.1.3 bit64_4.0.5 [7] irlba_2.3.3 multcomp_1.4-17 DelayedArray_0.18.0 [10] data.table_1.14.0 rpart_4.1-15 KEGGREST_1.32.0 [13] RCurl_1.98-1.5 doParallel_1.0.16 generics_0.1.0 [16] callr_3.7.0 cowplot_1.1.1 lambda.r_1.2.4 [19] TH.data_1.0-10 RSQLite_2.2.8 RANN_2.6.1 [22] future_1.22.1 bit_4.0.4 xml2_1.3.2 [25] spatstat.data_2.1-0 httpuv_1.6.3 SummarizedExperiment_1.22.0 [28] assertthat_0.2.1 hms_1.1.0 promises_1.2.0.1 [31] argparse_2.1.1 progress_1.2.2 DEoptimR_1.0-9 [34] fansi_0.5.0 dbplyr_2.1.1 caTools_1.18.2 [37] readxl_1.3.1 Rgraphviz_2.36.0 DBI_1.1.1 [40] htmlwidgets_1.5.4 futile.logger_1.4.3 spatstat.geom_2.2-2 [43] purrr_0.3.4 ellipsis_0.3.2 RSpectra_0.16-0 [46] backports_1.2.1 annotate_1.70.0 libcoin_1.0-8 [49] deldir_0.2-10 MatrixGenerics_1.4.3 vctrs_0.3.8 [52] SingleCellExperiment_1.14.1 remotes_2.4.0 ROCR_1.0-11 [55] abind_1.4-5 cachem_1.0.6 withr_2.4.2 [58] sctransform_0.3.2 prettyunits_1.1.1 goftest_1.2-2 [61] cluster_2.1.2 lazyeval_0.2.2 crayon_1.4.1 [64] genefilter_1.74.0 labeling_0.4.2 edgeR_3.34.1 [67] pkgconfig_2.0.3 nlme_3.1-153 pkgload_1.2.2 [70] rlang_0.4.11 globals_0.14.0 lifecycle_1.0.0 [73] miniUI_0.1.1.1 sandwich_3.0-1 filelock_1.0.2 [76] BiocFileCache_2.0.0 cellranger_1.1.0 rprojroot_2.0.2 [79] polyclip_1.10-0 matrixStats_0.61.0 lmtest_0.9-38 [82] carData_3.0-4 zoo_1.8-9 processx_3.5.2 [85] png_0.1-7 bitops_1.0-7 KernSmooth_2.23-20 [88] Biostrings_2.60.2 blob_1.2.2 stringr_1.4.0 [91] coin_1.4-1 parallelly_1.28.1 rstatix_0.7.0 [94] ggsignif_0.6.3 GSEABase_1.54.0 memoise_2.0.0 [97] magrittr_2.0.1 plyr_1.8.6 ica_1.0-2 [100] gplots_3.1.1 zlibbioc_1.38.0 compiler_4.1.1 [103] fitdistrplus_1.1-5 cli_3.0.1 XVector_0.32.0 [106] listenv_0.8.0 patchwork_1.1.1 pbapply_1.5-0 [109] ps_1.6.0 formatR_1.11 MASS_7.3-54 [112] mgcv_1.8-36 tidyselect_1.1.1 stringi_1.7.4 [115] forcats_0.5.1 askpass_1.1 locfit_1.5-9.4 [118] ggrepel_0.9.1 tools_4.1.1 future.apply_1.8.1 [121] rio_0.5.27 rstudioapi_0.13 foreach_1.5.1 [124] foreign_0.8-81 rjags_4-10 farver_2.1.0 [127] digest_0.6.28 shiny_1.7.0 car_3.0-11 [130] broom_0.7.9 later_1.3.0 RcppAnnoy_0.0.19 [133] httr_1.4.2 colorspace_2.0-2 XML_3.99-0.8 [136] fs_1.5.0 tensor_1.5 splines_4.1.1 [139] RBGL_1.68.0 uwot_0.1.10 spatstat.utils_2.2-0 [142] phyclust_0.1-30 plotly_4.9.4.1 sessioninfo_1.1.1 [145] xtable_1.8-4 jsonlite_1.7.2 futile.options_1.0.1 [148] modeltools_0.2-23 testthat_3.0.4 R6_2.5.1 [151] pillar_1.6.2 htmltools_0.5.2 mime_0.11 [154] glue_1.4.2 fastmap_1.1.0 codetools_0.2-18 [157] pkgbuild_1.2.0 mvtnorm_1.1-2 utf8_1.2.2 [160] lattice_0.20-45 spatstat.sparse_2.0-0 tibble_3.1.4 [163] network_1.17.1 curl_4.3.2 leiden_0.3.9 [166] gtools_3.9.2 zip_2.2.0 openxlsx_4.2.4 [169] openssl_1.4.5 survival_3.2-13 statnet.common_4.5.0 [172] docopt_0.7.1 desc_1.3.0 munsell_0.5.0 [175] fastcluster_1.2.3 GenomeInfoDbData_1.2.6 iterators_1.0.13 [178] haven_2.4.3 reshape2_1.4.4 gtable_0.3.0 [181] spatstat.core_2.3-0

@rLannes Hello. Have you solved this problem yet? I still have the same problem. Thanks.

WX20230810-165639@2x