make.unique.vouchers: Assign Specimen Vouchers to Gene Sequences

View source: R/make.unique.vouchers.R

make.unique.vouchersR Documentation

Assign Specimen Vouchers to Gene Sequences

Description

Generates a vector of vouchers with order corresponding to order of sequences in rows of provided metadata table.

Usage

make.unique.vouchers(metadata, voucherFormula = c("Primary.collector.last.name", "Collector.number", "isolate", "CollectionNumber", "Collection"))

Arguments

metadata

A data frame of sequence-associated metadata, the output of parse.INSDSeq.

voucherFormula

A vector of strings, the names of the columns in the metadata that are to be included in the voucher.

Details

The default for voucherFormula is Primary.collector.last.name, Collector.number, isolate, CollectionNumber, Collection, which correspond to default column names in the metadata. organism is not included in this formula, as specimens can be re-classified throughout their lifetime, so taxon name may not stay constant across all sequences belonging to a single specimen.

The function tidyName is used internally to standardize vouchers so that differences in capitalization and punctuation do not prevent the linkage of two gene sequences to a single specimen.

The output of this function should be added as a column to the metadata data frame in order to use the make.gene.matrix function. This can be done with cbind.

Value

A vector of strings, containing a generated voucher for each sequence, order corresponding to the rows of the metadata.

Author(s)

Andrew Hipp and Kasey Pham

See Also

parse.INSDSeq, tidyName


andrew-hipp/morton documentation built on April 7, 2024, 12:15 p.m.