ropensci / brranching

Compare f7d65b7 ... +19 ... de1c525

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 2 of 104 files from the diff.
Other files ignored by Codecov
LICENSE has changed.
man/phylomatic.Rd has changed.
revdep/README.md was deleted.
Makefile has changed.
README.md has changed.
NEWS.md has changed.
.travis.yml was deleted.
man/tpl.Rd has changed.
.Rbuildignore has changed.
codemeta.json has changed.
cran-comments.md has changed.
appveyor.yml was deleted.
README.Rmd has changed.
DESCRIPTION has changed.

@@ -65,14 +65,8 @@
Loading
65 65
#' library("taxize")
66 66
#' spp <- names_list("species", 500)
67 67
#' # phylomatic(taxa = spp, get = "GET")
68 -
#' (out <- phylomatic(taxa = spp, get = "POST"))
68 +
#' (out <- phylomatic(taxa = spp, get = "POST", db = "itis"))
69 69
#' plot(out)
70 -
#'
71 -
#' # Pass in a tree from a URL on the web
72 -
#' spp <- c("Abies_nordmanniana", "Abies_bornmuelleriana", "Abies_cilicica", "Abies_cephalonica",
73 -
#' "Abies_numidica", "Abies_pinsapo", "Abies_alba")
74 -
#' url <- "http://datadryad.org/bitstream/handle/10255/dryad.8791/final_tree.tre?sequence=1"
75 -
#' phylomatic(taxa=spp, treeuri=url)
76 70
#' }
77 71
78 72
phylomatic <- function(taxa, taxnames = TRUE, get = 'GET',

@@ -7,25 +7,25 @@
Loading
7 7
#' @param taxa quoted tsn number (taxonomic serial number)
8 8
#' @param format output format, isubmit (you can paste in to the Phylomatic
9 9
#'     website), or 'rsubmit' to use in fxn phylomatic_tree
10 -
#' @param db One of "ncbi", "itis", or "apg". if you use "apg", no HTTP 
11 -
#' requests are made (no internet connection needed), whereas if you use 
12 -
#' "ncbi" or "itis" you do need an internet connection. IMPORTANT: 
10 +
#' @param db One of "ncbi", "itis", or "apg". if you use "apg", no HTTP
11 +
#' requests are made (no internet connection needed), whereas if you use
12 +
#' "ncbi" or "itis" you do need an internet connection. IMPORTANT:
13 13
#' see **Authentication** below if using "ncbi".
14 14
#' @param ... curl options passed on to [taxize::tax_name()]
15 -
#' @return string (e.g., "pinaceae/pinus/pinus_contorta"), in Phylomatic 
15 +
#' @return string (e.g., "pinaceae/pinus/pinus_contorta"), in Phylomatic
16 16
#' submission format
17 17
#' @section Authentication:
18 18
#' NCBI Entrez doesn't require that you use an API key, but you get
19 -
#' higher rate limit with a key, from 3 to 10 requests per second, so do 
20 -
#' get one. Run [taxize::use_entrez()] or see 
19 +
#' higher rate limit with a key, from 3 to 10 requests per second, so do
20 +
#' get one. Run `taxize::use_entrez()` or see
21 21
#' https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/
22 22
#' for instructions.
23 -
#' 
24 -
#' NCBI API key handling logic is done inside of the `taxize` package, used 
23 +
#'
24 +
#' NCBI API key handling logic is done inside of the `taxize` package, used
25 25
#' inside this function.
26 -
#' 
27 -
#' Save your API key with the name `ENTREZ_KEY` as an R option in your 
28 -
#' `.Rprofile` file, or as environment variables in either your `.Renviron` 
26 +
#'
27 +
#' Save your API key with the name `ENTREZ_KEY` as an R option in your
28 +
#' `.Rprofile` file, or as environment variables in either your `.Renviron`
29 29
#' file or `.bash_profile` file, or `.zshrc` file (if you use oh-my-zsh) or
30 30
#' similar. See [Startup] for help on R options and environment
31 31
#' variables. You cannot pass in your API key in this function.
@@ -35,7 +35,7 @@
Loading
35 35
#' or environment variables.
36 36
#'
37 37
#' We strongly recommend using environment variables over R options.
38 -
#' 
38 +
#'
39 39
#' Note that if you don't have an ENTREZ_KEY set, you'll get a message
40 40
#' about it, but only once during each function call. That is, there
41 41
#' can be of these messages per R session, across function calls.
@@ -61,17 +61,12 @@
Loading
61 61
62 62
    if (db %in% c("ncbi", "itis")) {
63 63
      family <- ck$handle_conditions(
64 -
        taxize::tax_name(
65 -
          query = taxa_genus, get = "family", db = db, messages = FALSE, 
66 -
          ...)$family)
64 +
        taxize::tax_name(taxa_genus, get = "family", db = db,
65 +
          messages = FALSE, ...)$family)
67 66
    } else {
68 67
      tplfamily <- tpl[ match(taxa_genus, tpl$genus), "family" ]
69 -
      dd <- taxize::apg_families[ match(tplfamily, taxize::apg_families$this), ]
70 -
      if (nchar(as.character(dd$that), keepNA = FALSE) == 0) {
71 -
        family <- dd$this
72 -
      } else {
73 -
        family <- dd$that
74 -
      }
68 +
      family <- taxize::apg_families[ 
69 +
        match(tplfamily, taxize::apg_families$accepted_name), ]$accepted_name
75 70
    }
76 71
    stringg <- c(family, strsplit(nnn, " ")[[1]])
77 72
    stringg <- tolower(as.character(stringg))

Learn more Showing 4 files with coverage changes found.

Changes in R/phylomatic_local.R
-7
+7
Loading file...
Changes in R/phylomatic_names.R
-4
Loading file...
Changes in R/phylomatic.R
-1
Loading file...
Changes in R/zzz.R
-1
-2
Loading file...

21 Commits

Files Coverage
R -6.73% 50.00%
Project Totals (6 files) 50.00%
Loading