view_volcano_plot: Create a volcano plot of analysis results.

View source: R/view_volcano_plot.R

view_volcano_plotR Documentation

Create a volcano plot of analysis results.

Description

Fold change and significance are used to produce a volcano plot of data for gene expression, DAVID analysis and gene set colloctions

Usage

view_volcano_plot(
  my_pack = NULL,
  base_file_name = NULL,
  base_title = NULL,
  colname_of_feature_groups = NULL,
  colname_of_feature_names = NULL,
  colname_of_fold_change = NULL,
  colname_of_pValue = NULL,
  colname_of_FDR = NULL,
  imported_annotation = NULL,
  my_dt = NULL,
  ordered_factors = NULL,
  output_dir = NULL,
  add_pdf_metadata = TRUE,
  axis.title.x.size = 12,
  axis.title.y.size = 16,
  FDR_label_threshhold = NULL,
  fdr_method = "BH",
  FDR_sig_alpha = 1,
  label_font_size = 2.5,
  label_pValue_line = TRUE,
  log_completion = FALSE,
  max_number_of_labels = 50,
  nonsig_label = NULL,
  num_top_groups_to_color = 6,
  n_to_label = NULL,
  output_subfolder = "XX_Volcano_Plot",
  pdf_bookmark_title = "02_Volcano_Plot",
  pdf_height = 7,
  pdf_width = 9,
  plot_by_FDR = FALSE,
  pValue_label_threshhold = NULL,
  pValue_line = NULL,
  sig1_cutoff = 0.05,
  sig1_label = NULL,
  sig1_type = "FDR",
  sig2_cutoff = 0.05,
  sig2_label = NULL,
  sig2_type = "pValue",
  strings_to_cut_from_labels = c("MOUSECYC_MM", "PWY", "WIKIPATHWAYS_MM", "PANTHER_MM",
    "BIOCARTA_MM", "WIKIPATHWAYS_MM", "KEGG_MM", "TF_MM", "REACTOME_MM", "TFACTS_MM",
    "PID_", "KEGG_", "BIOCARTA", "REACTOME_", "NABA_"),
  x_axis_label = NULL
)

Arguments

my_pack

A named list for analysis modules to send parameters to the view function in a more compact fashion:

  • base_file_name

  • base_title

  • colname_of_feature_groups

  • colname_of_feature_names

  • colname_of_fold_change

  • colname_of_pValue

  • colname_of_FDR

  • imported_annotation

  • my_dt

  • ordered_factors

  • output_dir

These list items may be overridden by specifying them individually. They are described in more detail below.

base_file_name

Overrides my_pack$base_file_name. String to specify the file name.

base_title

Overrides my_pack$base_title. String to specify the title of the graph.

colname_of_feature_groups

Overrides my_pack$colname_of_feature_groups. String indicating the name of the column to get the feature groups from. If providing groups the points will be colored according to these groups and not significance.

colname_of_feature_names

Overrides my_pack$colname_of_feature_names. String indicating the name of the column to pull the feature names from.

colname_of_fold_change

Overrides my_pack$colname_of_fold_change. String indicating the name of the column to get the fold change from.

colname_of_pValue

Overrides my_pack$colname_of_pValue. String indicating the name of the column to get the pValue from.

colname_of_FDR

Overrides my_pack$colname_of_FDR. String indicating the name of the column to get the FDR from. If not provided the fdr_method will be used to calculate FDR values. fdr_method should be set to "none" if no correction is desired.

imported_annotation

Overrides my_pack$my_annotation. Annotations describe the steps taken during the analysis module and previous steps. This function will also add annotation steps to provide a full description of how the graph was generated.

my_dt

Data table to provide the information for the graph. It should have columns for pValue and fold_change as a minimum.

ordered_factors

Overrides my_pack$ordered_factors. A character string of length 2 to tell the x axis what it should be labeled

output_dir

Overrides my_pack$output_dir. Path to folder where the heatmap output should go. Analysis modules will determine this automatically.

add_pdf_metadata

Boolean indicating whether the pdf metadata should be chnaged. Is pdftk present?

axis.title.x.size

Numeric indicating the size of the x axis title.

axis.title.y.size

Numeric indicating the size of the y axis title.

FDR_label_threshhold

Number to specify threshold over which points will not be labeled.

fdr_method

String indicting the type of fdr method to use if no colname_of_FDR is given. See p.adjust 'method'.

FDR_sig_alpha

numeric to indicate the alpha value of fdr significant points

label_font_size

Numeric to indicate the size of the point labels.

label_pValue_line

Boolean to determine whether the pValue line should be labeled.

log_completion

Binary indicting whether the graph should be added to the table of completed analyses.

max_number_of_labels

integer indicating the max number of points that will be labeled.

nonsig_label

String to label legend for non-significant points.

num_top_groups_to_color

Integer that tells how many of the top groups (using group argument) should be labeled and colored.

n_to_label

Integer to specify how many points should be labeled. More than 25 or so can get a bit cluttered. This argument supercedes FDR and pValue label threshholds. Set to 0 if you don't want labels

output_subfolder

String that specifies what folder the output will go into in the main output directory.

pdf_bookmark_title

String indicating the name of the bookmark that will be used when concatentaing the pdf's into a report

pdf_height

Sets the height (inches) of the pdf output

pdf_width

Sets the width (inches) of the pdf output

plot_by_FDR

boolean to indicate if the y axis should be against the FDR_corrected pvalues

pValue_label_threshhold

Number to specify threshold over which points will not be labeled.

pValue_line

Number to specify where to draw a line to label a specific pValue. Usually set to 0.05 if used.

sig1_cutoff

Numeric to indicate the upper bound for the most significant points.

sig1_label

String to label legend for the most significant points.

sig1_type

Either "FDR" or "pValue". Indicates what should be used to determine the most significant points.

sig2_cutoff

Numeric to indicate the upper bound for the second most significant points.

sig2_label

String to label legend for the second most significant points.

sig2_type

Either "FDR" or "pValue". Indicates what should be used to determine the second-most significant points.

strings_to_cut_from_labels

In certain gene group names a lot of the names can be very long and not very informative. This vector of character strings allows you to specify strings that will be cut out of the names. Leave off leading and trailing "_".

x_axis_label

String to specify label for x axis.

Details

bgv_volcano_plot points may be labeled based on being over a certain significance or just by labeling a certain number to label. Clusters of points may also be colored to show how the group is doing.

Value

1) Volcano plot; 2) Volcano plot pdf;

Todos

  • Debug for groups

Future changes

  • ...


Benjamin-Vincent-Lab/binfotron documentation built on Oct. 1, 2024, 8:33 p.m.