Skip to content

Commit

Permalink
replaced rcurl with httr, no longer an import
Browse files Browse the repository at this point in the history
  • Loading branch information
sckott committed Oct 14, 2015
1 parent b019495 commit 544cd8b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Imports:
plyr,
stringr,
httr,
RCurl,
XML,
jsonlite
Suggests:
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export(split_to_df)
export(swap)
export(tryget)
export(users)
importFrom(RCurl,getURL)
importFrom(XML,xmlInternalTreeParse)
importFrom(XML,xmlToList)
importFrom(httr,GET)
Expand Down
8 changes: 6 additions & 2 deletions R/LDSearch.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#' GeneCruiser for each SNP. This can slow the query down substantially.
#' @param quiet boolean; if \code{TRUE} progress updates are written to the
#' console.
#' @param ... Curl options passed on to \code{\link[httr]{GET}}
#' @return A list of data frames, one for each SNP queried, containing
#' information about the SNPs found to be in LD with that SNP. A description
#' of the columns follows:
Expand Down Expand Up @@ -109,7 +110,7 @@ LDSearch <- function(SNPs,
RSquaredLimit=0.8,
distanceLimit=500,
GeneCruiser=TRUE,
quiet=FALSE ) {
quiet=FALSE, ...) {

## error checking

Expand Down Expand Up @@ -171,7 +172,10 @@ LDSearch <- function(SNPs,
query <- paste( sep = "", query_start, query_end )

if ( !quiet ) cat("Querying SNAP...\n")
dat <- getURL( query )
# dat <- getURL( query )
dat_tmp <- GET(query, ...)
stop_for_status(dat_tmp)
dat <- content(dat_tmp)

## check for validation error
if ( length( grep( "validation error", dat ) ) > 0 ) {
Expand Down
1 change: 0 additions & 1 deletion R/rsnps-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#' @importFrom httr GET content stop_for_status
#' @importFrom plyr ldply llply laply compact
#' @importFrom stringr str_split str_replace_all str_trim
#' @importFrom RCurl getURL
#' @importFrom XML xmlInternalTreeParse xmlToList
#' @importFrom jsonlite fromJSON
#' @name rsnps-package
Expand Down
4 changes: 3 additions & 1 deletion man/LDSearch.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
\title{Search for SNPs in Linkage Disequilibrium with a set of SNPs}
\usage{
LDSearch(SNPs, dataset = "onekgpilot", panel = "CEU", RSquaredLimit = 0.8,
distanceLimit = 500, GeneCruiser = TRUE, quiet = FALSE)
distanceLimit = 500, GeneCruiser = TRUE, quiet = FALSE, ...)
}
\arguments{
\item{SNPs}{A vector of SNPs (rs numbers).}
Expand Down Expand Up @@ -48,6 +48,8 @@ GeneCruiser for each SNP. This can slow the query down substantially.}

\item{quiet}{boolean; if \code{TRUE} progress updates are written to the
console.}

\item{...}{Curl options passed on to \code{\link[httr]{GET}}}
}
\value{
A list of data frames, one for each SNP queried, containing
Expand Down
2 changes: 1 addition & 1 deletion man/rsnpsCache.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
\name{rsnpsCache}
\alias{rsnpsCache}
\title{rsnps environment}
\format{\preformatted{<environment: 0x109d70f08>
\format{\preformatted{<environment: 0x1096d8558>
}}
\usage{
rsnpsCache
Expand Down

0 comments on commit 544cd8b

Please sign in to comment.