Skip to content

Commit b26494d

Browse files
authored
Merge pull request #22 from GilbertLabUCSF/docs
add detailed documents
2 parents be47d92 + d609b01 commit b26494d

12 files changed

+3947
-95
lines changed

README.rst

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
CanDI - A global cancer data integrator
2+
=======================================
3+
4+
|Documentation Status|
5+
6+
Package Installation
7+
--------------------
8+
9+
First, you need to clone this repository to use CanDI.
10+
11+
.. code:: bash
12+
13+
git clone https://github.com/GilbertLabUCSF/CanDI.git
14+
15+
We suggest to use `Conda <https://docs.conda.io/en/latest/>`__ as a
16+
package manager and environment management system. You can create a
17+
fresh conda environment with all ``CanDI``\ ’s requirements using bellow
18+
command:
19+
20+
.. code:: bash
21+
22+
conda env create -f CaDI/candi.yml -n candi
23+
24+
Prepare Datasets
25+
~~~~~~~~~~~~~~~~
26+
27+
The python command from CanDI will automatically download and modify
28+
datasets.
29+
30+
.. code:: bash
31+
32+
python CanDI/CanDI/install.py
33+
34+
Downloaded and formatted datasets would organize this way:
35+
36+
.. code::
37+
38+
.
39+
├── config.ini # modified after Installation
40+
├── depmap
41+
│ ├── CCLE_expression.csv
42+
│ ├── CCLE_fusions.csv
43+
│ ├── CCLE_gene_cn.csv
44+
│ ├── CCLE_mutations.csv
45+
│ ├── CCLE_RNAseq_reads.csv
46+
│ ├── CRISPR_gene_dependency.csv
47+
│ ├── CRISPR_gene_effect.csv
48+
│ └── sample_info.csv
49+
├── genes
50+
│ └── gene_info.csv
51+
└── locations
52+
└── merged_locations.csv
53+
54+
Package Usage
55+
-------------
56+
57+
Import CanDI into python
58+
~~~~~~~~~~~~~~~~~~~~~~~~
59+
60+
To import ``CanDI``, your active directory in python must be same as the
61+
cloned folder.
62+
63+
.. code:: python
64+
65+
import CanDI as can
66+
67+
**OR**, you can add path to the `CanDI` directory if you want to use it from other directories.
68+
69+
.. code:: python
70+
71+
import sys
72+
sys.path.append("path-to-candi-directory")
73+
74+
import CanDI as can
75+
76+
CanDI Objects
77+
~~~~~~~~~~~~~
78+
79+
- ``data`` : Container for all candi datasets. All access to datasets
80+
go through data object.
81+
- ``Gene`` : Provides cross dataset indexing from the gene perspective.
82+
- ``CellLine`` : Provides cross dataset indexing from the cell line
83+
perspective.
84+
- ``Cancer`` : Provides cross dataset indexing by a group of cell lines
85+
that are all the same tissue.
86+
- ``Organelle``: Provides cross dataset indexing for a group of genes
87+
whose proteins localize to the same organelle.
88+
- ``CellLineCluster`` : Provides cross dataset indexing for a group of
89+
user defined cell lines.
90+
- ``GeneCluster`` : Provides cross dataset indexing for a group of user
91+
defined genes.
92+
93+
.. |Documentation Status| image:: https://readthedocs.org/projects/candi/badge/?version=latest
94+
:target: https://candi.readthedocs.io/en/latest/?badge=latest

docs/environment.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ channels:
44
- conda-forge
55
- defaults
66
dependencies:
7+
- python
78
- sphinx==3.2.1
89
- pandas
9-
- nbsphinx==0.8.1
10+
- pip
1011
- pip:
12+
- nbsphinx
1113
- sphinx_rtd_theme==0.4.3

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
sphinx==3.2.1
22
sphinx_rtd_theme==0.4.3
3+
nbsphinx
34
readthedocs-sphinx-search==0.1.0rc3
45
pandas
56
configparser

docs/source/CanDI.rst

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,26 @@
1-
CanDI package
2-
=============
3-
41
CanDI.candi module
5-
------------------
2+
==================
63

7-
.. automodule:: CanDI.candi
4+
.. automodule:: CanDI.candi.candi
85
:members:
96
:undoc-members:
107
:show-inheritance:
118

129
CanDI.data module
13-
-----------------
14-
15-
.. automodule:: CanDI.data
16-
:members:
17-
:undoc-members:
18-
:show-inheritance:
19-
20-
CanDI.handlers module
21-
---------------------
22-
23-
.. automodule:: CanDI.handlers
24-
:members:
25-
:undoc-members:
26-
:show-inheritance:
10+
=================
11+
The data class is instantiated at import. This class contains paths to all data downloaded with CanDI.
12+
It has internal methods for loading datasets into memory as pandas dataframes.
13+
There are 3 index tables that candi relies on for fetch all data:
2714

28-
CanDI.install module
29-
--------------------
15+
- cell_lines
16+
- genes
17+
- locations
3018

31-
.. automodule:: CanDI.install
32-
:members:
33-
:undoc-members:
34-
:show-inheritance:
35-
36-
CanDI.manager module
37-
--------------------
38-
39-
.. automodule:: CanDI.manager
40-
:members:
41-
:undoc-members:
42-
:show-inheritance:
19+
These tables are automatically loaded as pandas dataframes upon import of CanDI
20+
It is highly recommended the user familiarize themself with the columns and indexes of these tables.
21+
All candi classes operate through these index tables.
4322

44-
CanDI.reset\_config module
45-
--------------------------
46-
47-
.. automodule:: CanDI.reset_config
23+
.. automodule:: CanDI.candi.data
4824
:members:
4925
:undoc-members:
5026
:show-inheritance:
51-

docs/source/README.rst

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
CanDI - A global cancer data integrator
2+
=======================================
3+
4+
|Documentation Status|
5+
6+
Package Installation
7+
--------------------
8+
9+
First, you need to clone this repository to use CanDI.
10+
11+
.. code:: bash
12+
13+
git clone https://github.com/GilbertLabUCSF/CanDI.git
14+
15+
We suggest to use `Conda <https://docs.conda.io/en/latest/>`__ as a
16+
package manager and environment management system. You can create a
17+
fresh conda environment with all ``CanDI``\ ’s requirements using bellow
18+
command:
19+
20+
.. code:: bash
21+
22+
conda env create -f CaDI/candi.yml -n candi
23+
24+
Prepare Datasets
25+
~~~~~~~~~~~~~~~~
26+
27+
The python command from CanDI will automatically download and modify
28+
datasets.
29+
30+
.. code:: bash
31+
32+
python CanDI/CanDI/install.py
33+
34+
Downloaded and formatted datasets would organize this way:
35+
36+
.. code::
37+
38+
.
39+
├── config.ini # modified after Installation
40+
├── depmap
41+
│ ├── CCLE_expression.csv
42+
│ ├── CCLE_fusions.csv
43+
│ ├── CCLE_gene_cn.csv
44+
│ ├── CCLE_mutations.csv
45+
│ ├── CCLE_RNAseq_reads.csv
46+
│ ├── CRISPR_gene_dependency.csv
47+
│ ├── CRISPR_gene_effect.csv
48+
│ └── sample_info.csv
49+
├── genes
50+
│ └── gene_info.csv
51+
└── locations
52+
└── merged_locations.csv
53+
54+
Package Usage
55+
-------------
56+
57+
Import CanDI into python
58+
~~~~~~~~~~~~~~~~~~~~~~~~
59+
60+
To import ``CanDI``, your active directory in python must be same as the
61+
cloned folder.
62+
63+
.. code:: python
64+
65+
import CanDI as can
66+
67+
**OR**, you can add path to the `CanDI` directory if you want to use it from other directories.
68+
69+
.. code:: python
70+
71+
import sys
72+
sys.path.append("path-to-candi-directory")
73+
74+
import CanDI as can
75+
76+
CanDI Objects
77+
~~~~~~~~~~~~~
78+
79+
- ``data`` : Container for all candi datasets. All access to datasets
80+
go through data object.
81+
- ``Gene`` : Provides cross dataset indexing from the gene perspective.
82+
- ``CellLine`` : Provides cross dataset indexing from the cell line
83+
perspective.
84+
- ``Cancer`` : Provides cross dataset indexing by a group of cell lines
85+
that are all the same tissue.
86+
- ``Organelle``: Provides cross dataset indexing for a group of genes
87+
whose proteins localize to the same organelle.
88+
- ``CellLineCluster`` : Provides cross dataset indexing for a group of
89+
user defined cell lines.
90+
- ``GeneCluster`` : Provides cross dataset indexing for a group of user
91+
defined genes.
92+
93+
.. |Documentation Status| image:: https://readthedocs.org/projects/candi/badge/?version=latest
94+
:target: https://candi.readthedocs.io/en/latest/?badge=latest

brca_heatmap.ipynb renamed to docs/source/brca_heatmap.ipynb

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
{
22
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# _BRCA_ Heatmap"
8+
]
9+
},
310
{
411
"cell_type": "code",
512
"execution_count": 1,
6-
"id": "a63ef233",
713
"metadata": {},
814
"outputs": [],
915
"source": [
@@ -16,7 +22,6 @@
1622
},
1723
{
1824
"cell_type": "markdown",
19-
"id": "4f21e048",
2025
"metadata": {},
2126
"source": [
2227
"### Cancer Object Instantiation\n",
@@ -27,7 +32,6 @@
2732
{
2833
"cell_type": "code",
2934
"execution_count": 2,
30-
"id": "21f19aab",
3135
"metadata": {},
3236
"outputs": [
3337
{
@@ -51,7 +55,6 @@
5155
},
5256
{
5357
"cell_type": "markdown",
54-
"id": "02119bf2",
5558
"metadata": {},
5659
"source": [
5760
"### Subsetting by mutation status\n",
@@ -64,7 +67,6 @@
6467
{
6568
"cell_type": "code",
6669
"execution_count": 3,
67-
"id": "96b1f2c1",
6870
"metadata": {},
6971
"outputs": [
7072
{
@@ -461,7 +463,6 @@
461463
},
462464
{
463465
"cell_type": "markdown",
464-
"id": "13705e7a",
465466
"metadata": {},
466467
"source": [
467468
"I want to look at BRCA1 mutations in these types of cancers. I start by using the mutated function to identify ovarian and breast cancer cell lines with BRCA1 mutations. A cancer object's mutated method's default behavior is to output a list of depmap ids corresponding to celllines containing any mutation within the given genes. I then instantiate CellLineCluster objects of exclusively mutated or wild type cell lines for both breast and ovarian cancer. This makes comparing these cell lines easier.\n",
@@ -471,7 +472,6 @@
471472
{
472473
"cell_type": "code",
473474
"execution_count": 4,
474-
"id": "4726efb9",
475475
"metadata": {},
476476
"outputs": [
477477
{
@@ -508,7 +508,6 @@
508508
},
509509
{
510510
"cell_type": "markdown",
511-
"id": "103f3f3e",
512511
"metadata": {},
513512
"source": [
514513
"### Cross Referencing Mutation and Gene Knockout Data\n",
@@ -519,7 +518,6 @@
519518
{
520519
"cell_type": "code",
521520
"execution_count": 5,
522-
"id": "ddcdd407",
523521
"metadata": {},
524522
"outputs": [],
525523
"source": [
@@ -569,7 +567,6 @@
569567
},
570568
{
571569
"cell_type": "markdown",
572-
"id": "7d3d1277",
573570
"metadata": {},
574571
"source": [
575572
"### Fanconi Anemia Genes Knockout Effect in Ovarian Cancer\n",
@@ -579,7 +576,6 @@
579576
{
580577
"cell_type": "code",
581578
"execution_count": 6,
582-
"id": "0194cc45",
583579
"metadata": {},
584580
"outputs": [
585581
{
@@ -618,7 +614,6 @@
618614
},
619615
{
620616
"cell_type": "markdown",
621-
"id": "f8d4d556",
622617
"metadata": {},
623618
"source": [
624619
"### Fanconi Anemia Genes Knockout Effect in Breast Cancer\n",
@@ -628,7 +623,6 @@
628623
{
629624
"cell_type": "code",
630625
"execution_count": 7,
631-
"id": "e1d3cbab",
632626
"metadata": {},
633627
"outputs": [
634628
{
@@ -665,7 +659,7 @@
665659
"name": "python",
666660
"nbconvert_exporter": "python",
667661
"pygments_lexer": "ipython3",
668-
"version": "3.9.2"
662+
"version": "3.8.5"
669663
}
670664
},
671665
"nbformat": 4,

0 commit comments

Comments
 (0)