sh_entropy: Calculating Shannon entropy of each sample, Shannnon entropy...

Description Usage Arguments Details Value Examples

View source: R/sh_entropy.R

Description

This function returns a list, containing dataframe with the entropy values per sample, entropy plot and transcript frequency plot

Usage

1
2
3
4
5
6
7
sh_entropy(
  df,
  name = "Shannon entropy",
  pdf = TRUE,
  relevel = FALSE,
  levels = NULL
)

Arguments

df

input dataframe with transcripts in rows and samples in columns

name

name of the output pdf with defult "Shannon entropy", used when pdf is TRUE

pdf

logical parameter to create pdf with with default TRUE

relevel

logical parameter to reorder the samples order in the plots with default FALSE

levels

vector with the correct order of the samples with default NULL; will be used only if relevel is TRUE

Details

This function takes a dataframe with transcripts in rows and samples in columns as an input and calculates the Shannon entropy for each sample and the frequency of the transcript in the sample. Further it visualizes the entropy levels and the frequencies. The transcripts are reordered by their frequencies. Function can also print the plots to pdf if pdf parameter is TRUE.

Value

list with the entropy levels and plots

Examples

1
2
3

Troshchk/bioEAT documentation built on Dec. 18, 2021, 5:13 p.m.