visualizeCapRStereogene: visualizeCapRStereogene

Description Usage Arguments Value Examples

View source: R/visualizeCapRStereogene.R

Description

Creates a visual output of all CapR RNA structure contexts relative to protein binding.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
visualizeCapRStereogene(
  dir_stereogene_output = ".",
  CapR_prefix,
  protein_file,
  protein_file_input = NULL,
  x_lim = c(-100, 100),
  y_lim = NULL,
  error = 1,
  nShuffle = 100,
  out_file = "out_file",
  legend = TRUE,
  heatmap = FALSE
)

Arguments

dir_stereogene_output

Directory of stereogene output. Default working directory.

CapR_prefix

The prefix string common to CapR output files of protein_file. Required.

protein_file

A vector of at least one protein file name to be averaged for visualization. File names must exclude extensions such as ".bedGraph". All files in the list should be experimental or biological replicates. Required.

protein_file_input

A protein file name of background input to be subtracted from protein_file signal. File name must exclude extension. Only one input file is permitted. Optional.

x_lim

A vector of two integers denoting the lower and upper x axis limits. Cannot exceed wSize/2 from write_config. Default (-100, 100)

y_lim

A vector of two numbers denoting the lower and upper y axis limits. Optional

error

A numeric value that determines the number of standard deviations to show in the error bar. Default 1

nShuffle

Relevant if multiple protein files are input and background error has been calculated. It is the number of iterations used to derive background signal error. Should be same for all protein files. Default 100.

out_file

Name of output file, excluding extension. ".pdf" or ".jpeg" will be added as relevant to the output file name. Default "out_file"

legend

Whether a legend should be included with the output graph. Default TRUE

heatmap

Whether the output graph should be in the form of a heatmap (TRUE) or of a line graph (FALSE). Default FALSE

Value

heatmap (JPEG) or line graph (PDF) image file

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## pull example files
get_outfiles()
## heatmap
visualizeCapRStereogene(CapR_prefix = "chr4and5_3UTR",
                       protein_file = "chr4and5_liftOver",
                       heatmap = TRUE,
                       out_file = "all_contexts_heatmap",
                       x_lim = c(-500, 500))
## line graph
visualizeCapRStereogene(CapR_prefix = "chr4and5_3UTR",
                       protein_file = "chr4and5_liftOver",
                       x_lim = c(-500, 500),
                       out_file = "all_contexts_line",
                       y_lim = c(-18, 22))

vbusa1/nearBynding documentation built on Aug. 4, 2021, 4:08 p.m.