Learn R Programming

selfea (version 1.0.1)

get_statistics_from_file: get_statistics_from_file

Description

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

Usage

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. l{ ID,Y500U100_001,Y500U100_002,Y500U200_001,Y500U200_002 YKL060C
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_
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: ll{ $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 } ll{ 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

Run this code
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')

Run the code above in your browser using DataLab