Skip to content

Commit

Permalink
better readme
Browse files Browse the repository at this point in the history
  • Loading branch information
iblacksand committed Aug 11, 2023
1 parent e97c74b commit 876f505
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 10 deletions.
28 changes: 23 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ knitr::opts_chunk$set(
<!-- badges: start -->
<!-- badges: end -->

R package to interface with the ClinicalOmicsDB API. Designed with the structure from https://r-pkgs.org/.
R package to interface with the ClinicalOmicsDB API. Can be used to download data for your own analysis, or directly load study information into a dataframe for exploration.

Designed with the structure from https://r-pkgs.org/.

## Installation

Expand All @@ -29,12 +31,28 @@ You can install the development version of clinicalomicsdbR from [GitHub](https:
devtools::install_github("bzhanglab/clinicalomicsdbR")
```

See Examples below to see how to use.

## Parameters

- `hostname` - base URL of the website containing the ClinicalOmicsDB API. Only change if you are running a custom service.
- `study_list` - list containing all the studies that were filtered by the `filter()` function.

## Functions

- `new()` - Create new clinicalomicsdbR object. Needed before any other function
- `filter(drugs, cancers)` - filters studies matching provided arugments. `drugs` is a list and can be individual drugs or combinations. See the ClinicalOmicsDB website for all options. `cancers` can contain multiple cancers.
- `download(output_dir)` - downloads all studies from `filter()` into `output_dir`. `output_dir` is optional, and defaults to `clindb`
- `dataframe()` - loads all the studies from `filter()` into a dataframe, with column `study_list` that contains the names of the studies and `df` that contains a list of the study data information.
- `new()` - Create new clinicalomicsdbR object. Needed before any other
function
- `filter(drugs, cancers)` - filters studies matching provided
arugments. `drugs` is a list and can be individual drugs or
combinations. See the ClinicalOmicsDB website for all options.
`cancers` can contain multiple cancers.
- `download(output_dir)` - downloads all studies from `filter()` into
`output_dir`. `output_dir` is optional, and defaults to `clindb`
- `dataframe()` - loads all the studies from `filter()` into a
list, with column `study_list` that contains the names of the
studies and `df` that contains a list of the study data information.
- `dataframe_from_id(study_id)` - loads a study with id from `study_id` into a dataframe
- `downlaod_from_id(study_id, output_dir)` - downsloads a study with id from `study_id` into a folder `output_dir`. `output_dir` defaults to `clindb`

See the examples below for more information on how to use.

Expand Down
25 changes: 20 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
<!-- badges: start -->
<!-- badges: end -->

R package to interface with the ClinicalOmicsDB API. Designed with the
structure from <https://r-pkgs.org/>.
R package to interface with the ClinicalOmicsDB API. Can be used to download data for your own analysis, or directly load study information into a dataframe for exploration.

Designed with the structure from https://r-pkgs.org/.

## Installation

Expand All @@ -19,6 +20,15 @@ You can install the development version of clinicalomicsdbR from
devtools::install_github("bzhanglab/clinicalomicsdbR")
```

See Examples below to see how to use.

## Parameters

- `hostname` - base URL of the website containing the ClinicalOmicsDB
API. Only change if you are running a custom service.
- `study_list` - list containing all the studies that were filtered by
the `filter()` function.

## Functions

- `new()` - Create new clinicalomicsdbR object. Needed before any other
Expand All @@ -29,9 +39,14 @@ devtools::install_github("bzhanglab/clinicalomicsdbR")
`cancers` can contain multiple cancers.
- `download(output_dir)` - downloads all studies from `filter()` into
`output_dir`. `output_dir` is optional, and defaults to `clindb`
- `dataframe()` - loads all the studies from `filter()` into a
list, with column `study_list` that contains the names of the
studies and `df` that contains a list of the study data information.
- `dataframe()` - loads all the studies from `filter()` into a list,
with column `study_list` that contains the names of the studies and
`df` that contains a list of the study data information.
- `dataframe_from_id(study_id)` - loads a study with id from `study_id`
into a dataframe
- `downlaod_from_id(study_id, output_dir)` - downsloads a study with id
from `study_id` into a folder `output_dir`. `output_dir` defaults to
`clindb`

See the examples below for more information on how to use.

Expand Down

0 comments on commit 876f505

Please sign in to comment.