diff --git a/README.md b/README.md index 1732e5a..158824e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # *NBIA Toolkit* +## A python package that provides programmatic access to query and download images from the National Biomedical Imaging Archive (**NBIA**) and The Cancer Imaging Archive (**TCIA**) databases. [![PyTests](https://github.com/jjjermiah/nbia-toolkit/actions/workflows/main.yml/badge.svg)](https://github.com/jjjermiah/nbia-toolkit/actions/workflows/main.yml) [![Documentation Status](https://readthedocs.org/projects/nbia-toolkit/badge/?version=latest)](https://nbia-toolkit.readthedocs.io/en/latest/?badge=latest) [![codecov](https://codecov.io/gh/jjjermiah/nbia-toolkit/graph/badge.svg?token=JKREY71D0R)](https://codecov.io/gh/jjjermiah/nbia-toolkit) @@ -14,7 +15,7 @@ ![GitHub milestone details](https://img.shields.io/github/milestones/progress-percent/jjjermiah/nbia-toolkit/1?style=flat-square&label=1.0.0%20Stable%20Release%20Milestone&link=https%3A%2F%2Fgithub.com%2Fjjjermiah%2Fnbia-toolkit%2Fmilestone%2F1)![GitHub milestone details](https://img.shields.io/github/milestones/progress/jjjermiah/nbia-toolkit/1?style=flat-square&label=%20&link=https%3A%2F%2Fgithub.com%2Fjjjermiah%2Fnbia-toolkit%2Fmilestone%2F1) -#### A python package that provides programmatic access to query and download images from the National Biomedical Imaging Archive (**NBIA**) and The Cancer Imaging Archive (**TCIA**) databases. + ## Features > [!TIP] diff --git a/docs/Example.ipynb b/docs/Example.ipynb deleted file mode 100644 index b7fb690..0000000 --- a/docs/Example.ipynb +++ /dev/null @@ -1,326 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "%%capture\n", - "!pip install nbiatoolkit" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [], - "source": [ - "from nbiatoolkit import NBIAClient\n", - "from pprint import pprint" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [], - "source": [ - "client = NBIAClient()" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['TCGA-BLCA', 'TCGA-BRCA', 'TCGA-CESC', 'TCGA-COAD', 'TCGA-ESCA', 'TCGA-KICH', 'TCGA-KIRC', 'TCGA-KIRP', 'TCGA-LIHC', 'TCGA-LUAD', 'TCGA-LUSC', 'TCGA-OV', 'TCGA-PRAD', 'TCGA-READ', 'TCGA-SARC', 'TCGA-STAD', 'TCGA-THCA', 'TCGA-UCEC']\n" - ] - } - ], - "source": [ - "collections = client.getCollections(prefix = \"TCGA\")\n", - "print(collections)" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Total Number of Series: 1688\n", - "{'SeriesInstanceUID': '1.3.6.1.4.1.14519.5.2.1.3344.4008.114273558613268508155402014536', 'StudyInstanceUID': '1.3.6.1.4.1.14519.5.2.1.3344.4008.130981350480025856864319518013', 'Modality': 'MR', 'SeriesDate': '1996-06-12 00:00:00.0', 'SeriesDescription': 'Ax Flair', 'BodyPartExamined': 'LIVER', 'SeriesNumber': 3, 'Collection': 'TCGA-LIHC', 'PatientID': 'TCGA-DD-A3A0', 'Manufacturer': 'GE MEDICAL SYSTEMS', 'ManufacturerModelName': 'GENESIS_SIGNA', 'SoftwareVersions': '09', 'ImageCount': 30, 'TimeStamp': '2013-10-07 22:54:58.0', 'LicenseName': 'Creative Commons Attribution 3.0 Unported License', 'LicenseURI': 'http://creativecommons.org/licenses/by/3.0/', 'CollectionURI': 'https://doi.org/10.7937/K9/TCIA.2016.IMMQW8UQ', 'FileSize': 4117194}\n" - ] - } - ], - "source": [ - "# Liver hepatocellular carcinoma\n", - "seriesList = client.getSeries(Collection='TCGA-LIHC')\n", - "\n", - "print(\"Total Number of Series: \" + str(len(seriesList)))\n", - "pprint(seriesList[0])" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Total Number of CT-only Series: 777\n", - "{'BodyPartExamined': 'LIVER',\n", - " 'Collection': 'TCGA-LIHC',\n", - " 'CollectionURI': 'https://doi.org/10.7937/K9/TCIA.2016.IMMQW8UQ',\n", - " 'FileSize': 48626832,\n", - " 'ImageCount': 92,\n", - " 'LicenseName': 'Creative Commons Attribution 3.0 Unported License',\n", - " 'LicenseURI': 'http://creativecommons.org/licenses/by/3.0/',\n", - " 'Manufacturer': 'GE MEDICAL SYSTEMS',\n", - " 'ManufacturerModelName': 'LightSpeed QX/i',\n", - " 'Modality': 'CT',\n", - " 'PatientID': 'TCGA-DD-A3A9',\n", - " 'ProtocolName': '6.3 BI-PHASE LIVER ()',\n", - " 'SeriesDate': '1995-06-25 00:00:00.0',\n", - " 'SeriesDescription': 'AXIAL',\n", - " 'SeriesInstanceUID': '1.3.6.1.4.1.14519.5.2.1.3344.4008.164450824675944451114070841306',\n", - " 'SeriesNumber': 3,\n", - " 'SoftwareVersions': 'LightSpeedApps10.5_2.8.2I_H1.3M4',\n", - " 'StudyInstanceUID': '1.3.6.1.4.1.14519.5.2.1.3344.4008.260454144139081692373465010706',\n", - " 'TimeStamp': '2013-10-07 22:53:09.0'}\n" - ] - } - ], - "source": [ - "seriesList = client.getSeries(Collection='TCGA-LIHC', Modality='CT')\n", - "print(\"Total Number of CT-only Series: \" + str(len(seriesList)))\n", - "pprint(seriesList[0])" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Downloading to: /Users/bhklab/Documents/GitHub/NBIA-toolkit/docs/data\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Downloading 100 series: 0%| | 0/100 [00:00 [!WARNING] +> `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 + +It is made available via PyPI and can be installed using pip: +```bash +pip install nbiatoolkit +``` + +***NOTE: It is recommended that you install the package in a conda or virtual environment.*** +## Conda + +Though the package is not available on conda, you can create a conda environment and install the package using pip: + +``` bash +conda create -n nbia python=3.12 +conda activate nbia +pip install nbiatoolkit +``` + +## Virtual Environment +If you do not have a virtual environment set up, you can create one using the following command: + +```bash +python -m venv /path/to/new/virtual/environment +``` + +Then activate the virtual environment and install the package using the commands: + +```bash +source /path/to/new/virtual/environment/bin/activate +pip install nbiatoolkit +``` + + diff --git a/docs/wiki/NBIA.md b/docs/markdowns/NBIA.md similarity index 100% rename from docs/wiki/NBIA.md rename to docs/markdowns/NBIA.md diff --git a/pyproject.toml b/pyproject.toml index aad47e6..32aee5f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ version_toml = [ "pyproject.toml:tool.poetry.version", ] branch = "main" -changelog_file = "CHANGELOG.md" +changelog_file = "docs/wiki/CHANGELOG.md" dist_path = "dist/" upload_to_release = true upload_to_pypi = false