Skip to content

Commit

Permalink
readme nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiweler committed Jun 7, 2019
1 parent 594dd0f commit 7ceeda7
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 26 deletions.
5 changes: 3 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <NA>
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
Expand All @@ -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.
Expand Down
14 changes: 7 additions & 7 deletions vignettes/manipulate_term_match_table.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -38,27 +38,27 @@ 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.
`"literal"` leads to just copy the value of `handle`.
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
Expand All @@ -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.
Expand Down Expand Up @@ -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,])
```
6 changes: 2 additions & 4 deletions vignettes/using_MARMoSET.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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

0 comments on commit 7ceeda7

Please sign in to comment.