bold_identify_taxonomy: Add taxonomic parent names to a data set containing the...

bold_identify_taxonomyR Documentation

Add taxonomic parent names to a data set containing the process IDs of identified sequences.

Description

Add taxonomic parent names to a data set containing the process IDs of identified sequences.

Usage

bold_identify_taxonomy(x, taxOnly = TRUE)

## S4 method for signature 'list'
bold_identify_taxonomy(x, taxOnly = TRUE)

## S4 method for signature 'matrix'
bold_identify_taxonomy(x, taxOnly = TRUE)

## S4 method for signature 'data.frame'
bold_identify_taxonomy(x, taxOnly = TRUE)

## S4 method for signature 'missing'
bold_identify_taxonomy(x, taxOnly = TRUE)

Arguments

x

A single data.frame or matrix, or a list of. Usually the output from a call to bold_identify. Required.

taxOnly

(logical) If TRUE (Default), only the taxonomic names and ids are added (equivalent format to the results of bold_identify_parents when wideis set to TRUE. If FALSE, also joins the rest of the data returned by bold_specimens.

Details

This function gets the process ids from the input data.frame(s) (ID column), then queries bold_specimens to get the sample information and adds it to the input data.frame(s).

Records in the input data that do not have matches for parent names simply get NA values in the added columns.

Value

a data.frame or a list of data.frames with added taxonomic classification.

Examples

## Not run: 
seqs <- bold_identify(sequences = bold::sequences$seq2)

seqs_tax <- bold_identify_taxonomy(seqs)
head(seqs_tax[[1]])

x <- bold_seq(taxon = "Satyrium")
seqs <- bold_identify(x$sequence[1:2])
seqs_tax <- bold_identify_taxonomy(seqs)
seqs_tax

## End(Not run)


ropensci/bold documentation built on Sept. 10, 2023, 11:50 p.m.