This function searches for BOLD records corresponding to the species found in the argument `bold_tax`, i.e. the output from the function `get_bold_taxonomy`.
For a thorough explanation of the function usage and capabilities, see the
'Introduction to the barcodeMineR package' vignette:
vignette("Introduction to the barcodeMineR package", package = "barcodeMineR")
Usage
download_bold(
bold_tax,
rate = 100,
api_rate = NULL,
ask = TRUE,
prefix = NULL,
filter = TRUE
)
Arguments
- bold_tax
a data.frame, as returned from the get_bold_taxonomy function.
- rate
`integer` The number of records to be downloaded at a time. It can be lowered for unstable internet connections. However, due to the structure of the bold package, it is not possible to download a specific number of records when a species is represented by more than `rate` records. This function only groups species whose sum of records is inferior to rate. Defaults to `100`.
- api_rate
`integer` The API rate with which to iterate each separate request. Must be a number between 3 and 10 which will translate in a rate of `1 / api_rate` seconds.
- ask
`logical` Should the function ask the user whether to filter the final output for taxonomic ranks. Default `TRUE`.
- prefix
`character` A character string that will be used to create numbered custom ids for each record in ascending order. The prefix will compose the recordID field in the final object. Default to `NULL`, using the internal recordID generator that will use the accession number for NCBI records and the processID for BOLD records, avoiding duplicates by adding `_1`, `_2` etc.
- filter
`logical` Whether to filter records retaining only those corresponding exactly to the taxa found in the taxonomy table `bold_tax` or include also those corresponding to children taxonomies. Default to `TRUE`.
Examples
tax <- get_bold_taxonomy("Polymastia invaginata")
download_bold(tax, ask = FALSE)
#> # A tibble: 6 × 30
#> recordID markerCode DNA_seq phylum class order family genus species source
#> <chr> <chr> <DNA> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 GBMAA106-14 COI-5P GACTCT… Porif… Demo… Poly… Polym… Poly… Polyma… BOLD
#> 2 GBMAA150-14 COI-5P GACTCT… Porif… Demo… Poly… Polym… Poly… Polyma… BOLD
#> 3 GBMIN44241-… COI-5P GACTCT… Porif… Demo… Poly… Polym… Poly… Polyma… BOLD
#> 4 GBMIN44242-… COI-5P GTATGT… Porif… Demo… Poly… Polym… Poly… Polyma… BOLD
#> 5 GBMIN44243-… COI-5P GTATGT… Porif… Demo… Poly… Polym… Poly… Polyma… BOLD
#> 6 GBMIN44244-… COI-5P GTATGT… Porif… Demo… Poly… Polym… Poly… Polyma… BOLD
#> # ℹ 20 more variables: lat <dbl>, lon <dbl>, lengthGene <int>, sampleID <chr>,
#> # QueryName <chr>, identified_by <lgl>, taxNotes <lgl>, db_xref <chr>,
#> # sourceID <chr>, NCBI_ID <chr>, institutionStoring <lgl>,
#> # collected_by <lgl>, collection_date <lgl>, altitude <lgl>, depth <lgl>,
#> # country <chr>, directionPrimers <lgl>, lengthSource <int>,
#> # PCR_primers <lgl>, note <chr>