Export the quantitative data from an tidyproteomics data-object
export_analysis.Rd
export_analysis()
returns the main quantitative data object as a tibble with
identifier as the designation for the measured observation.
Usage
export_analysis(
data = NULL,
...,
.analysis = NULL,
.term = NULL,
.append = NULL,
.file_name = NULL
)
Arguments
- data
tidyproteomics data object
- ...
two sample comparison e.g. experimental/control
- .analysis
a character string for the specific analysis to export. For example, the base analysis 'counts' always exists, it is the base analysis supporting plot_counts(). The other analysis are 'expression' and 'enrichment', which are only available when those analyses have been performed.
- .term
a character string of the term from an enrichment analysis. Use the show_annotations() function to list the available terms.
- .append
a character string of the term to append to the output. Use the show_annotations() function to list the available terms.
- .file_name
a character string for file to write to, format implied from string ('.rds', '.xlsx', '.csv', '.tsv')
Examples
library(dplyr, warn.conflicts = FALSE)
library(tidyproteomics)
hela_proteins %>%
expression(knockdown/control) %>%
export_analysis(knockdown/control,
.analysis = "expression")
#> ℹ .. expression::t_test testing knockdown / control
#> ✔ .. expression::t_test testing knockdown / control [3.2s]
#>
#> # A tibble: 5,187 × 27
#> protein imputed n imputed_control imputed_knockdown average_expression
#> <chr> <dbl> <int> <dbl> <dbl> <dbl>
#> 1 Q5SVJ8 0.333 6 0.667 0 755886.
#> 2 Q15011 0 6 0 0 4919332.
#> 3 F6SA91 0.167 6 0.333 0 879218.
#> 4 Q9NXV2 0 6 0 0 3103100.
#> 5 Q13751 0 6 0 0 1072517.
#> 6 O00308 0 6 0 0 733272.
#> 7 Q9BY50 0 6 0 0 2049680.
#> 8 Q8TBM8 0.333 6 0.667 0 3374207.
#> 9 Q5JUW8 0 6 0 0 1745373.
#> 10 Q5T9L3 0.167 6 0.333 0 961926.
#> # ℹ 5,177 more rows
#> # ℹ 21 more variables: proportional_expression <dbl>, foldchange <dbl>,
#> # log2_foldchange <dbl>, p_value <dbl>, adj_p_value <dbl>,
#> # normalization <chr>, abundance_control_1 <dbl>, abundance_control_2 <dbl>,
#> # abundance_control_3 <dbl>, abundance_knockdown_1 <dbl>,
#> # abundance_knockdown_2 <dbl>, abundance_knockdown_3 <dbl>,
#> # description <chr>, biological_process <chr>, cellular_component <chr>, …
hela_proteins %>%
export_analysis(.analysis = "counts")
#> # A tibble: 12 × 8
#> sample_id sample replicate proteins peptides peptides_unique quantifiable
#> <chr> <chr> <chr> <int> <dbl> <dbl> <dbl>
#> 1 6a21f7a9 control 3 6803 65477 58199 0.00908
#> 2 79a98e41 knockdown 2 6820 65644 58289 0.00909
#> 3 966be57f knockdown 1 6809 65522 58260 0.00908
#> 4 9e6ed3ba control 1 6776 65322 58100 0.00906
#> 5 9f804505 knockdown 3 6803 65597 58213 0.00906
#> 6 cc56fc1d control 2 6805 65455 58154 0.00905
#> 7 6a21f7a9 control 3 7055 66329 58706 0.0091
#> 8 79a98e41 knockdown 2 7055 66329 58706 0.0091
#> 9 966be57f knockdown 1 7055 66329 58706 0.00909
#> 10 9e6ed3ba control 1 7055 66329 58706 0.00907
#> 11 9f804505 knockdown 3 7055 66329 58706 0.00907
#> 12 cc56fc1d control 2 7055 66329 58706 0.00907
#> # ℹ 1 more variable: is_mbr <lgl>