get_statistics_from_file: get_statistics_from_file

Description Usage Arguments Value Examples

View source: R/selfea.R

Description

This function computes Cohen's f, f2 and w, adjusted p-value from GLM quasi-Poisson, negative binomial and Normal distribution.

Usage

1
get_statistics_from_file(file_expr = "", file_group = "", padj = "fdr")

Arguments

file_expr

a CSV type file, comma (,) seperated file format, that has unique "ID" at the first column and expression data for the corresponding ID. Here is an short example.

ID,Y500U100_001,Y500U100_002,Y500U200_001,Y500U200_002
YKL060C,151,195,221,201
YDR155C,154,244,190,187
YOL086C,64,89,116,119
file_group

a CSV type file, comma (,) seperated file format, that consists of "Col_Name", column names of "file_expr" parameter, and "Group" information of the corresponding column name. The order of "Col_Name" column have to be same to order of columns in "file_expr". Here is an example. See also the example above.

Col_Name,Group
Y500U100_001,U100
Y500U100_002,U100
Y500U200_001,U200
Y500U200_002,U200
padj

Choose one of these c("holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none"). "fdr" is default option. The option is same to p.adjust.

Value

A list that consists of the following items:

$data_table A data frame that have statistics for each IDs
$min_rep Common number of replicates in your group information.
$max_rep Maximum number of replicates in your group information.
$nt The number of total experiments in your expression profile.
$ng The number of groups in your group information.
$method_pvalue_adjustment The selected method for p-value adjustment
data_table's elements
Cohens_W Cohen's w
Cohens_F Cohen's f
Cohens_F2 Cohen's f2
Max_FC Maximum fold change among all the possible group pairs
QP_Pval_adjusted Adjusted p-value from GLM quasi-Poisson
NB_Pval_adjusted Adjusted p-value from GLM negative binomial
Normal_Pval_adjusted Adjusted p-value from Normal ANOVA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
library(selfea)

## For this example we will import Gregori data
## Josep Gregori, Laura Villareal, Alex Sanchez, Jose Baselga, Josep Villanueva (2013).
## An Effect Size Filter Improves the Reproducibility
## in Spectral Counting-based Comparative Proteomics.
## Journal of Proteomics, DOI http://dx.doi.org/10.1016/j.jprot.2013.05.030')

## Description:
## Each sample consists in 500ng of standard yeast lisate spiked with
## 100, 200, 400 and 600fm of a mix of 48 equimolar human proteins (UPS1, Sigma-Aldrich).
## The dataset contains a different number of technical replimessagees of each sample

## Import Gregori data
data(example_data1)
df_contrast <- example_data
df_group <- example_group

## Write Gregori data to use 'get_statistics_from_file' function
write.csv(df_contrast,"expression.csv",row.names=FALSE)
write.csv(df_group,"group.csv",row.names=FALSE)

## Get statistics
list_result <- get_statistics_from_file("expression.csv","group.csv","fdr")

## Get significant features (alpha >= 0.05 and power >= 0.90)
significant_qpf <- top_table(list_result,pvalue=0.05,power_desired=0.90,method='QPF')

selfea documentation built on May 2, 2019, 5:08 a.m.