calc_ttest_padj: Perform t-test and adjust p-values

Description Usage Arguments Examples

View source: R/calc_ttest_padj.R

Description

Reads a dataframe, recognizes protein groups, frequencies within each group, performes t-test, calculates p-values, and adjusts p-value for multiple hypothesis testing error. The starting dataframe can also contain columns with text. Experimental groups are identified based on specific character string for each group. If missing values are converted to NA, they will be omitted from the t-test. Minimum number of samples to be used in t-test can be defined by the user. Default value is 3 samples per group. Two tailed t-test is used without assuming equal variance. Equal variance can be selected by user using t.test_var.equal argument. P-values are adjusted using "Benjamini-Hochberg" method "BH". To use a different method, change pAdj_method parameter (see ?p.adjust for more info. Results are saved in your working directory and can be assigned to a variable for further processing.

Usage

1
2
3
calc_ttest_padj(x, id_groupA = "_groupA", id_groupB = "_groupB",
  min_A = 3, min_B = 3, t.test_var.equal = FALSE, pAdj_method = "BH",
  output_name = "processed p-values.txt")

Arguments

x

Dataframe containing quantitative values.

id_groupA

Identifier for the samples of the first study group.

id_groupB

Identifier for the samples of the second study group.

min_A

Minimum number of samples to be tested from group A.

min_B

Minimum number of samples to be tested from group B.

t.test_var.equal

Assumption for equal variance in t-test. Default is FALSE. Set TRUE is you assume equal variance in the set.

pAdj_method

Method for multiple hypothesis testing of the p-values. Default is "Benjamini-Hochberg" method "BH". Run ?p.adjust for more info.

output_name

Name of the output file containing the results. This output will be saved in your working directory. For this set the desired working directory before running the function. Also the output will be printed, so you can save it in a variable.

Examples

1
calc_ttest_padj(norm_data, id_groupA = "log2_disease", id_groupB = "log2_controls")

tkostas/komics documentation built on May 24, 2019, 7:31 a.m.