write_expt: Make pretty xlsx files of count data.

View source: R/expt.R

write_exptR Documentation

Make pretty xlsx files of count data.

Description

Some folks love excel for looking at this data. ok.

Usage

write_expt(
  expt,
  excel = "excel/pretty_counts.xlsx",
  norm = "quant",
  violin = TRUE,
  sample_heat = NULL,
  convert = "cpm",
  transform = "log2",
  batch = "svaseq",
  filter = TRUE,
  med_or_mean = "mean",
  color_na = "#DD0000",
  merge_order = "counts_first",
  ...
)

Arguments

expt

An expressionset to print.

excel

Filename to write.

norm

Normalization to perform.

violin

Include violin plots?

sample_heat

Include sample heatmaps?

convert

Conversion to perform.

transform

Transformation used.

batch

Batch correction applied.

filter

Filtering method used.

med_or_mean

When printing mean by condition, one may want median.

color_na

Color cells which were NA before imputation this color.

merge_order

Used to decide whether to put the counts or annotations first when printing count tables.

...

Parameters passed down to methods called here (graph_metrics, etc).

Details

Tested in test_03graph_metrics.R This performs the following: Writes the raw data, graphs the raw data, normalizes the data, writes it, graphs it, and does a median-by-condition and prints that. I replaced the openxlsx function which writes images into xlsx files with one which does not require an opening of a pre-existing plotter. Instead it (optionally)opens a pdf device, prints the plot to it, opens a png device, prints to that, and inserts the resulting png file. Thus it sacrifices some flexibility for a hopefully more consistent behaivor. In addition, one may use the pdfs as a set of images importable into illustrator or whatever.

Value

A big honking excel file and a list including the dataframes and images created.

See Also

[openxlsx] [Biobase] [normalize_expt()] [graph_metrics()]

Examples

## Not run: 
 excel_sucks <- write_expt(expt)

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.