Parse taxonomic data in a tsv/csv file
parse_taxonomy_table(input, taxon_col, other_col_type = "obs_info",
header = TRUE, sep = "\t", max_lines = NULL, comment_prefix = "#",
...)
(character
of length 1)
The file path to the input file or a data.frame
.
(named integer
of length 1)
The index of the column with taxonomic information, named by the type of information.
A negative index is interpreted as the number of columns from the last.
The name of the column can have to following values:
taxon_id
A unique numeric id for a taxon for a particular database
(e.g. ncbi accession number).
Requires an internet connection.
name
The name of a taxon. Not necessarily unique, but are interpretable
by a particular database
. Requires an internet connection.
class
A list of taxa information that constitutes the full taxonomic classification
from broad to specific (see class_rev
) for a particular database
. Individual taxa
are separated by the class_sep
argument and the information is parsed by the
class_regex
and class_key
arguments.
(character
)
The type of the other columns no specified by taxon_col
. Can be "taxon_info"
or "obs_info"
.
(logical
of length 1)
If TRUE
, the first row of the file is the column names.
(character
of length 1)
The character(s) that separate each column in each row.
Can be a regular expression.
(integer
of length 1)
The maximum number of lines to read from the file.
(character
) One or more characters that appear at the start of a line indicating that the line is a comment and not part of the data.
Passed to extract_taxonomy
.