Skip to contents

Tidies sample names and parses an experimental design.

Usage

prepare_diann_data(pg_matrix, pr_matrix)

Arguments

pg_matrix

The report.pg_matrix file

pr_matrix

The report.pr_matrix file

Value

A list with a tidied pg_matrix, pr_matrix, and parsed expDesign.

Details

This functions tidies sample names and prepares and experimental design, assuming that the structure of the sample names is <prefix_condition_replicate>. An example of the prepared sample names and expDesign is printed in the console.

Examples

tidy_data <- prepare_diann_data(report.pg_matrix, report.pr_matrix)
#>                 label condition replicate
#> neg_ctrl_1 neg_ctrl_1  neg_ctrl         1
#> neg_ctrl_2 neg_ctrl_2  neg_ctrl         2
#> neg_ctrl_3 neg_ctrl_3  neg_ctrl         3
#> motif1_1     motif1_1    motif1         1
#> motif1_2     motif1_2    motif1         2
#> motif1_3     motif1_3    motif1         3
#> motif2_1     motif2_1    motif2         1
#> motif2_2     motif2_2    motif2         2
#> motif2_3     motif2_3    motif2         3
pg_matrix <- tidy_data$pg_matrix
pr_matrix <- tidy_data$pr_matrix