-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.html | ||
*.R |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
--- | ||
title: "Term matching tables" | ||
author: "Marina Kiweler" | ||
date: "`r Sys.Date()`" | ||
output: rmarkdown::html_vignette | ||
vignette: > | ||
%\VignetteIndexEntry{Vignette Title} | ||
%\VignetteEngine{knitr::rmarkdown} | ||
%\VignetteEncoding{UTF-8} | ||
--- | ||
|
||
```{r setup, include = FALSE} | ||
knitr::opts_chunk$set( | ||
collapse = TRUE, | ||
comment = "#>" | ||
) | ||
library(MARMoSET) | ||
``` | ||
|
||
## Structure | ||
|
||
The term matching table contains links between the information needed to create the output table. | ||
Some general term matching tables can be created by the function `create_term_matching_table()` by specifying the used instruments and the origin key. | ||
|
||
This function falls back on the included list of data frames `tmt_list` where each table is designed to fit one instrument. By calling the function with only one instrument name it will just extract the specific data frame. If called with more than one instrument (ordinarily 2) it will bind the tables together. | ||
|
||
```{r} | ||
tmt_LC_pump <- create_term_match_table( | ||
instrument_list = c("Thermo EASY-nLC")) | ||
# no origin key | ||
``` | ||
|
||
The table always consists of 6 columns whose order is important. The count of rows differ depending on the choosen requirements and the type of instrument. | ||
```{r} | ||
colnames(tmt_LC_pump) | ||
``` | ||
|
||
The first collumn 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]) | ||
``` | ||
|
||
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]) | ||
``` | ||
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 the handle. | ||
With "parameter" the row stays empty because the information is not represented in the json. | ||
|
||
```{r} | ||
head(tmt_LC_pump[4:5]) | ||
``` | ||
|
||
The last collumn shows an example of which value the row could have. | ||
|
||
```{r} | ||
head(tmt_LC_pump[c(2,6)]) | ||
``` | ||
|
||
## Create an own combination of the available requirements | ||
|
||
First extract a term matching table for the used instruments without specifying the origin key. | ||
|
||
```{r} | ||
full_tmt <- create_term_match_table( | ||
instrument_list = c("Thermo EASY-nLC", "Q Exactive - Orbitrap_MS")) | ||
# no origin key | ||
``` | ||
|
||
Now it is possible to subset or delete some rows with r tools. | ||
|
||
|
||
New rows can be added too. | ||
|
||
It is necessary to fill in `term_verbose`, `handle_type` and `handle` in their specific column. | ||
`term_verbose` should be a short desription for the collumn as it will show up as key in the final table. | ||
If `handle` contains a string that just needs to be copied to the output table the collumn `handle_type` should contain `"literal"`. | ||
|
||
If the row is meant to show an entry of the json `handle_type` needs to be `"list_path"` and `handle` should contain the path to the information in the flattened json after the group number. For example: The entry `flat_json[["Group.1.Instruments.Thermo EASY-nLC.InstrumentFriendName"]]` can be accessed with the value of handle = `"Instruments.Thermo EASY-nLC.InstrumentFriendName`" | ||
|