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 pairwise LD api for linkage #117

Open
Lipastomies opened this issue May 13, 2020 · 2 comments
Open

Add pairwise LD api for linkage #117

Lipastomies opened this issue May 13, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Lipastomies
Copy link
Collaborator

pairwise LD api would be very good for getting credible set LD, as discussed in #103.

In PLINK, I can use the --r2 flag with --ld-snp-list flag.

In online api, I'll have to fetch appropriate range and filter the results, but it's not too much of a hassle.

@Lipastomies Lipastomies added the enhancement New feature or request label May 13, 2020
@Lipastomies Lipastomies self-assigned this May 13, 2020
@Lipastomies
Copy link
Collaborator Author

Also really important because sometimes credible sets span quite a long distance, so the normal LD window might not be large enough. Can be seen in http://results.finngen.fi/region/C3_BREAST_EXALLC/9:107191059-107691059, where the 4th susie credible set spans almost 3MB, and the variant with largest PIP is over 2 MB from the variant with largest position.

@Lipastomies
Copy link
Collaborator Author

I looked at the possibilities for the different APIs, and here's my impressions:

plink has pairwise API for only 1 variant pair at a time, which is ridiculous. The calculation time for one pair is dominated by the need to load the allele frequencies into the computer memory. It might be better to just use the range-based LD calculation, and adjust the range based on the variants that were supplied to the function.

LD server has only LD for a range. It can be used as long as the distance between two variants is less than 2.5MB. The output then needs to be filtered down to the correct pairs, but that's quite simple.

Seems like for both of those LD backends, it's best to use the range-based calculation and then filter out the desired results.

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

No branches or pull requests

1 participant