-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #529 from remlapmot/v0-6-5
TwoSampleMR 0.6.5
- Loading branch information
Showing
20 changed files
with
228 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: TwoSampleMR | ||
Title: Two Sample MR Functions and Interface to MR Base Database | ||
Version: 0.6.4 | ||
Version: 0.6.5 | ||
Authors@R: c( | ||
person("Gibran", "Hemani", , "[email protected]", role = c("aut", "cre"), | ||
comment = c(ORCID = "0000-0003-0920-1055")), | ||
|
@@ -69,4 +69,4 @@ Remotes: | |
WSpiller/RadialMR | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.3.1 | ||
RoxygenNote: 7.3.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,43 @@ | ||
context("ld") | ||
|
||
test_that("extract some data", { | ||
skip("Skip unless you have good access to the API.") | ||
skip_on_ci() | ||
skip_on_cran() | ||
a <- extract_instruments(2, clump=FALSE) | ||
out <- clump_data(a) | ||
}) | ||
skip_if_offline() | ||
skip_if_offline(host = "api.opengwas.io") | ||
skip_on_cran() | ||
|
||
# extract some data | ||
a <- try(extract_instruments("ieu-a-2", clump=FALSE)) | ||
if (class(a) == "try-error") skip("Server issues") | ||
out <- try(clump_data(a)) | ||
if (class(out) == "try-error") skip("Server issues") | ||
|
||
|
||
test_that("clump", { | ||
skip("Skip unless you have good access to the API.") | ||
skip_on_ci() | ||
skip_on_cran() | ||
skip_if_not(exists('a'), "a not created in test above") | ||
skip_if_not(exists('out'), "out not created in test above") | ||
expect_equal(ncol(a), ncol(out)) | ||
expect_true(nrow(a) > nrow(out)) | ||
expect_true(nrow(out) > 0) | ||
}) | ||
|
||
|
||
test_that("matrix", { | ||
skip("Skip unless you have good access to the API.") | ||
skip_on_ci() | ||
skip_on_cran() | ||
b <- ld_matrix(out$SNP) | ||
skip_if_not(exists('out'), "out not created in test above") | ||
b <- try(ld_matrix(out$SNP)) | ||
if (inherits(b, "try-error")) skip("Server issues") | ||
expect_equal(nrow(b), nrow(out)) | ||
expect_equal(ncol(b), nrow(out)) | ||
}) | ||
|
||
|
||
test_that("clump multiple", { | ||
skip("Skip unless you have good access to the API.") | ||
skip_on_ci() | ||
skip_on_cran() | ||
a <- extract_instruments(c("ieu-a-2", "ieu-a-1001"), clump=FALSE) | ||
a <- try(extract_instruments(c("ieu-a-2", "ieu-a-1001"), clump=FALSE)) | ||
if (class(a) == "try-error") skip("Server issues") | ||
out <- clump_data(a) | ||
expect_equal(length(unique(a$id.exposure)), length(unique(out$id.exposure))) | ||
}) | ||
|
||
test_that("clump local", { | ||
skip("Skip unless you're GH running this test locally.") | ||
skip_on_ci() | ||
skip_on_cran() | ||
skip_if_not(exists('a'), "a not created in test above") | ||
skip_if_not(file.exists("/Users/gh13047/repo/opengwas-api-internal/opengwas-api/app/ld_files/EUR.bim")) | ||
aclump <- clump_data(a, bfile="/Users/gh13047/repo/opengwas-api-internal/opengwas-api/app/ld_files/EUR", plink_bin="plink") | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.