ngstk (version 0.1.1.1)

format_pp_meta_fusions: To format ProteinPaint input meta data of gender

Description

To format ProteinPaint input meta data of gender

Usage

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

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)
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)
# }

Run the code above in your browser using DataCamp Workspace