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

! Can't subset .data outside of a data mask context #9

Open
ChingWen-Chang opened this issue May 30, 2022 · 1 comment
Open

! Can't subset .data outside of a data mask context #9

ChingWen-Chang opened this issue May 30, 2022 · 1 comment

Comments

@ChingWen-Chang
Copy link

Dear Ninon,

I encounter an error message when I running bGWAS v1.0.2.. I tried to run your provided data without any modification. However, when I run the below code, there is always an error: ! Can't subset .data outside of a data mask context.

A = bGWAS(name="Test_UsingSmallDataFrame",
GWAS = SmallGWAS_Timmers2019,
prior_studies = MyStudies,
stepwise_threshold = 0.05)

I tried to fix the issue but was unsuccessful. Would you please fix this issue?

Many thanks, 😊
Ching-Wen

Here is the script for the analysis:
A = bGWAS(name="Test_UsingSmallDataFrame",
GWAS = SmallGWAS_Timmers2019,
prior_studies = MyStudies,
stepwise_threshold = 0.05)

and here are the log output:
<<< Estimation of the prior >>>

Creating the full Z-Matrix

Loading the ZMatrix...

Selecting studies :
4 studies
6,811,310 SNPs

Adding data from the conventional GWAS :

"GWAS"
Done!
286,807 SNPs in common between prior studies and the conventional GWAS

Computing prior

Calculating the prior chromosome by chromosome...

Chromosome 1
Running regression,
Calculating prior estimates for SNPs on this chromosome,
Calculating prior standard errors for SNPs on this chromosome,
Error:
! Can't subset .data outside of a data mask context.
Run rlang::last_error() to see where the error occurred.

@PaulTimmers
Copy link

PaulTimmers commented Jun 7, 2022

I'm using R version 4.1.3 and managed to fix this problem by replacing .data$. to . in the bind_rows functions inside the compute_prior bGWAS function.

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