Skip to content

Commit

Permalink
Merge pull request #176 from ropensci/T171_fix_description
Browse files Browse the repository at this point in the history
T171 fix value fields in .RD files
  • Loading branch information
jooolia authored Nov 3, 2023
2 parents 1a604ae + 7b8af74 commit 243b2bf
Show file tree
Hide file tree
Showing 23 changed files with 57 additions and 48 deletions.
12 changes: 6 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Package: rsnps
Title: Get 'SNP' ('Single-Nucleotide' 'Polymorphism') Data on the Web
Description: A programmatic interface to various 'SNP' 'datasets'
on the web: 'OpenSNP' (<https://opensnp.org>), and 'NBCIs' 'dbSNP' database
Title: Get SNP (Single-Nucleotide Polymorphism) Data on the Web
Description: A programmatic interface to various SNP datasets
on the web: OpenSNP (<https://opensnp.org>), and NBCIs dbSNP database
(<https://www.ncbi.nlm.nih.gov/projects/SNP/>). Functions
are included for searching for 'NCBI'. For 'OpenSNP', functions are included
for getting 'SNPs', and data for 'genotypes', 'phenotypes', annotations,
are included for searching for NCBI. For OpenSNP, functions are included
for getting SNPs, and data for genotypes, phenotypes, annotations,
and bulk downloads of data by user.
Version: 0.6.1
Version: 0.6.2
License: MIT + file LICENSE
Authors@R: c(
person("Julia", "Gustavsen", role = c("aut", "cre"),
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export(phenotypes)
export(phenotypes_byid)
export(read_users)
export(rsnpsCache)
export(tryget)
export(users)
importFrom(crul,HttpClient)
importFrom(plyr,compact)
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
rsnps 0.6.2
===========

### MINOR IMPROVEMENTS

* removed quotes from abbreviation in package description upon request from CRAN


rsnps 0.6.0
===========

Expand Down
1 change: 1 addition & 0 deletions R/LDSearch.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#' This function is defunct.
#' @export
#' @rdname ld_search-defunct
#' @return a error message telling the user that this function has been removed
#' @keywords internal
ld_search <- function(...) {
.Defunct(msg = "This function is defunct; SNAP has been taken down.
Expand Down
4 changes: 2 additions & 2 deletions R/allphenotypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
#' can take multiple values, so the other columns id, characteristic, and
#' number_of_users are replicated in the data.frame. Default: `FALSE`
#' @param ... Curl options passed on to [crul::HttpClient]
#' @return data.frame of results, or list if `df=FALSE`
#' @return data.frame of openSNP phenotypes, variants and users per phenotype, or list if `df=FALSE`
#' @examples \dontrun{
#' # Get all data
#' allphenotypes(df = TRUE)
#'
#' # Output a list, then call the characterisitc of interest by 'id' or
#' # Output a list, then call the characteristic of interest by 'id' or
#' # 'characteristic'
#' datalist <- allphenotypes()
#' names(datalist) # get list of all characteristics you can call
Expand Down
2 changes: 1 addition & 1 deletion R/annotations.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' are: 'plos', 'mendeley', 'snpedia', 'metadata'). 'metadata' gives the
#' metadata for the response.
#' @param ... Curl options passed on to [crul::HttpClient]
#' @return data.frame of results
#' @return data.frame of openSNP phenotypes from specified source
#' @examples \dontrun{
#' # Get all data
#' ## get just the metadata
Expand Down
5 changes: 5 additions & 0 deletions R/deprecated-defunct.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#' This function is defunct.
#' @export
#' @rdname LDSearch-defunct
#' @return a error message telling the user that this function has been removed
#' @keywords internal
LDSearch <- function(...) {
.Defunct(new = "ld_search", package = "rsnps", msg = "the LDSearch() function name has been changed to ld_search()")
Expand All @@ -9,6 +10,7 @@ LDSearch <- function(...) {
#' This function is defunct.
#' @export
#' @rdname NCBI_snp_query-defunct
#' @return a error message telling the user that this function has been deprecated in favour of another function
#' @keywords internal
ncbi_snp_summary <- function(...) {
.Defunct(new = "ncbi_snp_summary", package = "rsnps", msg = "the ncbi_snp_summary() function name has been changed to ncbi_snp_query()")
Expand All @@ -18,6 +20,7 @@ ncbi_snp_summary <- function(...) {
#' This function is defunct.
#' @export
#' @rdname NCBI_snp_query-defunct
#' @return a error message telling the user that this function has been deprecated in favour of another function
#' @keywords internal
ncbi_snp_query2 <- function(...) {
.Defunct(new = "ncbi_snp_query2", package = "rsnps", msg = "the ncbi_snp_query2() function name has been changed to ncbi_snp_query()")
Expand All @@ -26,6 +29,7 @@ ncbi_snp_query2 <- function(...) {
#' This function is defunct.
#' @export
#' @rdname NCBI_snp_query-defunct
#' @return a error message telling the user that this function has been deprecated in favour of another function
#' @keywords internal
NCBI_snp_query <- function(...) {
.Defunct(new = "ncbi_snp_query", package = "rsnps", msg = "the NCBI_snp_query() function name has been changed to ncbi_snp_query()")
Expand All @@ -34,6 +38,7 @@ NCBI_snp_query <- function(...) {
#' This function is defunct.
#' @export
#' @rdname NCBI_snp_query2-defunct
#' @return a error message telling the user that this function has been deprecated in favour of another function
#' @keywords internal
NCBI_snp_query2 <- function(...) {
.Defunct(new = "ncbi_snp_query2", package = "rsnps", msg = "the NCBI_snp_query2() function name has been changed to ncbi_snp_query()")
Expand Down
8 changes: 4 additions & 4 deletions R/download_users.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ get_write <- function(x, y, ...) {
#' written in the function download_users, and then searches against those
#' variables for the path to the file saved. Alternatively, you can supply
#' the path.
#' @return A data.frame.
#' @return A data.frame with openSNP user files retrieved from local storage
#' @examples \dontrun{
#' # dat <- read_users(name = "kevinmcc")
#' # head(dat)
#' # dat <- read_users(id = 285)
#' dat <- read_users(name = "kevinmcc")
#' head(dat)
#' dat <- read_users(id = 285)
#' }
read_users <- function(name = NULL, id = NULL, path = NULL, ...) {
if (is.null(name) && is.null(id) && is.null(path)) {
Expand Down
2 changes: 1 addition & 1 deletion R/phenotypes.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' @param userid ID of openSNP user.
#' @param df Return data.frame (`TRUE`) or not (`FALSE`). Default: `FALSE`
#' @param ... Curl options passed on to [crul::HttpClient]
#' @return List of phenotypes for specified user(s).
#' @return List of phenotypes for specified user(s) from openSNP.
#'
#' @examples \dontrun{
#' phenotypes(userid = 1)
Expand Down
2 changes: 1 addition & 1 deletion R/phenotypes_byid.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @param return_ Return data.frame (`TRUE`) or not (`FALSE`). Default: `FALSE`
#' @param ... Curl options passed on to [crul::HttpClient]
#' @return List of description of phenotype, list of known variants, or
#' data.frame of variants for each user with that phenotype.
#' data.frame of variants for each user with that phenotype retrieved from openSNP.
#'
#' @examples \dontrun{
#' phenotypes_byid(phenotypeid = 12, return_ = "desc")
Expand Down
2 changes: 1 addition & 1 deletion R/users.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' @family opensnp-fxns
#' @param df Return data.frame (`TRUE`) or not (`FALSE`). Default: `FALSE`
#' @param ... Curl options passed on to [crul::HttpClient]
#' @return List of openSNP users, their ID numbers, and XX if available.
#' @return List of openSNP users, their ID numbers, and genome data if available.
#' @examples \dontrun{
#' # just the list
#' data <- users(df = FALSE)
Expand Down
10 changes: 1 addition & 9 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,7 @@ split_to_df <- function(x, sep, fixed = FALSE, perl = TRUE, useBytes = FALSE, na
return(tmp)
}

#' Tryget
#'
#' @export
#' @keywords internal
tryget <- function(x) {
return(tryCatch(return(x), error = function(e) {
return(NA)
}))
}


strtrim <- function(str) {
gsub("^\\s+|\\s+$", "", str)
Expand Down
3 changes: 3 additions & 0 deletions man/LDSearch-defunct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions man/NCBI_snp_query-defunct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/NCBI_snp_query2-defunct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/allphenotypes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/annotations.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/ld_search-defunct.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/phenotypes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/phenotypes_byid.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/read_users.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions man/tryget.Rd

This file was deleted.

2 changes: 1 addition & 1 deletion man/users.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 243b2bf

Please sign in to comment.