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

Handle insertions/deletions coded as I/D in snp_match() #494

Open
privefl opened this issue Apr 18, 2024 · 2 comments
Open

Handle insertions/deletions coded as I/D in snp_match() #494

privefl opened this issue Apr 18, 2024 · 2 comments

Comments

@privefl
Copy link
Owner

privefl commented Apr 18, 2024

No description provided.

@privefl
Copy link
Owner Author

privefl commented Apr 18, 2024

It is useful when only one data frame is coding insertions/deletions like this.

I think we can simply use {dplyr} to transform the other data frame in the same format with

mutate(no_ID = (nchar(a0) + nchar(a1)) == 2,
       a0 = ifelse(no_ID, a0, ifelse(nchar(a0) == 1, "D", "I")),
       a1 = ifelse(no_ID, a1, ifelse(nchar(a1) == 1, "D", "I")),
       no_ID = NULL)

@privefl privefl closed this as completed Apr 18, 2024
@privefl
Copy link
Owner Author

privefl commented Apr 18, 2024

Maybe should implement this directly in snp_match() somehow.

@privefl privefl reopened this Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant