format_pp_meta_fusions: To format ProteinPaint input meta data of gender

Description Usage Arguments Value Examples

View source: R/proteinpaint_utils.R

Description

To format ProteinPaint input meta data of gender

Usage

1
2
format_pp_meta_fusions(raw_meta, outfn = NULL, fusions_color = NULL,
  ...)

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

fusions_color

In one group, different fusions show different colors, default is NULL and use the setted theme color

...

Parameters pass to set_colors

Value

A data frame

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
meta_template <- system.file('extdata', 
'demo/proteinpaint/heatmap_meta_template.txt', package = 'ngstk')
raw_meta <- read.table(meta_template, sep = '\t', header = TRUE)
meta_test_1 <- raw_meta
term <- group <- 'Fusions'
meta_test_1$term <- term
meta_test_1$group <- group
meta_test_1$value <- c(rep(c('ZNF384-Fusions', 'MEF2D-Fusions'), 
3), 'TCF3-PBX1')
meta_fusions <- format_pp_meta_fusions(meta_test_1)
meta_test_2 <- raw_meta
term <- group <- c(rep(c('MEF2D-Fusions', 'ZNF384-Fusions'), 
3), 'DUX4-Fusions')
meta_test_2$term <- term
meta_test_2$group <- group
meta_test_2$value <- c('MEF2D-PA', 'EP300-ZNF384', 
'MEF2D-PB', 'ABC-ZNF384', 'MEF2D-PB', 'ABD-ZNF384', 
                       'DUX4-IGH')
meta_fusions <- format_pp_meta_fusions(meta_test_2)

ngstk documentation built on May 2, 2019, 9:19 a.m.