ngstk (version 0.1.0)

format_pp_meta_age: To format ProteinPaint input meta data of age

Description

To format ProteinPaint input meta data of age

Usage

format_pp_meta_age(raw_meta, outfn = NULL, age_group = "Age",
  adult_value = "Adult", child_value = "Pediatric",
  adult_color = "#c20b01", child_color = "#196abd", ...)

Arguments

raw_meta

A data.frame contain cols of 'sample', 'term', 'group', 'value', 'color' and 'legendorder'

outfn

Output file, default is NULL and not output to file

age_group

Name of age group, default is 'Age'

adult_value

Value of adult, default is 'Adult'

child_value

Value of child, default is 'Pediatric'

adult_color

Color of adult, default is '#c20b01'

child_color

Color of child, default is '#196abd'

...

Parameters pass to set_colors

Value

A data frame

Examples

Run this code
# NOT RUN {
meta_template <- system.file('extdata', 
'demo/proteinpaint/heatmap_meta_template.txt', 
package = 'ngstk')
raw_meta <- read.table(meta_template, sep = '\t', header = TRUE)
term <- group <- 'Age'
raw_meta$term <- term
raw_meta$group <- group
raw_meta$value <- c(rep(c('Adult', 'Pediatric'), 3),  'Male')
meta_age <- format_pp_meta_age(raw_meta)
# }

Run the code above in your browser using DataCamp Workspace