Skip to content

Commit

Permalink
Update efetch docs to include sequence db XMLs
Browse files Browse the repository at this point in the history
closes #91
  • Loading branch information
dwinter committed Oct 25, 2016
1 parent 5b2785a commit e1f4fd1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
17 changes: 12 additions & 5 deletions R/entrez_fetch.r
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@
#' or a \code{web_history} object as returned by
#' \code{\link{entrez_link}}, \code{\link{entrez_search}} or
#' \code{\link{entrez_post}}. See Table 1 in the linked reference for the set of
#' formats available for each database.
#' formats available for each database. In particular, note that sequence
#' databases (nuccore, protein and their relatives) use specific format names
#' (eg "native", "ipg") for different flavours of xml.
#'
#'
#' For the most part, this function returns a character vector containing the
#' fetched records. For XML records (including 'native', 'ipg', 'gbc' sequence
#' records), setting \code{parsed} to \code{TRUE} will return an
#' \code{XMLInternalDocument},
#'
#'@export
#'@param db character, name of the database to use
Expand All @@ -25,14 +30,16 @@
#'@seealso \code{\link[httr]{config}} for available configs
#'@return character string containing the file created
#'@return XMLInternalDocument a parsed XML document if parsed=TRUE and
#'rettype='xml'
#'rettype is a flavour of XML.
#
#' @examples
#'
#' \dontrun{
#' katipo <- "Latrodectus katipo[Organism]"
#' katipo_search <- entrez_search(db="nuccore", term=katipo)
#' kaitpo_seqs <- entrez_fetch(db="nuccore", id=katipo_search$ids, rettype="fasta")
#'
#' #xml
#' kaitpo_seqs <- entrez_fetch(db="nuccore", id=katipo_search$ids, rettype="native")
#'}

entrez_fetch <- function(db, id=NULL, web_history=NULL, rettype, retmode="", parsed=FALSE,
config=NULL, ...){
Expand Down
18 changes: 14 additions & 4 deletions man/entrez_fetch.Rd

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

0 comments on commit e1f4fd1

Please sign in to comment.