diff --git a/README.Rmd b/README.Rmd index f56eb27..44d6cfc 100644 --- a/README.Rmd +++ b/README.Rmd @@ -102,7 +102,7 @@ meta_data_table <- one_group_match_terms(flat_json = flat_json, vector_of_group_tables <- match_terms(flat_json = flat_json, term_matching_table = term_matching_table) -head(meta_data_table, 3) +knitr::kable(meta_data_table[1:3,]) ``` In the meta data of the 'Thermo EASY-nlc' is a gradient table. This table can be grabbed either by `one_gradient_table()` for one specified group or with `gradient_tables()` for all groups at once. Output will be either one table or a vector of tables. @@ -115,7 +115,7 @@ gradient_table <- one_gradient_table(flat_json = flat_json, vector_of_gradient_tables <- gradient_tables(flat_json = flat_json, lc_pump = "Thermo EASY-nLC") -head(gradient_table, 2) +knitr::kable(gradient_table) ``` Finally to export all tables in a vector or one specific, the functions `save_group_table()` and `save_all_groups()`are helpful. The output of `gradient_tables()` or `match_terms()` goes in as `groups_vector` whereas the second argument, `output_path` expects a path with filename. `save_all_groups()` adds the group numbers automatically to each filename, `save_group_table()` takes it as third argument but doesn't add. @@ -141,6 +141,7 @@ group_count(json) files_in_group(json, 1) ``` + ## How to cite: Kiweler M, Looso M and Graumann J. MARMoSET – Extracting Publication-Ready Mass Spectrometry Metadata from RAW Files. Molecular & Cellular Proteomics (2019), DOI: 10.1074/mcp.TIR119.001505 diff --git a/README.md b/README.md index cee1945..7331220 100644 --- a/README.md +++ b/README.md @@ -93,17 +93,15 @@ meta_data_table <- one_group_match_terms(flat_json = flat_json, vector_of_group_tables <- match_terms(flat_json = flat_json, term_matching_table = term_matching_table) -head(meta_data_table, 3) -#> Term -#> 1 High Performance Liquid Chromatography (HPLC) Instrument -#> 2 HPLC Vendor -#> 3 HPLC Model -#> Value -#> 1 Thermo EASY-nLC -#> 2 Thermo Scientific -#> 3 +knitr::kable(meta_data_table[1:3,]) ``` +| Term | Value | +|:---------------------------------------------------------|:------------------| +| High Performance Liquid Chromatography (HPLC) Instrument | Thermo EASY-nLC | +| HPLC Vendor | Thermo Scientific | +| HPLC Model | NA | + In the meta data of the 'Thermo EASY-nlc' is a gradient table. This table can be grabbed either by `one_gradient_table()` for one specified group or with `gradient_tables()` for all groups at once. Output will be either one table or a vector of tables. ``` r @@ -114,12 +112,14 @@ gradient_table <- one_gradient_table(flat_json = flat_json, vector_of_gradient_tables <- gradient_tables(flat_json = flat_json, lc_pump = "Thermo EASY-nLC") -head(gradient_table, 2) -#> Time[mm:ss] Duration[mm:ss] Flow[nl/min] Mixture[%B] -#> 1 00:00 00:00 300 5 -#> 2 01:00 01:00 300 5 +knitr::kable(gradient_table) ``` +| Time\[mm:ss\] | Duration\[mm:ss\] | Flow\[nl/min\] | Mixture\[%B\] | +|:--------------|:------------------|:---------------|:--------------| +| 00:00 | 00:00 | 300 | 5 | +| 01:00 | 01:00 | 300 | 5 | + Finally to export all tables in a vector or one specific, the functions `save_group_table()` and `save_all_groups()`are helpful. The output of `gradient_tables()` or `match_terms()` goes in as `groups_vector` whereas the second argument, `output_path` expects a path with filename. `save_all_groups()` adds the group numbers automatically to each filename, `save_group_table()` takes it as third argument but doesn't add. The output file is a tab delimited .txt file for each group. diff --git a/vignettes/manipulate_term_match_table.Rmd b/vignettes/manipulate_term_match_table.Rmd index 5912b61..9c109ae 100644 --- a/vignettes/manipulate_term_match_table.Rmd +++ b/vignettes/manipulate_term_match_table.Rmd @@ -2,7 +2,7 @@ title: "Term matching tables" author: "Marina Kiweler" date: "`r Sys.Date()`" -output: rmarkdown::html_vignette +output: rmarkdown::html_vignette # md_document vignette: > %\VignetteIndexEntry{Term matching tables} %\VignetteEngine{knitr::rmarkdown} @@ -38,13 +38,13 @@ colnames(tmt_LC_pump) The first column of the resulting table is always the `term`. It is a short and unique description of the row. While the second, `term_verbose` contains a more detailed and readable title. ```{r} -head(tmt_LC_pump[1:2]) +knitr::kable(tmt_LC_pump[1:2]) ``` The third collumn `origin` contains keys determining which requirements to satisfy. These keys were read in the function `create_term_matching_table()` and compared to the value of `origin_key`. ```{r} -head(tmt_LC_pump[3]) +knitr::kable(tmt_LC_pump[3]) ``` In the fourth column `handle_type` specifys how to interpret the fifth column `handle`. `"list_path"` indicates that `handle` is a path in the flattened json. @@ -52,13 +52,13 @@ In the fourth column `handle_type` specifys how to interpret the fifth column `h With "parameter" the row stays empty because the information is not represented in the json. ```{r} -head(tmt_LC_pump[4:5]) +knitr::kable(tmt_LC_pump[4:5]) ``` The last column shows an example of which value the row could have. ```{r} -head(tmt_LC_pump[c(2,6)]) +knitr::kable(tmt_LC_pump[c(2,6)]) ``` ## Create an own combination of the available requirements @@ -77,7 +77,7 @@ Now it is possible to subset or delete some rows with r tools. sub_rows <- c(1, 6:8, 10) # wanted rows subset_tmt <- full_tmt[sub_rows,] -head(subset_tmt) +knitr::kable(subset_tmt) ``` New rows can be added. It is mandatory to fill in `term_verbose`, `handle_type` and `handle` in their specific column. @@ -125,5 +125,5 @@ This so changed term matching table can be used with the function `match_terms() subset_table <- one_group_match_terms(flat_json = flat_json, term_matching_table = subset_tmt, group_number = 1) -subset_table[5:7,] +knitr::kable(subset_table[5:7,]) ``` diff --git a/vignettes/using_MARMoSET.Rmd b/vignettes/using_MARMoSET.Rmd index c6dfd08..5ce48a6 100644 --- a/vignettes/using_MARMoSET.Rmd +++ b/vignettes/using_MARMoSET.Rmd @@ -107,7 +107,7 @@ meta_data_table <- one_group_match_terms(flat_json = flat_json, vector_of_group_tables <- match_terms(flat_json = flat_json, term_matching_table = term_matching_table) -head(meta_data_table, 3) +knitr::kable(meta_data_table[1:3,]) ``` In the meta data of the 'Thermo EASY-nlc' is a gradient table. This table can be grabbed either by `one_gradient_table()` for one specified group or with `gradient_tables()` for all groups at once. Output will be either one table or a vector of tables. @@ -120,7 +120,7 @@ gradient_table <- one_gradient_table(flat_json = flat_json, vector_of_gradient_tables <- gradient_tables(flat_json = flat_json, lc_pump = "Thermo EASY-nLC") -head(gradient_table, 2) +knitr::kable(gradient_table) ``` Finally to export all tables in a vector or one specific, the functions `save_group_table()` and `save_all_groups()`are helpful. The output of `gradient_tables()` or `match_terms()` goes in as `groups_vector` whereas the second argument, `output_path` expects a path with filename. `save_all_groups()` adds the group numbers automatically to each filename, `save_group_table()` takes it as third argument but doesn't add. @@ -147,6 +147,4 @@ files_in_group(json, 1) ``` -## How to cite: -Kiweler M, Looso M and Graumann J. MARMoSET – Extracting Publication-Ready Mass Spectrometry Metadata from RAW Files. Molecular & Cellular Proteomics (2019), DOI: 10.1074/mcp.TIR119.001505