tidyIntensity: Function tidyIntensity

Description Usage Arguments Details Value Author(s) Examples

View source: R/tidyIntensity.R

Description

Takes dataframe or matrix of intensity values with geneid rownames and samplename columnnames and a grouping vector. Returns a tidy dataframe.

Usage

1
tidyIntensity(x, rowidColname, keyColname, valueColname, group)

Arguments

x

A dataframe or matrix with rownames and colnames (required)

rowidColname

Column name for the rowID (Usually a geneID column) If it doesn't exist, it will be created from rownames (required)

keyColname

Defines the column name that will hold the sample names captured from the colnames of the input dataframe (required)

valueColname

Defines the column name for the value column (intensity values) (required)

group

A grouping variable to define which columns go together (vector with length = ncol(x) of the input dataframe). This is typically the name of a column from the design table (required)

Details

This function takes a genes x samples datafile of e.g. log2cpm. It uses tidyr::gather to produce a "tidy" datafile.

So the rowidColname defines the name you want the gene id column to have and will create the column from the rownames which are typically ensembl gene IDs. If you add a gene symbol column to your intensity dataframe, you can specify the name of that column with the rowidColname argument and it will be used instead of the rownames.

Value

A tidy dataframe of intensity data.

Author(s)

John Thompson, john.thompson@bms.com

Examples

1
2
3
4
5
  MyTidyIntensity  = tidyIntensity (MyLog2CPM,
                                    rowidColname="GeneID",
                                    keyColname="Sample"
                                    valueColname="Log2CPM",
                                    group=dgeObj$design$ReplicateGroup)

jrthompson54/DGE.Tools2 documentation built on May 12, 2021, 8:47 p.m.