Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subset .data outside of a data mask context error #27

Open
shanshenbing opened this issue Sep 8, 2022 · 5 comments
Open

subset .data outside of a data mask context error #27

shanshenbing opened this issue Sep 8, 2022 · 5 comments
Assignees

Comments

@shanshenbing
Copy link

shanshenbing commented Sep 8, 2022

Hello, thank you for your software!
When I run the following command:
results <- pipelineCNA(count_mtx = count_mtx)

I got this:

[1] "found 5 subclones"
percentage_cells_subsclone_1 percentage_cells_subsclone_2 percentage_cells_subsclone_3 percentage_cells_subsclone_4
0.26827012 0.23589269 0.32562442 0.13135985
percentage_cells_subsclone_5
0.03885291
[1] "Segmentation of subclone : 1"
[1] "Segmentation of subclone : 2"
[1] "Segmentation of subclone : 3"
[1] "Segmentation of subclone : 4"
[1] "Segmentation of subclone : 5"
$_subclone1
Chr Start End Alteration segm.mean
88 19 42086110 46788594 -1 -0.130204

$_subclone2
Chr Start End Alteration segm.mean
5 1 174159410 201171574 -2 -0.247542
81 16 53055033 57385048 2 0.367030
45 9 84668551 99970341 -1 -0.118025
60 12 190077 6942321 1 0.145254
94 19 42086110 54670359 -1 -0.127578

$_subclone3
Chr Start End Alteration segm.mean
5 1 168225938 193254815 -1 -0.118066
63 10 21756537 73625953 -1 -0.121260
66 10 126905409 133421307 1 0.156538
75 12 53507856 57132139 1 0.158576

$_subclone4
Chr Start End Alteration segm.mean
49 9 136440096 137870016 1 0.148681
56 12 6942978 13000273 -1 -0.176305
86 19 281040 2096673 1 0.156774
89 19 39391303 49878459 -1 -0.181592

$_subclone5
Chr Start End Alteration segm.mean
3 1 150265399 153986358 2 0.140948
2 1 51236271 150236156 -1 -0.084311
6 1 160995211 205532793 -1 -0.094113
14 3 149517235 197956610 -1 -0.118140
16 4 53377643 82044244 1 0.138069
23 5 134738501 140303121 -1 -0.147511
63 14 73275107 91510554 -1 -0.104558
85 19 16185380 23395560 1 0.148158

$_clone
Chr Start End Alteration segm.mean
76 17 31317560 38853843 -2 -0.404099

$_shareSubclone
Chr Start End Alteration segm.mean sh_sub Mean
_share1.1 2 99337353 120294713 -2 -0.221323 1-3-4 0
_share2.9 2 101696850 127388465 -2 -0.364826 2-3 0
_share1.3 6 30617709 32180793 -2 -0.096464 1-3-4 0
_share2.27 6 30617709 31959110 -2 -0.215626 2-5 0
_share3.3 6 30617709 31817946 -2 -0.158026 3-1-4 0
_share1.5 6 125781161 170407065 -1 -0.141146 1-2-3-4 0
_share2.1 6 127968779 170407065 -1 -0.140886 2-1-3-4 0
_share3.5 6 129576132 170407065 -1 -0.183996 3-1-2-4 0
_share1.46 10 50305586 70233911 -1 -0.124966 1-2 0
_share2.11 10 50305586 69401882 -1 -0.142419 2-1-5 0
_share1.11 11 167784 915058 1 0.187518 1-3-5 0
_share2.56 11 167784 1012245 2 0.213686 2-3 0
_share2.12 17 31317560 38853843 -2 -0.176035 2-1-3-4 0

Error:
! Can't subset .data outside of a data mask context.

can you help me with the error?

When running the command with the data you provided, I got the same error:

load('./MGH106_data.RData')
#myobj <- load(file = './listCountMtx.RData')
results <- SCEVAN::pipelineCNA(count_mtx, sample = "MGH106", par_cores = 20, SUBCLONES = TRUE, plotTree = TRUE)

$MGH106_shareSubclone
Chr Start End Alteration segm.mean sh_sub Mean
MGH106_share1.4 1 23964804 27336400 -2 -0.246198 1-2 0
MGH106_share3.4 1 25818640 28643085 -2 -0.211230 3-2 0
......
MGH106_share2.242 22 36189124 39532855 -2 -0.210030 2-1 0

Error:
! Can't subset .data outside of a data mask context.
Run rlang::last_error() to see where the error occurred.
There were 50 or more warnings (use warnings() to see the first 50)

@AntonioDeFalco
Copy link
Owner

It probably concerns your version of dplyr, which version do you have installed?

@shanshenbing
Copy link
Author

Thank you for the quick answer. My dplyr version is 1.0.8. I'll try a newer version of dplyr and check the result.

@shanshenbing
Copy link
Author

I updated my dplyr to 1.0.10 and run tutorial as this:
library(SCEVAN)
library(dplyr)
load('./MGH106_data.RData')
#myobj <- load(file = './listCountMtx.RData')

results <- SCEVAN::pipelineCNA(count_mtx, sample = "MGH106", par_cores = 20, SUBCLONES = TRUE, plotTree = TRUE)

unfortunately, I got same error.
ttaching package: ‘ggtree’

The following object is masked from ‘package:ape’:

rotate

The following object is masked from ‘package:IRanges’:

collapse

The following object is masked from ‘package:S4Vectors’:

expand

Error:
! Can't subset .data outside of a data mask context.
Run rlang::last_error() to see where the error occurred.

Here is my session info:

sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblas-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
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] ggtree_2.4.2 ape_5.5 tidytree_0.3.4 ggplot2_3.3.6
[5] Rtsne_0.15 igraph_1.2.11 scran_1.18.7 SingleCellExperiment_1.12.0
[9] SummarizedExperiment_1.20.0 Biobase_2.50.0 GenomicRanges_1.42.0 GenomeInfoDb_1.26.7
[13] IRanges_2.24.1 S4Vectors_0.28.1 BiocGenerics_0.36.1 MatrixGenerics_1.2.1
[17] matrixStats_0.62.0 yaGST_2017.08.25 doParallel_1.0.16 iterators_1.0.13
[21] foreach_1.5.1 dplyr_1.0.10 SCEVAN_1.0.1

loaded via a namespace (and not attached):
[1] nlme_3.1-152 bitops_1.0-7 RColorBrewer_1.1-3 tools_4.0.5
[5] utf8_1.2.1 R6_2.5.0 irlba_2.3.3 DBI_1.1.1
[9] lazyeval_0.2.2 colorspace_2.0-3 withr_2.4.2 tidyselect_1.1.1
[13] compiler_4.0.5 parallelDist_0.2.4 textshaping_0.3.6 cli_3.3.0
[17] BiocNeighbors_1.8.2 DelayedArray_0.16.3 labeling_0.4.2 scales_1.1.1
[21] systemfonts_1.0.2 digest_0.6.29 XVector_0.30.0 pkgconfig_2.0.3
[25] sparseMatrixStats_1.2.1 limma_3.46.0 rlang_1.0.4 rstudioapi_0.13
[29] DelayedMatrixStats_1.12.3 farver_2.1.0 generics_0.1.0 jsonlite_1.7.2
[33] BiocParallel_1.24.1 RCurl_1.98-1.5 magrittr_2.0.1 BiocSingular_1.6.0
[37] GenomeInfoDbData_1.2.4 scuttle_1.0.4 patchwork_1.1.1 Matrix_1.3-3
[41] Rcpp_1.0.6 munsell_0.5.0 fansi_0.4.2 lifecycle_1.0.1
[45] yaml_2.2.1 edgeR_3.32.1 zlibbioc_1.36.0 grid_4.0.5
[49] dqrng_0.3.0 crayon_1.5.1 lattice_0.20-44 beachmat_2.6.4
[53] locfit_1.5-9.4 pillar_1.8.0 codetools_0.2-18 glue_1.6.0
[57] BiocManager_1.30.16 RcppParallel_5.1.4 treeio_1.14.4 vctrs_0.4.1
[61] gtable_0.3.0 purrr_0.3.4 tidyr_1.2.0 assertthat_0.2.1
[65] rsvd_1.0.5 ragg_1.1.3 tibble_3.1.8 pheatmap_1.0.12
[69] aplot_0.0.6 rvcheck_0.1.8 bluster_1.0.0 statmod_1.4.36

Hope for help.

@AntonioDeFalco
Copy link
Owner

Hi @shanshenbing.
I found the problem that unfortunately depends on ggtree library which I use to make the Phylogenetic tree graph that necessarily wants version 1.05 of dplyr otherwise it gives this error (YuLab-SMU/ggtree#399).

While I find the solution to this error, you can either disable this graph with the parameter plotTree=FALSE or install the old 1.05 version of dplyr.

Thanks. Regards

@shanshenbing
Copy link
Author

Thank you for your hard work. I get it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants