Skip to content

Commit 5675103

Browse files
authored
Merge pull request #293 from PNNL-CompBio/291-update-documentation
update-documentation
2 parents e1a8488 + 2cf7cad commit 5675103

File tree

3 files changed

+380
-149
lines changed

3 files changed

+380
-149
lines changed

docs/assets/css/style.css

+83-7
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,26 @@ body {
139139
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.05);
140140
}
141141

142-
code {
142+
/* inline code */
143+
code.highlighter-rouge{
144+
background: white;
145+
border: 1px solid #ccc;
146+
padding: 2.5px;
147+
148+
}
149+
150+
/* code block */
151+
div.highlighter-rouge {
143152
background-color: white;
144153
width: 60%;
145154
border: 1px solid #ccc;
146-
padding: 2.5px;
155+
padding: 2.5px;
156+
overflow-x: auto;
147157

148158
}
149159

150-
/* pre > code.language-bash {
160+
/*
161+
pre > code.language-bash {
151162
background-color: white;
152163
width: 60%;
153164
border: 1px solid #ccc;
@@ -162,7 +173,8 @@ pre > code.language-python {
162173
display: block;
163174
overflow-x: auto;
164175
border: 1px solid #ccc;
165-
} */
176+
}
177+
*/
166178
/*
167179
.hamburger {
168180
display: none;
@@ -230,7 +242,7 @@ pre > code.language-python {
230242
*/
231243

232244

233-
.code-box {
245+
.code-box {
234246
background-color: white;
235247
border: 1px solid #ccc;
236248
font-family: monospace; /* Gives the text a code-like appearance */
@@ -247,7 +259,7 @@ pre > code.language-python {
247259

248260
.flex-container {
249261
display: flex;
250-
justify-content: space-around; /* Or use 'center' if you prefer */
262+
justify-content: space-around; /* Or use 'center' if you ffer */
251263
align-items: center;
252264
flex-wrap: wrap; /* Allows items to wrap onto the next line on smaller screens */
253265
width: 100%;
@@ -476,4 +488,68 @@ th {
476488
font-size: 16px;
477489
}
478490

479-
}
491+
}
492+
493+
/* Github stlye syntax highlighting*/
494+
495+
.highlight .hll { background-color: #ffffcc }
496+
.highlight .c { color: #999988; font-style: italic } /* Comment */
497+
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
498+
.highlight .k { color: #000000; font-weight: bold } /* Keyword */
499+
.highlight .o { color: #000000; font-weight: bold } /* Operator */
500+
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
501+
.highlight .cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */
502+
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
503+
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
504+
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
505+
.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
506+
.highlight .gr { color: #aa0000 } /* Generic.Error */
507+
.highlight .gh { color: #999999 } /* Generic.Heading */
508+
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
509+
.highlight .go { color: #888888 } /* Generic.Output */
510+
.highlight .gp { color: #555555 } /* Generic.Prompt */
511+
.highlight .gs { font-weight: bold } /* Generic.Strong */
512+
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
513+
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
514+
.highlight .kc { color: #000000; font-weight: bold } /* Keyword.Constant */
515+
.highlight .kd { color: #000000; font-weight: bold } /* Keyword.Declaration */
516+
.highlight .kn { color: #000000; font-weight: bold } /* Keyword.Namespace */
517+
.highlight .kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */
518+
.highlight .kr { color: #000000; font-weight: bold } /* Keyword.Reserved */
519+
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
520+
.highlight .m { color: #009999 } /* Literal.Number */
521+
.highlight .s { color: #d01040 } /* Literal.String */
522+
.highlight .na { color: #008080 } /* Name.Attribute */
523+
.highlight .nb { color: #0086B3 } /* Name.Builtin */
524+
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
525+
.highlight .no { color: #008080 } /* Name.Constant */
526+
.highlight .nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */
527+
.highlight .ni { color: #800080 } /* Name.Entity */
528+
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
529+
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
530+
.highlight .nl { color: #990000; font-weight: bold } /* Name.Label */
531+
.highlight .nn { color: #555555 } /* Name.Namespace */
532+
.highlight .nt { color: #000080 } /* Name.Tag */
533+
.highlight .nv { color: #008080 } /* Name.Variable */
534+
.highlight .ow { color: #000000; font-weight: bold } /* Operator.Word */
535+
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
536+
.highlight .mf { color: #009999 } /* Literal.Number.Float */
537+
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
538+
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
539+
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
540+
.highlight .sb { color: #d01040 } /* Literal.String.Backtick */
541+
.highlight .sc { color: #d01040 } /* Literal.String.Char */
542+
.highlight .sd { color: #d01040 } /* Literal.String.Doc */
543+
.highlight .s2 { color: #d01040 } /* Literal.String.Double */
544+
.highlight .se { color: #d01040 } /* Literal.String.Escape */
545+
.highlight .sh { color: #d01040 } /* Literal.String.Heredoc */
546+
.highlight .si { color: #d01040 } /* Literal.String.Interpol */
547+
.highlight .sx { color: #d01040 } /* Literal.String.Other */
548+
.highlight .sr { color: #009926 } /* Literal.String.Regex */
549+
.highlight .s1 { color: #d01040 } /* Literal.String.Single */
550+
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
551+
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
552+
.highlight .vc { color: #008080 } /* Name.Variable.Class */
553+
.highlight .vg { color: #008080 } /* Name.Variable.Global */
554+
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
555+
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */

docs/index.md

+40-20
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,62 @@ title: CoderData
77

88
<!-- # Cancer Omics and Drug Experiment Response Data (`coderdata`) Python Package -->
99

10-
### Introduction
10+
## Introduction
1111
CoderData is a cancer benchmark data package developed in Python and R.
1212
There are two aspects of this package, the backend build section and the user facing python package.
1313
The build section is a github workflow that generates four cancer datasets in a format that is easy for users and algorithms to ingest.
1414
The python package allows users to easily download the data, load it into python and reformat it as desired.
1515

16-
### Installation and Usage
17-
##### Bash / Command Line
16+
## Installation and Usage
17+
### Installation
1818

19-
To install coderdata, simply run the following command in your terminal:
19+
Assuming `python>=3.9` is installed on the system, simply run the following command in the terminal to install the most recent release of the coderdata API:
2020

2121
```bash
22-
pip install coderdata
22+
$ pip install coderdata
2323
```
2424

25-
##### Bash / Command line
26-
To download datasets, simply run the following command in your terminal. Remove the prefix argument if you'd like to install all datasets.
25+
### Bash / Command line
26+
A full list of available datasets can be retrieved via:
27+
```sh
28+
$ coderdata --list
29+
```
30+
31+
To download datasets, simply run the following command in your terminal substituting `<DATASET>` with the desired dataset (e.g. `beataml`). To download all datasets use `--name all`.
2732

2833
```bash
29-
coderdata download --prefix hcmi
34+
$ coderdata download --name <DATASET>
3035
```
3136

32-
##### Python
33-
To download, load, and call datasets in python, simply run the following commands.
34-
35-
<div class="code-box">
36-
<p>import coderdata as cd </p>
37-
<p>cd.download_data_by_prefix('hcmi')</p>
38-
<p>hcmi_data = cd.DatasetLoader('hcmi')</p>
39-
<p>hcmi_data.transcriptomics</p>
40-
</div>
37+
### Python
38+
39+
To download, load, and call datasets in python, simply run the following commands.
40+
41+
```python
42+
>>> import coderdata as cd
43+
>>> cd.download(name='beataml')
44+
>>> beataml = cd.load('beataml')
45+
>>> beataml.experiments
46+
source improve_sample_id improve_drug_id study time time_unit dose_response_metric dose_response_value
47+
0 synapse 3907 SMI_11123 BeatAML 72 hrs fit_auc 0.0564
48+
1 synapse 3907 SMI_11211 BeatAML 72 hrs fit_auc 0.9621
49+
2 synapse 3907 SMI_12192 BeatAML 72 hrs fit_auc 0.1691
50+
3 synapse 3907 SMI_12254 BeatAML 72 hrs fit_auc 0.4245
51+
4 synapse 3907 SMI_12469 BeatAML 72 hrs fit_auc 0.7397
52+
... ... ... ... ... ... ... ... ...
53+
233775 synapse 3626 SMI_7110 BeatAML 72 hrs dss 0.0000
54+
233776 synapse 3626 SMI_7590 BeatAML 72 hrs dss 0.0000
55+
233777 synapse 3626 SMI_8159 BeatAML 72 hrs dss 0.1946
56+
233778 synapse 3626 SMI_8724 BeatAML 72 hrs dss 0.0000
57+
233779 synapse 3626 SMI_987 BeatAML 72 hrs dss 0.7165
58+
59+
[233780 rows x 8 columns]
60+
```
4161

42-
View our [Usage](pages/usage.md) page for full instructions.
62+
For more indepth instructions view our [Usage](pages/usage.md) page.
4363

4464

45-
### Datasets
65+
## Datasets
4666

4767
<table>
4868
<thead>
@@ -171,7 +191,7 @@ View our [Usage](pages/usage.md) page for full instructions.
171191
</div> -->
172192

173193

174-
### Data Overview
194+
## Data Overview
175195

176196
<div class="flex-container">
177197
<div class="flex-item">

0 commit comments

Comments
 (0)