MultiFunctionTaxaContributionPlots: A function to plot different versions of the FishTaco plot...

Description Usage Arguments Value

View source: R/MultiFunctionTaxaContributionPlots.R

Description

A function to plot different versions of the FishTaco plot for multiple functions

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
MultiFunctionTaxaContributionPlots(input_dir = NULL, input_prefix = NULL,
  input_suffix = ".tab", input_score = "wilcoxon",
  input_contribution = "taxa_contributions",
  input_original = "original_value", input_permutation = "multi_taxa",
  input_predicted_da = "predicted_DA_value",
  input_predicted_function = "predicted_function_abundance",
  input_predicted_residual = "residual_function_abundance",
  input_predicted_abundance_agreement = "predicted_function_agreement",
  input_inference_copy_number = "taxa_learned_copy_num",
  input_taxa_da = "DA_taxa", input_function_abundance = NULL,
  input_function_meta = NULL, input_taxa_taxonomy = NULL,
  input_taxa_vs_function = NULL, input_function_counts = NULL,
  input_function_stats = NULL, input_function_filter_list = NULL,
  input_function_filter_file = NULL, plot_type = "bars",
  sort_by = "predicted_da", min_contribution = 0,
  min_cont_as_separate = 0.025, min_function_counts = 0,
  min_shift_explained = 0, max_function_to_show = NULL,
  show_only_diff_abun_taxa = FALSE, show_only_pos = FALSE,
  show_only_neg = FALSE, show_only_taxa_with_function = FALSE,
  show_only_enriched_taxa = FALSE, show_only_enriched_functions = FALSE,
  show_only_depleted_taxa = FALSE, show_only_depleted_functions = FALSE,
  scale_pos_by_original_pos_sum = FALSE,
  scale_neg_by_original_neg_sum = FALSE, add_facet_labels = FALSE,
  add_names_in_bars = FALSE, add_taxa_da = FALSE,
  add_case_control_line = FALSE, add_predicted_da_markers = TRUE,
  add_original_da_markers = FALSE, add_phyla_names_to_species_label = FALSE,
  color_small_cont_by_phyla = FALSE, input_bar_width = NULL,
  verbose = FALSE, flip_coord = TRUE, split_function_names_2_lines = TRUE,
  separate_enriched_depleted_taxa = TRUE, use_facets_for_separation = FALSE,
  flip_case_control = FALSE)

Arguments

input_dir

The directory where all the FiShTaCo input files can be found (default: NULL).

input_prefix

The prefix for all input files (e.g., pathway_with_t2f, default: NULL).

input_suffix

The suffix for all input files (default: ".tab").

input_score

The calculated shift scoring metric (default: wilcoxon).

input_contribution

The taxon-level contribution profile (default: "taxa_contributions").

input_original

The original (metagenome-based) calculated shift (default: "original_value").

input_permutation

The permutation type used (default: "multi_taxa").

input_predicted_da

The predicted (taxa-based) shift score (default: "predicted_DA_value").

input_predicted_function

The predicted (taxa-based) functional abundance (default: "predicted_function_abundance").

input_predicted_residual

The residual functional abundance (default: "residual_function_abundance").

input_predicted_abundance_agreement

The agreement between the taxa- and metagenome based functional abundance (default: "predicted_function_agreement").

input_inference_copy_number

The inferred copy number for each function (default: "taxa_learned_copy_num").

input_taxa_da

The calculated taxonomic composition shift score (default: "DA_taxa").

input_function_abundance

The metagenome-based functional abundance (default: NULL).

input_function_meta

Metadata on the given functions (default: NULL).

input_taxa_taxonomy

Phylogenetic assignment for each taxon (default: NULL).

input_taxa_vs_function

The genomic content of each taxon (default: NULL).

input_function_counts

The median count of functions across samples (default: NULL).

input_function_stats

Statistics about each function across the taxa (default: NULL).

input_function_filter_list

A list of specific functions to plot (default: NULL).

input_function_filter_file

A file containing a list of specific functions to plot (default: NULL).

plot_type

The type of plot to be plotted (default: "bars").

sort_by

How to sort the functions in the plot (default: "predicted_da").

min_contribution

Minimum taxon contribution to plot (default: 0).

min_cont_as_separate

Minimum contribution to plot as separate species (default: 0.2).

max_function_to_show

Maximum number of functions to show (default: NULL).

show_only_diff_abun_taxa

Show only taxa that shift in abundance (default: FALSE).

show_only_pos

Show only taxa that contribute positively (drive) to the shift (default: FALSE).

show_only_neg

Show only taxa that contribute negatively (attenuate) to the shift (default: FALSE).

show_only_taxa_with_function

Show only taxa that have the function in their genome (default: FALSE).

show_only_enriched_taxa

Show only taxa that are case-associated (default: FALSE).

show_only_enriched_functions

Show only functions that are case-enriched (default: FALSE).

show_only_depleted_taxa

Show only taxa that are control-associated (default: FALSE).

show_only_depleted_functions

Show only functions that are control-enriched (default: FALSE).

scale_pos_by_original_pos_sum

Scale driving contribution by their sum (default: FALSE)

scale_neg_by_original_neg_sum

Scale attenuating contribution by their sum (default: FALSE)

add_facet_labels

Add labels to each function (default: FALSE).

add_names_in_bars

Add taxa names in the bars (default: FALSE).

add_taxa_da

Add a top bar of taxonomic shifts (default: FALSE).

add_case_control_line

Add a line separating case- and control-enriched functions (default: FALSE).

add_predicted_da_markers

Add diamond markers for the taxa-based shift score (default: TRUE).

add_original_da_markers

Add diamond markers for the metagenome-based shift score (default: FALSE).

input_bar_width

Defines the width of the bars (default: NULL).

verbose

Run with verbose (default: FALSE).

flip_coord

Flip axis to show horizontal bars (default: TRUE).

split_function_names_2_lines

Splits function names into 2 lies (default: TRUE).

separate_enriched_depleted_taxa

Separate case- and control-associated taxa (default: TRUE).

use_facets_for_separation

Use facets for separation of functions (default: FALSE).

flip_case_control

Switch between cases and controls (default: FALSE).

Value

a handle to the resulting plot.


borenstein-lab/fishtaco-plot documentation built on July 7, 2021, 4:18 a.m.