Skip to content

Commit

Permalink
update readme linux
Browse files Browse the repository at this point in the history
  • Loading branch information
marinakiweler committed Jan 29, 2019
1 parent 2d22e89 commit 12d5d5e
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 48 deletions.
42 changes: 25 additions & 17 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,44 +35,52 @@ The raw file format starts with meta data. It consists of more information about

You can install MARMoSET from github the following way:

```{r, message=FALSE}
# install.packages("remotes")
```{r, eval=FALSE}
install.packages('remotes')
remotes::install_github("loosolab/MARMoSET", host="github.molgen.mpg.de/api/v3")
library(MARMoSET)
remotes::install_github('loosolab/MARMoSET', host='github.molgen.mpg.de/api/v3')
```

## Usage:

The c# command line tool can be used in R with `use_rawMetaAsJson()` to create a JSON file including only the meta data of grouped raw files.
It takes as argument `path_data`, a path to a raw file or a directory containing raw files.
The c# command line tool can be used in R with `use_rawMetaAsJson()` to create a JSON file including only the meta data of grouped raw files. It takes as argument `path_data`, a path to a raw file or a directory containing raw files.

This JSON file can also be created by using the rawMetaAsJson.exe externally.

Due to the design of the RawFileReader the rawMetaAsJson.exe and therefore this command is running as 64 bit code on Windows only. To use this package with another operating system, it is necessarry to already have the JSON file created.

```{r}
# representative of any raw file / directory containing raw files
data <- system.file(
file.path('extdata', 'testfile.raw'),
package = 'MARMoSET', mustWork = TRUE)
library(MARMoSET)
json <- use_rawMetaAsJson(path_data = data)
if(.Platform$OS.type == 'windows')
{
# representative of any raw file / directory containing raw files
data <- system.file(
file.path('extdata', 'testfile.raw'),
package = 'MARMoSET', mustWork = TRUE)
json <- use_rawMetaAsJson(path_data = data)
} else
{
# non windows user need to read in the JSON file here
json <- MARMoSET::testfile_json
}
```

This JSON file can also be created by using the rawMetaAsJson.exe externally.

To allow an easier access to the JSON file it needs to be flattened, this works with `flatten_json()` which takes only one argument: `json`.

```{r}
flat_json <- flatten_json(json = json)
```

Since raw files include a huge amount of meta data and only several of this information is required by journals there is the need to sort out. Therefore a table linking which information is essential and where to find it in the flattened JSON is useful. Such a here refered to as 'term matching table' can be created with `term_matching_table()` by submitting two arguments. The first, `instrument_list` takes a vector with the names of the instruments represented in the JSON file.
The second one, `origin_key` specifies which requirements should be met. If it stays empty, all journals are selected. While `"jpr"` stands for the requirements of the Journal of Proteome Research, `"mcp"` chooses the requirements of the Molecular and Cellular Proteomics.
The second one, `origin_key` specifies which requirements should be met. If it stays empty, all journals are selected. While `'jpr'` stands for the requirements of the Journal of Proteome Research, `'mcp'` chooses the requirements of the Molecular and Cellular Proteomics.

```{r}
term_matching_table <- create_term_match_table(
instrument_list = c("Thermo EASY-nLC", "Q Exactive - Orbitrap_MS"),
origin_key = "jpr")
instrument_list = c('Thermo EASY-nLC', 'Q Exactive - Orbitrap_MS'),
origin_key = 'jpr')
```

The names of the instruments can be shown for each group with `instrument_names()` with the json and the group number as arguments.
Expand Down
38 changes: 24 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,43 +25,53 @@ The raw file format starts with meta data. It consists of more information about
Installation
------------

You can install MARMoSET from github with:
You can install MARMoSET from github the following way:

``` r
# install.packages("devtools")
# devtools::install_github("loosolab/MARMoSET")
install.packages('remotes')

library(MARMoSET)
remotes::install_github('loosolab/MARMoSET', host='github.molgen.mpg.de/api/v3')
```

Usage:
------

The c\# command line tool can be used in R with `use_rawMetaAsJson()` to create a JSON file including only the meta data of grouped raw files. It takes as argument `path_data`, a path to a raw file or a directory containing raw files.

This JSON file can also be created by using the rawMetaAsJson.exe externally.

Due to the design of the RawFileReader the rawMetaAsJson.exe and therefore this command is running as 64 bit code on Windows only. To use this package with another operating system, it is necessarry to already have the JSON file created.

``` r
# representative of any raw file / directory containing raw files
data <- system.file(
file.path('extdata', 'testfile.raw'),
package = 'MARMoSET', mustWork = TRUE)
library(MARMoSET)

json <- use_rawMetaAsJson(path_data = data)
if(.Platform$OS.type == 'windows')
{
# representative of any raw file / directory containing raw files
data <- system.file(
file.path('extdata', 'testfile.raw'),
package = 'MARMoSET', mustWork = TRUE)

json <- use_rawMetaAsJson(path_data = data)
} else
{
# non windows user need to read in the JSON file here
json <- MARMoSET::testfile_json
}
```

This JSON file can also be created by using the rawMetaAsJson.exe externally.

To allow an easier access to the JSON file it needs to be flattened, this works with `flatten_json()` which takes only one argument: `json`.

``` r
flat_json <- flatten_json(json = json)
```

Since raw files include a huge amount of meta data and only several of this information is required by journals there is the need to sort out. Therefore a table linking which information is essential and where to find it in the flattened JSON is useful. Such a here refered to as 'term matching table' can be created with `term_matching_table()` by submitting two arguments. The first, `instrument_list` takes a vector with the names of the instruments represented in the JSON file. The second one, `origin_key` specifies which requirements should be met. If it stays empty, all journals are selected. While `"jpr"` stands for the requirements of the Journal of Proteome Research, `"mcp"` chooses the requirements of the Molecular and Cellular Proteomics.
Since raw files include a huge amount of meta data and only several of this information is required by journals there is the need to sort out. Therefore a table linking which information is essential and where to find it in the flattened JSON is useful. Such a here refered to as 'term matching table' can be created with `term_matching_table()` by submitting two arguments. The first, `instrument_list` takes a vector with the names of the instruments represented in the JSON file. The second one, `origin_key` specifies which requirements should be met. If it stays empty, all journals are selected. While `'jpr'` stands for the requirements of the Journal of Proteome Research, `'mcp'` chooses the requirements of the Molecular and Cellular Proteomics.

``` r
term_matching_table <- create_term_match_table(
instrument_list = c("Thermo EASY-nLC", "Q Exactive - Orbitrap_MS"),
origin_key = "jpr")
instrument_list = c('Thermo EASY-nLC', 'Q Exactive - Orbitrap_MS'),
origin_key = 'jpr')
```

The names of the instruments can be shown for each group with `instrument_names()` with the json and the group number as arguments.
Expand Down
Binary file added data/testfile_json.rda
Binary file not shown.
42 changes: 25 additions & 17 deletions vignettes/using_MARMoSET.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,44 +39,52 @@ The raw file format starts with meta data. It consists of more information about

You can install MARMoSET from github the following way:

```{r, message=FALSE}
# install.packages("devtools")
```{r, eval=FALSE}
install.packages('remotes')
devtools::install_github("loosolab/MARMoSET", host="github.molgen.mpg.de/api/v3")
library(MARMoSET)
remotes::install_github('loosolab/MARMoSET', host='github.molgen.mpg.de/api/v3')
```

## Usage:

The c# command line tool can be used in R with `use_rawMetaAsJson()` to create a JSON file including only the meta data of grouped raw files.
It takes as argument `path_data`, a path to a raw file or a directory containing raw files.
The c# command line tool can be used in R with `use_rawMetaAsJson()` to create a JSON file including only the meta data of grouped raw files. It takes as argument `path_data`, a path to a raw file or a directory containing raw files.

This JSON file can also be created by using the rawMetaAsJson.exe externally.

Due to the design of the RawFileReader the rawMetaAsJson.exe and therefore this command is running as 64 bit code on Windows only. To use this package with another operating system, it is necessarry to already have the JSON file created.

```{r}
# representative of any raw file / directory containing raw files
data <- system.file(
file.path('extdata', 'testfile.raw'),
package = 'MARMoSET', mustWork = TRUE)
library(MARMoSET)
json <- use_rawMetaAsJson(path_data = data)
if(.Platform$OS.type == 'windows')
{
# representative of any raw file / directory containing raw files
data <- system.file(
file.path('extdata', 'testfile.raw'),
package = 'MARMoSET', mustWork = TRUE)
json <- use_rawMetaAsJson(path_data = data)
} else
{
# non windows user need to read in the JSON file here
json <- MARMoSET::testfile_json
}
```

This JSON file can also be created by using the rawMetaAsJson.exe externally.

To allow an easier access to the JSON file it needs to be flattened, this works with `flatten_json()` which takes only one argument: `json`.

```{r}
flat_json <- flatten_json(json = json)
```

Since raw files include a huge amount of meta data and only several of this information is required by journals there is the need to sort out. Therefore a table linking which information is essential and where to find it in the flattened JSON is useful. Such a here refered to as 'term matching table' can be created with `term_matching_table()` by submitting two arguments. The first, `instrument_list` takes a vector with the names of the instruments represented in the JSON file.
The second one, `origin_key` specifies which requirements should be met. If it stays empty, all journals are selected. While `"jpr"` stands for the requirements of the Journal of Proteome Research, `"mcp"` chooses the requirements of the Molecular and Cellular Proteomics.
The second one, `origin_key` specifies which requirements should be met. If it stays empty, all journals are selected. While `'jpr'` stands for the requirements of the Journal of Proteome Research, `'mcp'` chooses the requirements of the Molecular and Cellular Proteomics.

```{r}
term_matching_table <- create_term_match_table(
instrument_list = c("Thermo EASY-nLC", "Q Exactive - Orbitrap_MS"),
origin_key = "jpr")
instrument_list = c('Thermo EASY-nLC', 'Q Exactive - Orbitrap_MS'),
origin_key = 'jpr')
```

The names of the instruments can be shown for each group with `instrument_names()` with the json and the group number as arguments.
Expand Down

0 comments on commit 12d5d5e

Please sign in to comment.