timyers / ldlinkr Goto Github PK
View Code? Open in Web Editor NEWLDlinkR: An R package for calculating linkage disequilibrium in human populations of interest
LDlinkR: An R package for calculating linkage disequilibrium in human populations of interest
LDproxy_batch stops processing a list of SNPs when it encounters a variant that is not biallelic.
Prepare for release:
git pull
usethis::use_github_links()
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
revdepcheck::revdep_check()
cran-comments.md
git push
Submit to CRAN:
devtools::submit_cran()
Wait for CRAN...
usethis::use_github_release()
usethis::use_version("minor")
usethis::use_dev_version()
git push all master
Add function for citation of publication
Hello,
Recently I was pointed to your package, which I greatly appreciate. Unfortunately I've run into an issue:
I have SNP data in the format "chr"CHROM:POS, with positions ranging from 7 to 9 digits.
My data is from an imputation server that uses Genome Build 37.
However, LDlinkR only accepts positions of exactly 8 digits. What is the reason for that?
Furthermore, when appending the 7-digit positions with a 0 in front, I get no results either (example: "error: chr10:09062856 is not in dbSNP build 151.")
Thank you in advance.
When using LDproxy_batch(), if append = TRUE option, there's a warning message that the column headings are appended. In the output file, though, there is only on heading at the top, which is perfect.
Hello,
I am really happy to see that this package exists, I have been using LDlink once in a while in the past years, and having some functions to do it easily with R without struggling with the request format and how to parse the output every time is very nice: thank you! :)
I can run your example LDpair(var1 = "rs3", var2 = "rs4", pop = "YRI", token = Sys.getenv("LDLINK_TOKEN"))
without any problem, but I have been having some issue when using pairs of SNPs that are not in LD.
library(LDlinkR)
my_var1 <- "rs2860773"
my_var2 <- "rs2631669"
Using output = text
, everything works:
LDpair(my_var1,
my_var2,
pop="EUR",
token=Sys.getenv("LDLINK_TOKEN"), output = "text")
# Query SNPs:
# rs2860773 (chr2:65665641)
# rs2631669 (chr2:66104881)
#
# EUR Haplotypes:
# rs2631669
# C T
# -----------------
# G | 326 | 273 | 599 (0.595)
# rs2860773 -----------------
# T | 210 | 197 | 407 (0.405)
# -----------------
# 536 470 1006
# (0.533) (0.467)
#
# G_C: 326 (0.324)
# G_T: 273 (0.271)
# T_C: 210 (0.209)
# T_T: 197 (0.196)
#
# D': 0.0316
# R2: 0.0008
# Chi-sq: 0.778
# p-value: 0.3777
#
# rs2860773 and rs2631669 are in linkage equilibrium
But using output = table
(default), I get this error message:
LDpair(my_var1,
my_var2,
pop="EUR",
token=Sys.getenv("LDLINK_TOKEN")
# Error in z[[22]] : subscript out of bounds
From what I understand, it comes from your function table_out()
that expects 22 lines as it is when variants are in LD (in your example):
21 : "rs3(C) allele is correlated with rs4(A) allele"
22 : "rs3(T) allele is correlated with rs4(G) allele"
But when variants are actually in linkage equilibrium, these two lines are replaced by a single one (my example):
21 : "rs2860773 and rs2631669 are in linkage equilibrium"
This should be quite easy to fix! ;)
Thanks again for this very useful package!
Change from 3.5.2 to >= 3.4.2
Add PDF of extended examples as vignette
There is a typo in the vignette that can result in an error. In the step where it asks you to set up the token, it uses LDLINKR_TOKEN but in the examples it uses LDLINK_TOKEN. It's missing the "R" from LDLINK.
Prepare for release:
git pull
urlchecker::url_check()
devtools::check(remote = TRUE, manual = TRUE)
devtools::check_win_devel()
rhub::check_for_cran()
revdepcheck::revdep_check(num_workers = 4)
cran-comments.md
git push
Submit to CRAN:
usethis::use_version('minor')
devtools::submit_cran()
Wait for CRAN...
git push
usethis::use_github_release()
usethis::use_dev_version()
git push
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.