-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: improve documentation structure
- Loading branch information
Showing
15 changed files
with
232 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Installation | ||
____________ | ||
|
||
`nbiatoolkit` is currently under development and is not guaranteed to be stable. | ||
Please refer to the `1.0.0 Stable Release Milestone <https://github.com/jjjermiah/nbia-toolkit/milestone/1>`_ | ||
for the roadmap to the first stable release. | ||
|
||
PyPi Installation | ||
~~~~~~~~~~~~~~~~~ | ||
|
||
The easiest way to install `nbiatoolkit` is to use `pip` to install it from the | ||
`Python Package Index (PyPi) <https://pypi.org/project/nbiatoolkit/>`_. | ||
|
||
.. code-block:: console | ||
$ pip install nbiatoolkit | ||
***NOTE: It is recommended that you install the package in a conda or virtual environment.*** | ||
|
||
Conda Installation | ||
~~~~~~~~~~~~~~~~~~ | ||
|
||
Though the package is not available on conda, you can create a conda environment and install the package using pip: | ||
|
||
.. code-block:: console | ||
$ conda create -n nbia python=3.12 | ||
$ conda activate nbia | ||
$ pip install nbiatoolkit | ||
Virtual Environment Installation | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
If you prefer to use a virtual environment, you can create one and install the package using pip: | ||
|
||
.. code-block:: console | ||
$ python3 -m venv nbia | ||
$ source nbia/bin/activate | ||
$ pip install nbiatoolkit |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
.. include:: ../README.md | ||
:parser: myst_parser.sphinx_ | ||
|
||
.. toctree:: | ||
:caption: Getting started | ||
:name: getting-started | ||
:hidden: | ||
:maxdepth: 2 | ||
|
||
getting_started/NBIA.md | ||
getting_started/Installation.rst | ||
getting_started/InitializeClient.rst | ||
getting_started/logger.rst | ||
|
||
.. toctree:: | ||
:caption: Querying API | ||
:name: querying-api | ||
:hidden: | ||
:maxdepth: 2 | ||
|
||
querying_api/ExploringCollections.rst | ||
querying_api/ExploringModalities.rst | ||
|
||
.. toctree:: | ||
:caption: Project Info | ||
:name: project-info | ||
:hidden: | ||
:maxdepth: 2 | ||
|
||
project_info/CONTRIBUTING.md | ||
project_info/CHANGELOG.md | ||
project_info/CONDUCT.md |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# CODE OF CONDUCT | ||
# Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
docs/markdowns/CONTRIBUTING.md → docs/project_info/CONTRIBUTING.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
Collection Methods | ||
^^^^^^^^^^^^^^^^^^ | ||
The simplest way to get a list of collections is to use the | ||
:meth:`nbiatoolkit.NBIAClient.getCollections` method. | ||
This method returns a list of all collections available in the NBIA database. | ||
|
||
The method has the following signature: | ||
|
||
.. automethod:: nbiatoolkit.NBIAClient.getCollections | ||
|
||
Passing no parameters to the method will return a list of all collections available in the NBIA database. | ||
Passing a `prefix` parameter will return a list of collections that match the prefix. | ||
|
||
.. tabs:: | ||
|
||
.. tab:: Python | ||
|
||
.. exec_code:: | ||
|
||
# --- hide: start --- | ||
from nbiatoolkit import NBIAClient | ||
from pprint import pprint as print | ||
# --- hide: stop --- | ||
|
||
client = NBIAClient(return_type = "dataframe") | ||
collections_df = client.getCollections(prefix='TCGA') | ||
|
||
print(f"The number of available collections is {len(collections_df)}") | ||
|
||
print(collections_df) | ||
|
||
|
||
.. automethod:: nbiatoolkit.NBIAClient.getCollectionDescriptions | ||
|
||
.. tabs:: | ||
|
||
.. tab:: Python | ||
|
||
.. exec_code:: | ||
|
||
# --- hide: start --- | ||
from nbiatoolkit import NBIAClient | ||
from pprint import pprint as print | ||
# --- hide: stop --- | ||
|
||
with NBIAClient() as client: | ||
desc = client.getCollectionDescriptions(collectionName = "TCGA-BLCA")[0] | ||
|
||
print(desc['Description']) | ||
print(desc['DescriptionURI']) | ||
print(desc['LastUpdated']) | ||
|
||
|
||
|
||
.. automethod:: nbiatoolkit.NBIAClient.getCollectionPatientCount | ||
|
||
|
||
.. tabs:: | ||
|
||
.. tab:: Python | ||
|
||
.. exec_code:: | ||
|
||
# --- hide: start --- | ||
from nbiatoolkit import NBIAClient | ||
# --- hide: stop --- | ||
|
||
with NBIAClient() as client: | ||
counts_df = client.getCollectionPatientCount( | ||
prefix = "TCGA", | ||
return_type="dataframe" | ||
) | ||
|
||
print(counts_df) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
|
||
|
||
Modality Methods | ||
^^^^^^^^^^^^^^^^^^ | ||
The :meth:`getModalityValues` method can provide insight to the available modality types in the NBIA database. | ||
|
||
The method has the following signature: | ||
|
||
.. automethod:: nbiatoolkit.NBIAClient.getModalityValues | ||
|
||
Passing no parameters to the method will return a list of all modality types available in the NBIA database. | ||
Filtering by :code:`Collection` and :code:`BodyPartExamined` is also possible. | ||
The :code:`Counts` parameter can be set to :code:`True` to return the number of patients for each modality type. | ||
|
||
.. tabs:: | ||
|
||
.. tab:: Python | ||
|
||
.. tabs:: | ||
|
||
.. tab:: Default Query | ||
.. exec_code:: | ||
|
||
# --- hide: start --- | ||
from nbiatoolkit import NBIAClient | ||
# --- hide: stop --- | ||
|
||
with NBIAClient(return_type="dataframe") as client: | ||
modalities = client.getModalityValues() | ||
|
||
print(modalities) | ||
|
||
.. tab:: Filtered Query | ||
|
||
.. exec_code:: | ||
|
||
# --- hide: start --- | ||
from nbiatoolkit import NBIAClient | ||
# --- hide: stop --- | ||
|
||
with NBIAClient(return_type="dataframe") as client: | ||
modalities = client.getModalityValues( | ||
Collection = "TCGA-BLCA", | ||
) | ||
|
||
print(modalities) | ||
|
||
.. tab:: Counts Query | ||
|
||
.. exec_code:: | ||
|
||
# --- hide: start --- | ||
from nbiatoolkit import NBIAClient | ||
# --- hide: stop --- | ||
|
||
with NBIAClient(return_type="dataframe") as client: | ||
modalities = client.getModalityValues( | ||
Collection = "TCGA-BLCA", | ||
Counts = True | ||
) | ||
|
||
print(modalities) |
Oops, something went wrong.