Skip to content

Commit 89d360b

Browse files
fixed issues for cran release
1 parent def351f commit 89d360b

File tree

6 files changed

+12
-17
lines changed

6 files changed

+12
-17
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: ieugwasr
22
Title: Interface to the 'OpenGWAS' Database API
3-
Version: 0.1.7
3+
Version: 0.2.0
44
Authors@R: c(
55
person("Gibran", "Hemani", , "g.hemani@bristol.ac.uk", role = c("aut", "cre", "cph"),
66
comment = c(ORCID = "0000-0003-0920-1055")),

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# ieugwasr 0.2.0
2+
* Moving API address to https://api.opengwas.org/api/
3+
* Fixing issues for CRAN release
4+
15
# ieugwasr 0.1.7
26
* Added functions to write LD scores files into compressed `.gz` files for each super-population and divided by chromosomes.
37
* Added argument to output [gwasglue2](https://mrcieu.github.io/gwasglue2/) objects in `ieugwasr::tophits()` and `ieugwasr::associations()`.

R/api.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
select_api <- function(where="public", silent=FALSE)
1010
{
1111
url <- switch(where,
12-
public = "http://gwas-api.mrcieu.ac.uk/",
12+
public = "https://api.opengwas.io/api/",
1313
private = "http://ieu-db-interface.epi.bris.ac.uk:8082/",
1414
dev1 = "http://localhost:8019/",
1515
dev2 = "http://127.0.0.1:5000/"

R/query.R

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -241,19 +241,9 @@ batches <- function(access_token = check_access_token())
241241
#' if not then does not perform authentication
242242
#'
243243
#' @export
244-
#' @return Dataframe. If `gwasglue = TRUE` then returns a gwasglue2 object.
244+
#' @return Dataframe
245245
associations <- function(variants, id, proxies=1, r2=0.8, align_alleles=1, palindromes=1, maf_threshold = 0.3, access_token=check_access_token()){
246246

247-
# Query specific variants from specific GWAS using associations_query internal function (old version)
248-
out <- associations_query(variants=variants, id=id, proxies=proxies, r2=r2, align_alleles=align_alleles, palindromes=palindromes, maf_threshold=maf_threshold, access_token=access_token)
249-
250-
return(out)
251-
}
252-
253-
254-
# Query specific variants from specific GWAS - associations internal function to allow for future gwasglue2 integration
255-
associations_query <- function(variants=variants, id=id, proxies=proxies, r2=r2, align_alleles=align_alleles, palindromes=palindromes, maf_threshold = maf_threshold, access_token=access_token)
256-
{
257247
id <- legacy_ids(id)
258248
out <- api_query("associations", query=list(
259249
variant=variants,
@@ -265,7 +255,6 @@ associations_query <- function(variants=variants, id=id, proxies=proxies, r2=r2,
265255
maf_threshold=maf_threshold
266256
), access_token=access_token) %>% get_query_content()
267257

268-
if(inherits(out, "response"))
269258
if(inherits(out, "response"))
270259
{
271260
return(out)
@@ -274,8 +263,11 @@ associations_query <- function(variants=variants, id=id, proxies=proxies, r2=r2,
274263
} else {
275264
return(dplyr::tibble())
276265
}
266+
267+
return(out)
277268
}
278269

270+
279271
#' Look up sample sizes when meta data is missing from associations
280272
#'
281273
#' @param d Output from [`associations`]
@@ -409,7 +401,6 @@ tophits_query <- function(id, pval=5e-8, clump = 1, r2 = 0.001, kb = 10000, pop=
409401
pop=pop
410402
), access_token=access_token) %>% get_query_content()
411403
if(inherits(out, "response"))
412-
if(inherits(out, "response"))
413404
{
414405
return(out)
415406
} else if(is.data.frame(out)) {

R/zzz.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"https://www.googleapis.com/auth/userinfo.email"),
1818
googleAuthR.ok_content_types=c("application/json; charset=UTF-8", ("text/html; charset=UTF-8")),
1919
googleAuthR.securitycode =
20-
paste0(sample(c(1:9, LETTERS, letters), 20, replace = T), collapse=''),
20+
paste0(sample(c(1:9, LETTERS, letters), 20, replace = TRUE), collapse=''),
2121
googleAuthR.tryAttempts = 5
2222
)
2323
# toset <- !(names(op.googleAuthR) %in% names(op))

man/associations.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)