metacoder: Tools for Parsing, Manipulating, and Graphing Hierarchical Data

A set of tools for parsing, manipulating, and graphing data classified by a hierarchy (e.g. a taxonomy).

Install the latest version of this package by entering the following in R:
AuthorZachary Foster [aut, cre], Niklaus Grunwald [ths]
Date of publication2016-08-27 00:35:09
MaintainerZachary Foster <>
LicenseGPL-2 | GPL-3

View on CRAN

Man pages

add_alpha: add_alpha

apply_color_scale: Covert numbers to colors

arrange_obs: Sort columns of 'taxmap' objects

arrange_taxa: Sort columns of 'taxmap' objects

bryophytes_ex_data: Example dataset of bryophytes

check_element_length: Check length of graph attributes

class_from_class: Parse embedded classifications

class_from_name: Retrieve classifications from taxon names

class_from_obs_id: Retrieve classifications from observation IDs

class_from_taxon_id: Retrieve classifications from taxon IDs

class_to_taxonomy: List of classifications to taxonomy tree

contains: dplyr select_helpers

contaminants: Example dataset of comtamination

convert_numeric_cols: Convert columns to numeric if appropriate

count_capture_groups: Count capture groups

delete_vetices_and_children: delete_vetices_and_children

diverging_palette: The defualt diverging color palette

DNAbin_to_char: Converts DNAbin to a named character vector

drawDetails.resizingTextGrob: Draws a resizingTextGrob

edge_list_depth: Get distance from root of edgelist observations

ends_with: dplyr select_helpers

everything: dplyr select_helpers

extract_taxonomy: Extract taxonomy information from sequence headers

fasta_headers: Get line numbers of FASTA headers

filter_obs: Filter observations with a list of conditions

filter_taxa: Filter taxa with a list of conditions

format_taxon_subset: Format taxon subset value

genbank_ex_data: Fungal ITS Genbank refseq

get_class_from_el: Get classification for taxa in edge list

get_edge_children: get_edge_children

get_edge_parents: get_edge_parents

get_id_from_name: Get taxon ID from name

get_name_from_id: Get taxon name from ID

get_node_children: get_node_children

get_optimal_range: Find optimal range

get_taxonomy_levels: Get taxonomy levels

grapes-greater-than-grapes: magrittr forward-pipe operator

heat_tree: Plot a taxonomic tree

hierarchies: Get classification of taxa

inter_circle_gap: Finds the gap/overlap of circle coordinates

inverse: Generate the inverse of a function

its1_ex_data: Example of ITS1 fungal data

layout_functions: Layout functions

line_coords: Makes coordinates for a line

make_new_ids: Generate new unique IDs

make_plot_legend: Make color/size legend

make_text_grobs: Create a list of text grobs

map_unique: Run a function on unique values of a iterable

matches: dplyr select_helpers

metacoder: Metacoder

molten_dist: Get all distances beween points

mutate_obs: Add columns to 'taxmap' objects

mutate_taxa: Add columns to 'taxmap' objects

ncbi_sequence: Downloads sequences from ids

ncbi_taxon_sample: Download representative sequences for a taxon

n_obs: Count observations in 'taxmap'

n_obs_1: Count observation assigned in 'taxmap'

n_subtaxa: Get number of subtaxa

n_subtaxa_1: Get number of subtaxa

n_supertaxa: Get number of supertaxa

num_range: dplyr select_helpers

obs: Get observations associated with taxa

obs_data: Return observation data from 'taxmap'

obs_data_colnames: Get column names of obs_data

obs_data_cols_used: Get names of obs_data in an unevaluated expression

one_of: dplyr select_helpers

parse_hmp_qiime: Parse HMP QIIME results

parse_mothur_summary: Parse mothur classification summary file

parse_primersearch: Parse EMBOSS primersearch output

parse_summary_seqs: Parse summary.seqs output

parse_taxonomy_table: Parse taxonomic data in a tsv/csv file

plot_alignment: Display sequence alignment

polygon_coords: Makes coordinates for a regualr polygon

postDrawDetails.resizingTextGrob: Clean up after the drawing.

pr2_ex_data: Example of PR2 SSU data

preDrawDetails.resizingTextGrob: Adjusts text size to viewport

primersearch: Use EMBOSS primersearch for in silico PCR

primersearch_is_installed: Test if primersearch is installed

print.taxmap: Print a 'taxmap' object

qualitative_palette: The defualt qualitative color palette

quantative_palette: The defualt quantative color palette

rdp_ex_data: Example of RDP Archea data

read_fasta: Read a FASTA file

read_lines_apply: Apply a function to chunks of a file

recursive_sample: Recursivly sample observations with a heirarchical...

remove_redundant_names: Remove the redundant taxon names

rename_duplicated: Number duplicated names

rescale: Rescale numeric vector to have specified minimum and maximum.

resizingTextGrob: Adds text grob that scales with viewport size

roots: Get root taxa

run_primersearch: Execute EMBOSS Primerseach

sample_frac_obs: Sample a proportion of observations from 'taxmap'

sample_frac_taxa: Sample a proportion of taxa from 'taxmap'

sample_n_obs: Sample n observations from 'taxmap'

sample_n_taxa: Sample n taxa from 'taxmap'

scale_bar_coords: Make scale bar division

select_labels: Pick labels to show

select_obs: Subset columns in a 'taxmap' object

select_taxa: Subset columns in a 'taxmap' object

silva_ex_data: Example dataset from SILVA

split_by_level: Splits a taxonomy at a specific level or rank

split_class_list: Split a list of classifications by a row/column value

starts_with: dplyr select_helpers

subtaxa: Get all subtaxa of a taxon

supertaxa: Get all supertaxa of a taxon

taxmap: Create an instance of 'taxmap'

taxon_data: Return taxon data from 'taxmap'

taxon_data_colnames: Get column names of taxon_data

taxon_data_cols_used: Get names of taxon_data in an unevaluated expression

taxonomic_sample: Recursivly sample a set of taxonomic assignments

taxonomy_ranks: Get ordered ranks from taxonomy

text_grob_length: Estimate text grob length

transform_data: Transformation functions

transmute_obs: Replace columns in 'taxmap' objects

transmute_taxa: Replace columns in 'taxmap' objects

unique_mapping: get indexes of a unique set of the input

unite_ex_data_1: Example of UNITE fungal ITS data

unite_ex_data_2: Example of UNITE fungal ITS data

unite_ex_data_3: Example of UNITE fungal ITS data

validate_regex_key_pair: Check a regex-key pair

validate_regex_match: Check that all match input

verify_color_range: Verify color range parameters

verify_label_count: Verify label count

verify_size: Verify size parameters

verify_size_range: Verify size range parameters

verify_trans: Verify transformation function parameters

vigilant_report: Report a error/warning if needed


\%>\% Man page
add_alpha Man page
apply_color_scale Man page
arrange_obs Man page
arrange_taxa Man page
bryophytes_ex_data Man page
check_element_length Man page
class_from_class Man page
class_from_name Man page
class_from_obs_id Man page
class_from_taxon_id Man page
class_to_taxonomy Man page
contains Man page
contaminants Man page
convert_numeric_cols Man page
count_capture_groups Man page
delete_vetices_and_children Man page
diverging_palette Man page
DNAbin_to_char Man page
drawDetails.resizingTextGrob Man page
edge_list_depth Man page
ends_with Man page
everything Man page
extract_taxonomy Man page
extract_taxonomy.default Man page
extract_taxonomy.DNAbin Man page
extract_taxonomy.list Man page
fasta_headers Man page
filter_obs Man page
filter_taxa Man page
format_taxon_subset Man page
genbank_ex_data Man page
get_class_from_el Man page
get_edge_children Man page
get_edge_parents Man page
get_id_from_name Man page
get_name_from_id Man page
get_node_children Man page
get_optimal_range Man page
get_taxonomy_levels Man page
heat_tree Man page
heat_tree.default Man page
heat_tree.taxmap Man page
hierarchies Man page
inter_circle_gap Man page
inverse Man page
its1_ex_data Man page
layout_functions Man page
line_coords Man page
make_new_ids Man page
make_plot_legend Man page
make_text_grobs Man page
map_unique Man page
matches Man page
metacoder Man page
metacoder-package Man page
molten_dist Man page
mutate_obs Man page
mutate_taxa Man page
ncbi_sequence Man page
ncbi_taxon_sample Man page
n_obs Man page
n_obs_1 Man page
n_subtaxa Man page
n_subtaxa_1 Man page
n_supertaxa Man page
num_range Man page
obs Man page
obs_data Man page
obs_data_colnames Man page
obs_data_cols_used Man page
one_of Man page
parse_hmp_qiime Man page
parse_mothur_summary Man page
parse_primersearch Man page
parse_summary_seqs Man page
parse_taxonomy_table Man page
plot_alignment Man page
polygon_coords Man page
postDrawDetails.resizingTextGrob Man page
pr2_ex_data Man page
preDrawDetails.resizingTextGrob Man page
primersearch Man page
primersearch.character Man page
primersearch_is_installed Man page
primersearch.taxmap Man page
print.taxmap Man page
qualitative_palette Man page
quantative_palette Man page
rdp_ex_data Man page
read_fasta Man page
read_lines_apply Man page
recursive_sample Man page
remove_redundant_names Man page
rename_duplicated Man page
rescale Man page
resizingTextGrob Man page
roots Man page
run_primersearch Man page
sample_frac_obs Man page
sample_frac_taxa Man page
sample_n_obs Man page
sample_n_taxa Man page
scale_bar_coords Man page
select_labels Man page
select_obs Man page
select_taxa Man page
silva_ex_data Man page
split_by_level Man page
split_class_list Man page
starts_with Man page
subtaxa Man page
supertaxa Man page
taxmap Man page
taxon_data Man page
taxon_data_colnames Man page
taxon_data_cols_used Man page
taxonomic_sample Man page
taxonomy_ranks Man page
text_grob_length Man page
transform_data Man page
transmute_obs Man page
transmute_taxa Man page
unique_mapping Man page
unite_ex_data_1 Man page
unite_ex_data_2 Man page
unite_ex_data_3 Man page
validate_regex_key_pair Man page
validate_regex_match Man page
verify_color_range Man page
verify_label_count Man page
verify_size Man page
verify_size_range Man page
verify_trans Man page
vigilant_report Man page


tests/testthat/test--taxmap--arrange.R tests/testthat/test--taxmap--mutate.R tests/testthat/test--taxmap--sample.R tests/testthat/test--taxmap--select.R tests/testthat/test--taxmap--utilities.R tests/testthat/test--taxmap.R tests/testthat/test--taxmap--filter.R tests/testthat/test--plot_taxonomy.R tests/testthat/test--extract_taxonomy.R
R/taxmap--class.R R/heat_tree.R R/taxmap--utilities.R R/extract_taxonomy--internal.R R/heat_tree--vertex_size.R R/sequence_download.R R/taxmap--mutate.R R/mothur.R R/in_silico_pcr.R R/taxmap--sample.R R/taxmap--column_generators.R R/metacoder-package.r R/taxmap--internal.R R/heat_tree--shape_generators.R R/old_code.R R/dataset_documentation.R R/heat_tree--resizing_text.R R/taxmap--arrange.R R/reading_files.R R/taxonomy.R R/taxonomic_sample.R R/taxmap--select.R R/internal.R R/heat_tree--internal.R R/extract_taxonomy--wrappers.R R/heat_tree--layouts.R R/plot_alignment.R R/extract_taxonomy.R R/heat_tree--mapping.R R/taxmap--filter.R R/extract_taxonomy--parsers.R R/heat_tree--legend.R R/imports.R
man/polygon_coords.Rd man/diverging_palette.Rd man/taxmap.Rd man/validate_regex_match.Rd man/grapes-greater-than-grapes.Rd man/starts_with.Rd man/get_node_children.Rd man/mutate_obs.Rd man/unite_ex_data_2.Rd man/drawDetails.resizingTextGrob.Rd man/filter_taxa.Rd man/one_of.Rd man/molten_dist.Rd man/verify_label_count.Rd man/line_coords.Rd man/ends_with.Rd man/unite_ex_data_1.Rd man/run_primersearch.Rd man/sample_n_taxa.Rd man/print.taxmap.Rd man/select_obs.Rd man/taxon_data.Rd man/get_class_from_el.Rd man/get_edge_children.Rd man/format_taxon_subset.Rd man/rdp_ex_data.Rd man/n_subtaxa.Rd man/DNAbin_to_char.Rd man/inverse.Rd man/vigilant_report.Rd man/n_supertaxa.Rd man/its1_ex_data.Rd man/get_id_from_name.Rd man/fasta_headers.Rd man/layout_functions.Rd man/transform_data.Rd man/plot_alignment.Rd man/transmute_obs.Rd man/count_capture_groups.Rd man/text_grob_length.Rd man/num_range.Rd man/arrange_obs.Rd man/n_obs_1.Rd man/ncbi_taxon_sample.Rd man/convert_numeric_cols.Rd man/extract_taxonomy.Rd man/qualitative_palette.Rd man/delete_vetices_and_children.Rd man/unique_mapping.Rd man/preDrawDetails.resizingTextGrob.Rd man/quantative_palette.Rd man/edge_list_depth.Rd man/resizingTextGrob.Rd man/parse_summary_seqs.Rd man/scale_bar_coords.Rd man/parse_taxonomy_table.Rd man/get_name_from_id.Rd man/matches.Rd man/make_plot_legend.Rd man/filter_obs.Rd man/get_taxonomy_levels.Rd man/split_class_list.Rd man/read_fasta.Rd man/parse_hmp_qiime.Rd man/bryophytes_ex_data.Rd man/recursive_sample.Rd man/sample_frac_taxa.Rd man/get_optimal_range.Rd man/n_obs.Rd man/select_labels.Rd man/primersearch_is_installed.Rd man/arrange_taxa.Rd man/inter_circle_gap.Rd man/parse_primersearch.Rd man/sample_frac_obs.Rd man/check_element_length.Rd man/select_taxa.Rd man/apply_color_scale.Rd man/validate_regex_key_pair.Rd man/remove_redundant_names.Rd man/obs_data_cols_used.Rd man/rescale.Rd man/hierarchies.Rd man/add_alpha.Rd man/pr2_ex_data.Rd man/genbank_ex_data.Rd man/silva_ex_data.Rd man/read_lines_apply.Rd man/transmute_taxa.Rd man/supertaxa.Rd man/taxon_data_colnames.Rd man/verify_color_range.Rd man/n_subtaxa_1.Rd man/metacoder.Rd man/parse_mothur_summary.Rd man/mutate_taxa.Rd man/contains.Rd man/verify_size_range.Rd man/postDrawDetails.resizingTextGrob.Rd man/taxonomy_ranks.Rd man/taxonomic_sample.Rd man/primersearch.Rd man/rename_duplicated.Rd man/make_text_grobs.Rd man/class_from_name.Rd man/subtaxa.Rd man/class_from_taxon_id.Rd man/get_edge_parents.Rd man/obs_data.Rd man/heat_tree.Rd man/sample_n_obs.Rd man/unite_ex_data_3.Rd man/map_unique.Rd man/contaminants.Rd man/make_new_ids.Rd man/class_to_taxonomy.Rd man/roots.Rd man/everything.Rd man/verify_size.Rd man/obs_data_colnames.Rd man/taxon_data_cols_used.Rd man/class_from_obs_id.Rd man/ncbi_sequence.Rd man/obs.Rd man/class_from_class.Rd man/verify_trans.Rd man/split_by_level.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.