com_factor {spatialHeatmap}R Documentation

Combine Factors in Targets File

Description

This is a helper function for data/aSVGs involving three or more factors such as sample, time, condition. It combine factors in targets file to make composite factors.

Usage

com_factor(se, target, factors2com, sep = ".", factor.new)

Arguments

se

A SummarizedExperiment object.

target

A data.frame object of targets file.

factors2com

A character vector of column names or a numeric vector of column indeces in the targets file. Entries in these columns are combined.

sep

The separator in the combined factors. One of _, and . (default).

factor.new

The column name of the new combined factors.

Value

If se is provided, a SummarizedExperiment object is returned, where the colData slot contains the new column of combined factors. Otherwise, adata.frame object is returned, where the new column of combined factors is appended.

Author(s)

Jianhai Zhang jzhan067@ucr.edu; zhang.jianhai@hotmail.com
Dr. Thomas Girke thomas.girke@ucr.edu

References

Narsai, Reena, David Secco, Matthew D Schultz, Joseph R Ecker, Ryan Lister, and James Whelan. 2017. "Dynamic and Rapid Changes in the Transcriptome and Epigenome During Germination and in Developing Rice (Oryza Sativa) Coleoptiles Under Anoxia and Re-Oxygenation." Plant J. 89 (4): 805–24

Examples

clp.tar <- system.file('extdata/shinyApp/example/target_coleoptile.txt', package='spatialHeatmap')
target.clp <- read_fr(clp.tar)
target.clp <- com_factor(target=target.clp, factors2com=c('organism_part', 'age'), factor.new='samTime')

[Package spatialHeatmap version 2.0.0 Index]