Learn R Programming

SurprisalAnalysis (version 3.0.0)

surprisal_analysis: This function performs surprisal analysis on transcriptomics data

Description

This function performs surprisal analysis on transcriptomics data

Usage

surprisal_analysis(input.data, zero.handling = "pseudocount")

Value

a list containing two matrix array objects, first one holding the lambda values representing the constraints or Lagrange multipliers and the second one holding the corresponding weights of transcripts stored (G matrix)

Arguments

input.data

transcriptomics data stores as dataframe

zero.handling

zero handling method. Can be either 'pseudocount' or 'log1p'. By default it is set to 'pseudocount'

Examples

Run this code
expr.df <- data.frame(gene_id = paste0("Gene", 1:6),
S1 = c(0, 12, 3, 0, 50, 7),
S2 = c(5, 0, 2, 9, 0, 4),
S3 = c(8, 15, 0, 1, 25, 0),
S4 = c(0, 7, 6, 0, 40, 3),
check.names = FALSE)
surprisal_analysis(expr.df, zero.handling = "pseudocount")

Run the code above in your browser using DataLab