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

Add check for for variant naming consistency #170

Open
oborisov opened this issue Jul 22, 2024 · 0 comments
Open

Add check for for variant naming consistency #170

oborisov opened this issue Jul 22, 2024 · 0 comments

Comments

@oborisov
Copy link

An idea to add check for variant naming consistency. Otherwise coloc.susie errors out with a data.table error which was a bit tricky to debug:

Error in `:=`(idx1, cs1$cs_index[idx1]) : 
  Check that is.data.table(DT) == TRUE. Otherwise, := and `:=`(...) are defined for use in j, once only and in particular ways. See help(":=").

coloc/R/susie.R

Lines 91 to 94 in 3cf19c4

bf1=s1$lbf_variable[idx1,,drop=FALSE]
bf2=s2$lbf_variable[idx2,,drop=FALSE]
ret=coloc.bf_bf(bf1,bf2,...)

 bf1=s1$lbf_variable[idx1,,drop=FALSE] 
 bf2=s2$lbf_variable[idx2,,drop=FALSE] 
 if (identical(intersect(colnames(bf1), colnames(bf2)), character(0))) {stop("There are no variants in common between the datasets, check that the naming is consistent (e.g., check 'colnames(S3$lbf_variable)' and 'colnames(S4$lbf_variable)'")}
 ret=coloc.bf_bf(bf1,bf2,...) 
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

1 participant