Last data update: 2014.03.03

R: Calculate LowMACA statistics
entropyR Documentation

Calculate LowMACA statistics

Description

entropy is a method for objects of class LowMACA. It calculates global entropy score of the mutation profile of the alignment and a test for every position in the consensus comparing the number of observed mutations against a weigthed random uniform distribution.

Usage

entropy(object, bw = NULL , conservation=0.1)

Arguments

object

an object of class LowMACA

bw

a character string or a numeric positive value representing the desired bandwith to launch the function density for the uniform distribution. 0 will not launch density (every position is not aggregated to the surrounded ones) , 'auto' will let the simulation decide according to the Silverman's rule of thumb and every other number is a user defined bandwidth passed to the function density.

conservation

a number between 0 and 1. Represents the minimum level of conservation to test a mutation

Details

The parameter bw overwrites the bandwidth set with lmParams. Therefore, if bw is set to NULL, the method entropy uses the predefined bandwidth of the LowMACA object.

Value

entropy returns an object of class LowMACA updating the slot entropy and the slot alignment. The slot entropy becomes a list of 6 elements:

  • bw the bandwidth used to calculate the null profile

  • uniform a function to calculate the null profile

  • absval absolute value of entrpy calculated

  • log10pval p value of the entropy test in log 10

  • pvalue p value of the entropy test

  • conservation_thr the minimum conservation level accepted

The slot alignment is updated in the df element by adding 6 new columns

  • mean a numeric vector representing the mean value of the empirical uniform function at every position in the consensus

  • lTsh a numeric vector representing the limit inferior of the 95% confidence interval of the empirical uniform function at every position in the consensus

  • uTsh a numeric vector representing the limit superior of the 95% confidence interval of the empirical uniform function at every position in the consensus

  • profile a numeric vector representing the density of mutations at every position in the sample normalized by the number of position. In case of bandwidth 0, this vector is equal to the number of mutations divided by the total number of mutations

  • pvalue a numeric vector representing the pvalue of the number of mutations found at every position against the weigthed random uniform distribution of mutations

  • qvalue a numeric vector representing the corrected pvalues using FDR method. Only positions with a conservation score >= 10% are considered

Author(s)

Stefano de Pretis , Giorgio Melloni

References

doi:10.1186/gm563 923 Melloni et al.: DOTS-Finder: a comprehensive tool for assessing driver genes in cancer genomes. Genome Medicine 2014 6:44

Silverman, B. W. (1986) Density Estimation. London: Chapman and Hall.

See Also

alignSequences lmParams lmEntropy

Examples

#Load homeobox example and run entropy
data(lmObj)
lmObj <- entropy(lmObj)
lmEntropy(lmObj)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(LowMACA)
Checking if clustalo is in the PATH...
Checking perl installation...
Checking perl modules XML::Simple and LWP...
Can't locate XML/Simple.pm in @INC (you may need to install the XML::Simple module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .).
BEGIN failed--compilation aborted.
Warning messages:
1: In .ClustalChecks(ClustalCommand = "clustalo") :
  Clustal Omega is not in the PATH:
You can either change clustalo command using lmParams function or use the web service. See ?setup
2: running command '/usr/bin/perl -MXML::Simple -e 1' had status 2 
3: In .PerlModuleChecks(stop = FALSE, perl = "perl") :
  XML::Simple module for perl is not installed. 
            If you don't want to install a local clustal omega and use the web service, XML::Simple is required

> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/LowMACA/entropy.Rd_%03d_medium.png", width=480, height=480)
> ### Name: entropy
> ### Title: Calculate LowMACA statistics
> ### Aliases: entropy
> 
> ### ** Examples
> 
> #Load homeobox example and run entropy
> data(lmObj)
> lmObj <- entropy(lmObj)
Making uniform model...
Assigned bandwidth: 0
> lmEntropy(lmObj)
$bw
[1] 0

$uniform
function (nmut) 
list(mean = model.mean(nmut), sd = model.sd(nmut), max = model.max(nmut))
<environment: 0xc31df68>

$absval
[1] 3.599257

$log10pval
[1] -11.36962

$pvalue
[1] 4.269571e-12

$conservation_thr
[1] 0.1

> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>