From 085465eb07bc361444e361ebd36810eb45de1983 Mon Sep 17 00:00:00 2001 From: Kapil Kumar Date: Mon, 10 Mar 2025 16:21:12 +0530 Subject: [PATCH 1/4] added polly kg notebook --- .DS_Store | Bin 0 -> 6148 bytes PollyKG/.DS_Store | Bin 0 -> 6148 bytes PollyKG/polly kg functions.ipynb | 1236 ++++++++++++++++++++++++++++++ 3 files changed, 1236 insertions(+) create mode 100644 .DS_Store create mode 100644 PollyKG/.DS_Store create mode 100644 PollyKG/polly kg functions.ipynb diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..6b28fa6d16be9300b76a15dd49b2b9a84f66fdcc GIT binary patch literal 6148 zcmeHKPmj_-9Q_T8OOb5kpvH?y6R)_UZdQ#KU?FB>Ow3~Rpa$EefyUAyZCSD*Bpfw< z2fuV?;93;l#Wn{ky?&q`- z1=F$z6l#ofN+~#wq>{7*UlE_HA< ziMpO)j{ALsdkpRXqo$Ota|?qUcaNT#>j>aagzJx?lbB1ou2epKUh(M)jlpBhIrXRy z)d+PidF*pe&3>(_OZ5Cg{gj@pvz1$aVEfZ_>_^Jmul_g+)2v?qCJH;nOS>hfNx?jO$QW#`(hJC9F#@1s#HKVY^9fn7rd--WC3 z5tW<+XWb-@WX$WssxqBm#hcW|`gCX?-u81I@g1`2QAOQNL$wYb-G*X-lv{tn_sXgY z)vXQVzEj!S8QO_i2do2s>j1wWTqMSZ!G%Wk>OiKB0Kg)eRiMlt4XkkuHViH_q6Z%h7LJGxrs{lD}3 z^Z&ZY)~o~8fvs{t6x-c)3sW+C>&E1GuXT~$A#pHop;1YYneA8=cq_hvqyl{|7k~|e T3yo+&*bf0^gUzf1|I~q>MS$Xj literal 0 HcmV?d00001 diff --git a/PollyKG/.DS_Store b/PollyKG/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..a94b92212e129963436a294b23f5275e3ddd54d0 GIT binary patch literal 6148 zcmeHKyH3ME5S)V)k!Vt;ye~jXL2sf^ASjUd0KkL-DPRPopmWC;@qIA+03|YMDbTF6 zJ9q1yyLbw37C@P=mos1jU`#i}yM>|IbMt}iWu_46JmVE>yxxa^1R#!>cH`P-31YPbu}SO$nW2@S5`$WD#3(^$ zzGhvM*arq3#c$?0d2`7LrTFd4S1(6t0u`lz6xdc^KeiL=|0nbv^ZzzUJ1HOq{*?k{ zw76W%`AXSa2QO#6w$iWZ-^N-mXYf``^j6G`wc_bUU9~lzH;H|q)0uZVQGWzX7nv0J H3kALa_U=0.15.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0-kg) (0.16.0)\n", + "Requirement already satisfied: retrying==1.3.4 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0-kg) (1.3.4)\n", + "Requirement already satisfied: botocore<2.0,>=1.27.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0-kg) (1.31.40)\n", + "Requirement already satisfied: pytest>=6.2.5 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0-kg) (7.4.3)\n", + "Requirement already satisfied: cryptography<=38.0.0,>=37.0.1 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0-kg) (38.0.0)\n", + "Requirement already satisfied: python-jose==3.3.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0-kg) (3.3.0)\n", + "Requirement already satisfied: joblib>=1.2.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0-kg) (1.3.2)\n", + "Requirement already satisfied: boto3<2.0,>=1.24.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0-kg) (1.28.40)\n", + "Requirement already satisfied: tqdm==4.65.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0-kg) (4.65.0)\n", + "Collecting tabulate==0.9.0\n", + " Downloading tabulate-0.9.0-py3-none-any.whl (35 kB)\n", + "Requirement already satisfied: pydantic==1.10.12 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0-kg) (1.10.12)\n", + "Requirement already satisfied: plotly>=5.0.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0-kg) (5.18.0)\n", + "Requirement already satisfied: pandas<=2.2.2,>=1.3.5 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0-kg) (1.5.3)\n", + "Requirement already satisfied: Deprecated>=1.2.12 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0-kg) (1.2.14)\n", + "Requirement already satisfied: numpy<=1.26.4 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0-kg) (1.25.2)\n", + "Requirement already satisfied: urllib3 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from mixpanel==4.10.0->polly-python==3.1.0-kg) (1.26.16)\n", + "Requirement already satisfied: six>=1.9.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from mixpanel==4.10.0->polly-python==3.1.0-kg) (1.16.0)\n", + "Requirement already satisfied: typing-extensions>=4.2.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pydantic==1.10.12->polly-python==3.1.0-kg) (4.7.1)\n", + "Requirement already satisfied: rsa in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from python-jose==3.3.0->polly-python==3.1.0-kg) (4.7.2)\n", + "Requirement already satisfied: ecdsa!=0.15 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from python-jose==3.3.0->polly-python==3.1.0-kg) (0.18.0)\n", + "Requirement already satisfied: pyasn1 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from python-jose==3.3.0->polly-python==3.1.0-kg) (0.5.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from requests==2.28.1->polly-python==3.1.0-kg) (2023.7.22)\n", + "Collecting charset-normalizer<3,>=2\n", + " Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB)\n", + "Requirement already satisfied: idna<4,>=2.5 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from requests==2.28.1->polly-python==3.1.0-kg) (2.10)\n", + "Requirement already satisfied: pygments in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from rst2txt==1.1.0->polly-python==3.1.0-kg) (2.16.1)\n", + "Requirement already satisfied: docutils>=0.11 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from rst2txt==1.1.0->polly-python==3.1.0-kg) (0.16)\n", + "Requirement already satisfied: s3transfer<0.7.0,>=0.6.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from boto3<2.0,>=1.24.0->polly-python==3.1.0-kg) (0.6.2)\n", + "Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from boto3<2.0,>=1.24.0->polly-python==3.1.0-kg) (1.0.1)\n", + "Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from botocore<2.0,>=1.27.0->polly-python==3.1.0-kg) (2.8.2)\n", + "Requirement already satisfied: h5py>=2.6.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from cmapPy<=4.0.1->polly-python==3.1.0-kg) (3.10.0)\n", + "Requirement already satisfied: cffi>=1.12 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from cryptography<=38.0.0,>=37.0.1->polly-python==3.1.0-kg) (1.15.1)\n", + "Requirement already satisfied: wrapt<2,>=1.10 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from Deprecated>=1.2.12->polly-python==3.1.0-kg) (1.16.0)\n", + "Requirement already satisfied: pytz>=2020.1 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pandas<=2.2.2,>=1.3.5->polly-python==3.1.0-kg) (2023.3)\n", + "Requirement already satisfied: packaging in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from plotly>=5.0.0->polly-python==3.1.0-kg) (23.1)\n", + "Requirement already satisfied: tenacity>=6.2.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from plotly>=5.0.0->polly-python==3.1.0-kg) (8.2.3)\n", + "Requirement already satisfied: exceptiongroup>=1.0.0rc8 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pytest>=6.2.5->polly-python==3.1.0-kg) (1.1.3)\n", + "Requirement already satisfied: tomli>=1.0.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pytest>=6.2.5->polly-python==3.1.0-kg) (2.0.1)\n", + "Requirement already satisfied: iniconfig in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pytest>=6.2.5->polly-python==3.1.0-kg) (2.0.0)\n", + "Requirement already satisfied: pluggy<2.0,>=0.12 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pytest>=6.2.5->polly-python==3.1.0-kg) (1.3.0)\n", + "Requirement already satisfied: pycparser in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from cffi>=1.12->cryptography<=38.0.0,>=37.0.1->polly-python==3.1.0-kg) (2.21)\n", + "Installing collected packages: tabulate, charset-normalizer, requests, cmapPy, polly-python\n", + " Attempting uninstall: tabulate\n", + " Found existing installation: tabulate 0.8.10\n", + " Uninstalling tabulate-0.8.10:\n", + " Successfully uninstalled tabulate-0.8.10\n", + " Attempting uninstall: charset-normalizer\n", + " Found existing installation: charset-normalizer 3.2.0\n", + " Uninstalling charset-normalizer-3.2.0:\n", + " Successfully uninstalled charset-normalizer-3.2.0\n", + " Attempting uninstall: requests\n", + " Found existing installation: requests 2.31.0\n", + " Uninstalling requests-2.31.0:\n", + " Successfully uninstalled requests-2.31.0\n", + " Attempting uninstall: polly-python\n", + " Found existing installation: polly-python 1.0.0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Uninstalling polly-python-1.0.0:\n", + " Successfully uninstalled polly-python-1.0.0\n", + "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", + "polly-validator 0.0.2 requires requests==2.25.1, but you have requests 2.28.1 which is incompatible.\n", + "polly-validator 0.0.2 requires tabulate==0.8.10, but you have tabulate 0.9.0 which is incompatible.\u001b[0m\u001b[31m\n", + "\u001b[0mSuccessfully installed charset-normalizer-2.1.1 cmapPy-4.0.1 polly-python-3.1.0 requests-2.28.1 tabulate-0.9.0\n", + "Note: you may need to restart the kernel to use updated packages.\n" + ] + } + ], + "source": [ + "pip install polly-python==3.1.0" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "c6ff0d02", + "metadata": { + "kernel": "Python3" + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Matplotlib is building the font cache; this may take a moment.\n" + ] + } + ], + "source": [ + "#Imports\n", + "\n", + "from polly.auth import Polly\n", + "from polly.polly_kg import PollyKG\n", + "\n", + "import pandas as pd\n", + "import numpy as np\n", + "import sys\n", + "import io\n", + "\n", + "import networkx as nx\n", + "import matplotlib.pyplot as plt" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0703b224", + "metadata": { + "kernel": "Python3" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "You're currently using an outdated version of polly-python '1.0.0'. Please update using the command 'pip install polly-python==3.1.0' to upgrade to the newest version '3.1.0'\n" + ] + } + ], + "source": [ + "#Authentication\n", + "\n", + "AUTH_KEY = \"auth_key\"\n", + "Polly.auth(AUTH_KEY)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "756d28bc", + "metadata": { + "kernel": "Python3" + }, + "outputs": [], + "source": [ + "#Connect to PollyKG\n", + "\n", + "kg = PollyKG()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f96875ae", + "metadata": { + "kernel": "Python3" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'status': 'healthy', 'gremlin': {'version': 'tinkerpop-3.7.1'}, 'opencypher': {'version': 'Neptune-9.0.20190305-1.0'}}\n" + ] + }, + { + "data": { + "text/plain": [ + "{'status': 'healthy',\n", + " 'gremlin': {'version': 'tinkerpop-3.7.1'},\n", + " 'opencypher': {'version': 'Neptune-9.0.20190305-1.0'}}" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Get engine status\n", + "kg.get_engine_status()" + ] + }, + { + "cell_type": "markdown", + "id": "025a92f9", + "metadata": { + "kernel": "Python3" + }, + "source": [ + "### PollyKG Summary" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "a630bbe8", + "metadata": { + "kernel": "Python3" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'numNodes': 426515, 'numEdges': 9750778, 'numNodeLabels': 7, 'numEdgeLabels': 27, 'nodeLabels': ['Drug', 'Phenotype', 'Gene', 'Disease', 'Pathway', 'Go', 'Protein'], 'edgeLabels': ['is_a_phenotype', 'disease_has_feature_disease', 'predisposes_towards_disease', 'has_characteristic_disease', 'has_part_go', 'targets', 'linked_to_pathway', 'happens_during_go', 'excluded_subClassOf_disease', 'part_of_go', 'mim2gene_medgen_disease', 'ends_during_go', 'is_a_pathway', 'linked_to', 'positively_regulates_go', 'part_of_progression_of_disease_disease', 'regulates_go', 'disease_arises_from_feature_disease', 'occurs_in_go', 'is_a_go', 'negatively_regulates_go', 'disease_has_major_feature_disease', 'intersection_of_disease', 'curated_content_resource_disease', 'disease_shares_features_of_disease', 'is_a_disease', 'interacts_with'], 'numNodeProperties': 48, 'numEdgeProperties': 28, 'nodeProperties': [{'description': 219818}, {'LocusTag': 193500}, {'Symbol': 193500}, {'Synonyms': 193500}, {'tax_id': 193500}, {'chromosome': 193496}, {'map_location': 193496}, {'Nomenclature_status': 193487}, {'Symbol_from_nomenclature_authority': 193487}, {'type_of_gene': 193487}, {'Feature_type': 193482}, {'Modification_date': 193482}, {'dbXrefs': 189808}, {'gene_id': 109248}, {'gene_name': 109248}, {'gene_stable_id': 109248}, {'transcript_stable_id': 109248}, {'name': 101149}, {'def': 64448}, {'synonym': 63709}, {'component_type': 47995}, {'EnsemblGeneID': 38395}, {'creation_date': 24034}, {'species': 22608}, {'property_value': 22426}, {'xref': 20076}, {'created_by': 19035}, {'relationship': 16329}, {'comment': 14216}, {'intersection_of': 10212}, {'is_obsolete': 8180}, {'alt_id': 4471}, {'category': 3714}, {'count': 3714}, {'critval': 3714}, {'event': 3714}, {'llr': 3714}, {'meddraCode': 3702}, {'subset': 3146}, {'replaced_by': 1699}, {'consider': 80}, {'disjoint_from': 23}, {'holds_over_chain': 12}, {'inverse_of': 1}, {'is_class_level': 1}, {'is_metadata_tag': 1}, {'is_transitive': 1}, {'transitive_over': 1}], 'edgeProperties': [{'count': 7230614}, {'intA': 7230614}, {'intABiologicalRole': 7230614}, {'intB': 7230614}, {'intBBiologicalRole': 7230614}, {'sourceDatabase': 7230614}, {'scoring': 7200058}, {'score': 2028557}, {'datatypeId': 1931724}, {'evidenceCount': 1931724}, {'literature': 1931724}, {'dbXRefs': 1759376}, {'aspect': 292852}, {'evidence': 292852}, {'geneProduct': 292852}, {'source_extract': 292852}, {'ascore': 96833}, {'dscore': 96833}, {'escore': 96833}, {'fscore': 96833}, {'ncbiTaxonId': 96833}, {'nscore': 96833}, {'preferredName_A': 96833}, {'preferredName_B': 96833}, {'pscore': 96833}, {'tscore': 96833}, {'pathway': 46818}, {'topLevelTerm': 46818}], 'totalNodePropertyValues': 3479555, 'totalEdgePropertyValues': 62400221}\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
numNodesnumEdgesnumNodeLabelsnumEdgeLabelsnodeLabelsedgeLabelsnumNodePropertiesnumEdgePropertiesnodePropertiesedgePropertiestotalNodePropertyValuestotalEdgePropertyValues
04265159750778727[Drug, Phenotype, Gene, Disease, Pathway, Go, ...[is_a_phenotype, disease_has_feature_disease, ...4828[{'description': 219818}, {'LocusTag': 193500}...[{'count': 7230614}, {'intA': 7230614}, {'intA...347955562400221
\n", + "
" + ], + "text/plain": [ + " numNodes numEdges numNodeLabels numEdgeLabels \\\n", + "0 426515 9750778 7 27 \n", + "\n", + " nodeLabels \\\n", + "0 [Drug, Phenotype, Gene, Disease, Pathway, Go, ... \n", + "\n", + " edgeLabels numNodeProperties \\\n", + "0 [is_a_phenotype, disease_has_feature_disease, ... 48 \n", + "\n", + " numEdgeProperties nodeProperties \\\n", + "0 28 [{'description': 219818}, {'LocusTag': 193500}... \n", + "\n", + " edgeProperties totalNodePropertyValues \\\n", + "0 [{'count': 7230614}, {'intA': 7230614}, {'intA... 3479555 \n", + "\n", + " totalEdgePropertyValues \n", + "0 62400221 " + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#Get graph summary\n", + "\n", + "res1 = kg.get_graph_summary()#get graph summary\n", + "res1 = pd.json_normalize(res1)\n", + "res1" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "41885b3f", + "metadata": { + "kernel": "Python3" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
nodeLabels
0Drug
0Phenotype
0Gene
0Disease
0Pathway
0Go
0Protein
\n", + "
" + ], + "text/plain": [ + " nodeLabels\n", + "0 Drug\n", + "0 Phenotype\n", + "0 Gene\n", + "0 Disease\n", + "0 Pathway\n", + "0 Go\n", + "0 Protein" + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#Node types\n", + "\n", + "res1[['nodeLabels']].explode('nodeLabels')" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "17e60f61", + "metadata": { + "kernel": "Python3" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
edgeLabels
0is_a_phenotype
0disease_has_feature_disease
0predisposes_towards_disease
0has_characteristic_disease
0has_part_go
0targets
0linked_to_pathway
0happens_during_go
0excluded_subClassOf_disease
0part_of_go
0mim2gene_medgen_disease
0ends_during_go
0is_a_pathway
0linked_to
0positively_regulates_go
0part_of_progression_of_disease_disease
0regulates_go
0disease_arises_from_feature_disease
0occurs_in_go
0is_a_go
0negatively_regulates_go
0disease_has_major_feature_disease
0intersection_of_disease
0curated_content_resource_disease
0disease_shares_features_of_disease
0is_a_disease
0interacts_with
\n", + "
" + ], + "text/plain": [ + " edgeLabels\n", + "0 is_a_phenotype\n", + "0 disease_has_feature_disease\n", + "0 predisposes_towards_disease\n", + "0 has_characteristic_disease\n", + "0 has_part_go\n", + "0 targets\n", + "0 linked_to_pathway\n", + "0 happens_during_go\n", + "0 excluded_subClassOf_disease\n", + "0 part_of_go\n", + "0 mim2gene_medgen_disease\n", + "0 ends_during_go\n", + "0 is_a_pathway\n", + "0 linked_to\n", + "0 positively_regulates_go\n", + "0 part_of_progression_of_disease_disease\n", + "0 regulates_go\n", + "0 disease_arises_from_feature_disease\n", + "0 occurs_in_go\n", + "0 is_a_go\n", + "0 negatively_regulates_go\n", + "0 disease_has_major_feature_disease\n", + "0 intersection_of_disease\n", + "0 curated_content_resource_disease\n", + "0 disease_shares_features_of_disease\n", + "0 is_a_disease\n", + "0 interacts_with" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#Edge Types\n", + "\n", + "res1[['edgeLabels']].explode('edgeLabels')" + ] + }, + { + "cell_type": "markdown", + "id": "05ae144a", + "metadata": { + "kernel": "Python3" + }, + "source": [ + "### Querying PollyKG" + ] + }, + { + "cell_type": "markdown", + "id": "9ee1d14d", + "metadata": { + "kernel": "Python3" + }, + "source": [ + "##### Two Query Languages Available\n", + "- Gremlin Query Language\n", + "- openCypher Query Language" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2f05b89c", + "metadata": { + "kernel": "Python3" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
NodeTypeNodeCount
0[Gene]193500
1[Protein]109248
2[Go]47995
3[Disease]29967
4[Pathway]22608
5[Phenotype]19483
6[Drug]3714
\n", + "
" + ], + "text/plain": [ + " NodeType NodeCount\n", + "0 [Gene] 193500\n", + "1 [Protein] 109248\n", + "2 [Go] 47995\n", + "3 [Disease] 29967\n", + "4 [Pathway] 22608\n", + "5 [Phenotype] 19483\n", + "6 [Drug] 3714" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#Find all Node Types - openCypher\n", + "\n", + "res2 = kg.run_opencypher_query(\"\"\"MATCH (n)\n", + " RETURN labels(n) AS NodeType, count(n) AS NodeCount\n", + " ORDER BY NodeCount DESC;\"\"\")\n", + "pd.json_normalize(res2)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "27148de8", + "metadata": { + "kernel": "Python3" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
NodeTypeNodeCount
0Gene193500
1Protein109248
2Go47995
3Disease29967
4Pathway22608
5Phenotype19483
6Drug3714
\n", + "
" + ], + "text/plain": [ + " NodeType NodeCount\n", + "0 Gene 193500\n", + "1 Protein 109248\n", + "2 Go 47995\n", + "3 Disease 29967\n", + "4 Pathway 22608\n", + "5 Phenotype 19483\n", + "6 Drug 3714" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#Find all Node Types - Gremlin\n", + "\n", + "res2 = kg.run_gremlin_query(\"g.V().groupCount().by(label).order(local).by(values, desc)\")\n", + "\n", + "node = []\n", + "count = []\n", + "for i in range(0,len(res2['data']['@value'][0]['@value'])):\n", + " if (i+1)%2 == 0:\n", + " count.append(res2['data']['@value'][0]['@value'][i]['@value'])\n", + " else:\n", + " node.append(res2['data']['@value'][0]['@value'][i])\n", + "res2 = pd.DataFrame({'NodeType':node,'NodeCount':count})\n", + "res2" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "0675a1f9", + "metadata": { + "kernel": "Python3" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
EdgeTypeEdgeCount
0interacts_with7327447
1targets1931724
2linked_to292852
3encodes105924
4has_phenotype102425
5linked_to_pathway46818
6is_a_go40264
7is_a_disease39098
8has_indication36066
9is_a_pathway22746
10is_a_phenotype19032
11intersection_of_disease8309
12part_of_go6737
13excluded_subClassOf_disease3366
14regulates_go3132
15positively_regulates_go2816
16negatively_regulates_go2810
17curated_content_resource_disease1297
18has_characteristic_disease644
19has_part_go636
20predisposes_towards_disease374
21disease_has_feature_disease259
22occurs_in_go184
23disease_arises_from_feature_disease90
24disease_has_major_feature_disease54
25disease_shares_features_of_disease46
26mim2gene_medgen_disease27
27happens_during_go13
28part_of_progression_of_disease_disease2
29ends_during_go1
\n", + "
" + ], + "text/plain": [ + " EdgeType EdgeCount\n", + "0 interacts_with 7327447\n", + "1 targets 1931724\n", + "2 linked_to 292852\n", + "3 encodes 105924\n", + "4 has_phenotype 102425\n", + "5 linked_to_pathway 46818\n", + "6 is_a_go 40264\n", + "7 is_a_disease 39098\n", + "8 has_indication 36066\n", + "9 is_a_pathway 22746\n", + "10 is_a_phenotype 19032\n", + "11 intersection_of_disease 8309\n", + "12 part_of_go 6737\n", + "13 excluded_subClassOf_disease 3366\n", + "14 regulates_go 3132\n", + "15 positively_regulates_go 2816\n", + "16 negatively_regulates_go 2810\n", + "17 curated_content_resource_disease 1297\n", + "18 has_characteristic_disease 644\n", + "19 has_part_go 636\n", + "20 predisposes_towards_disease 374\n", + "21 disease_has_feature_disease 259\n", + "22 occurs_in_go 184\n", + "23 disease_arises_from_feature_disease 90\n", + "24 disease_has_major_feature_disease 54\n", + "25 disease_shares_features_of_disease 46\n", + "26 mim2gene_medgen_disease 27\n", + "27 happens_during_go 13\n", + "28 part_of_progression_of_disease_disease 2\n", + "29 ends_during_go 1" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#Find all Edge Types - Gremlin\n", + "\n", + "res3 = kg.run_gremlin_query(\"\"\"g.E().groupCount().by(label).order(local).by(values, desc)\"\"\")\n", + "\n", + "edge = []\n", + "count = []\n", + "for i in range(0,len(res3['data']['@value'][0]['@value'])):\n", + " if (i+1)%2 == 0:\n", + " count.append(res3['data']['@value'][0]['@value'][i]['@value'])\n", + " else:\n", + " edge.append(res3['data']['@value'][0]['@value'][i])\n", + "\n", + "res3 = pd.DataFrame({'EdgeType':edge,'EdgeCount':count})\n", + "res3 " + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "ea30d120", + "metadata": { + "kernel": "Python3" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "{'data': {'@type': 'g:List',\n", + " '@value': [{'@type': 'g:Map',\n", + " '@value': ['To_Node_Type', 'Gene', 'From_Node_Type', 'Gene']}]},\n", + " 'meta': {'@type': 'g:Map', '@value': []}}" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#Find the Node Types that an Edge Connects - Gremlin\n", + "\n", + "res4 = kg.run_gremlin_query(\"\"\"g.E().hasLabel('interacts_with')\n", + " .limit(10000)\n", + " .project('From_Node_Type', 'To_Node_Type')\n", + " .by(outV().label()) \n", + " .by(inV().label()) \n", + " .dedup()\"\"\")\n", + "res4" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "id": "5560076a", + "metadata": { + "kernel": "Python3" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "{'data': {'@type': 'g:List',\n", + " '@value': ['EnsemblGeneID',\n", + " 'Symbol',\n", + " 'LocusTag',\n", + " 'Synonyms',\n", + " 'dbXrefs',\n", + " 'chromosome',\n", + " 'map_location',\n", + " 'description',\n", + " 'type_of_gene',\n", + " 'Symbol_from_nomenclature_authority',\n", + " 'Nomenclature_status',\n", + " 'Modification_date',\n", + " 'Feature_type',\n", + " 'tax_id']},\n", + " 'meta': {'@type': 'g:Map', '@value': []}}" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#Properties of a Node - Gremlin\n", + "\n", + "res5 = kg.run_gremlin_query(\"g.V().hasLabel('Gene').properties().key().dedup()\")\n", + "res5" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2990e6aa", + "metadata": { + "kernel": "Python3" + }, + "outputs": [ + { + "data": { + "text/plain": [ + "[{'properties': ['Symbol',\n", + " 'tax_id',\n", + " 'dbXrefs',\n", + " 'LocusTag',\n", + " 'Synonyms',\n", + " 'chromosome',\n", + " 'description',\n", + " 'Feature_type',\n", + " 'map_location',\n", + " 'type_of_gene',\n", + " 'EnsemblGeneID',\n", + " 'Modification_date',\n", + " 'Nomenclature_status',\n", + " 'Symbol_from_nomenclature_authority']}]" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#Properties of a Node - openCypher\n", + "\n", + "res5 = kg.run_opencypher_query(\"\"\"MATCH (n:Gene)\n", + " RETURN keys(n) AS properties\n", + " LIMIT 1;\"\"\")\n", + "res5" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "SoS", + "language": "sos", + "name": "sos" + }, + "language_info": { + "codemirror_mode": "sos", + "file_extension": ".sos", + "mimetype": "text/x-sos", + "name": "sos", + "nbconvert_exporter": "sos_notebook.converter.SoS_Exporter", + "pygments_lexer": "sos" + }, + "sos": { + "kernels": [ + [ + "Python3", + "python3", + "python3", + "", + "" + ] + ], + "panel": { + "displayed": false, + "height": 0 + }, + "version": "0.24.2" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From a3d24fadf5088f05c180115218ca2b10e062a2d1 Mon Sep 17 00:00:00 2001 From: Kapil Kumar Date: Thu, 20 Mar 2025 14:52:34 +0530 Subject: [PATCH 2/4] added workspaces --- .DS_Store | Bin 6148 -> 8196 bytes PollyKG/.DS_Store | Bin 6148 -> 6148 bytes ...unctions.ipynb => querying polly kg.ipynb} | 2 +- ...ing with workspaces via polly python.ipynb | 549 ++++++++++++++++++ 4 files changed, 550 insertions(+), 1 deletion(-) rename PollyKG/{polly kg functions.ipynb => querying polly kg.ipynb} (99%) create mode 100644 workspaces/working with workspaces via polly python.ipynb diff --git a/.DS_Store b/.DS_Store index 6b28fa6d16be9300b76a15dd49b2b9a84f66fdcc..318971837ec45e081de07968ccbfd95074a34238 100644 GIT binary patch delta 321 zcmZoMXmOBWU|?W$DortDU;r^WfEYvza8E20o2aMAD6lbLH}hr%jz7$c**Q2SHn1=X zZ02E+XAb3JC}+rLC}PNFC}t>NNMuN6NM$JY%*jtq%E?axnZUrnln$il{Raaei-7^F zo}}{P0;rxHli#ow)=N}Z8ycACD43X<)aocyTN)Vv*~VtIwVWKH%KFwp@!2`KdHG#n z6B!s8Av6Ool!j5=Kn7O(%7TmXa`N*)ZUgECIulGQKxqet%>_L3n7Jglfda0efY>a^ b@tt`xzli5#e;y7FpcYUVF>H?KnZpbK)Qvzm delta 103 zcmZp1XfcprU|?W$DortDU=RQ@Ie-{Mvv5r;6q~50$jG}fU^g=(?`9qWdFF{_cNVjA pa0oI36##(%H;`}zsohxkoq009j3-DZ0~5p)kiiU_<9X&V0{~@95D5SP diff --git a/PollyKG/.DS_Store b/PollyKG/.DS_Store index a94b92212e129963436a294b23f5275e3ddd54d0..a686bd3fefd08b86713fd19b031e6920d4dc979a 100644 GIT binary patch delta 67 zcmZoMXfc=&$z92yz>v+54kXhiK2+CaWME*BU?^b7XUG9UBuR!+hCGI3h7yKMpj;k9 J@y0Cy;sE=e4-fzV delta 67 zcmZoMXfc=&$z8%w%23P@&yd29I`N^pCL;p_g9JkXLn1>F5F<%4=1.24.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.28.40)\n", + "Requirement already satisfied: cryptography<=38.0.0,>=37.0.1 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (38.0.0)\n", + "Requirement already satisfied: python-jose==3.3.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (3.3.0)\n", + "Requirement already satisfied: pydantic==1.10.12 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.10.12)\n", + "Requirement already satisfied: numpy<=1.26.4 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.25.2)\n", + "Requirement already satisfied: mixpanel==4.10.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (4.10.0)\n", + "Requirement already satisfied: plotly>=5.0.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (5.18.0)\n", + "Requirement already satisfied: retrying==1.3.4 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.3.4)\n", + "Requirement already satisfied: botocore<2.0,>=1.27.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.31.40)\n", + "Requirement already satisfied: pytest>=6.2.5 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (7.4.3)\n", + "Collecting tabulate==0.9.0\n", + " Downloading tabulate-0.9.0-py3-none-any.whl (35 kB)\n", + "Requirement already satisfied: Deprecated>=1.2.12 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.2.14)\n", + "Requirement already satisfied: joblib>=1.2.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.3.2)\n", + "Collecting cmapPy<=4.0.1\n", + " Downloading cmapPy-4.0.1-py2.py3-none-any.whl (150 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m150.2/150.2 kB\u001b[0m \u001b[31m7.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: rst2txt==1.1.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.1.0)\n", + "Requirement already satisfied: cloudpathlib>=0.15.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (0.16.0)\n", + "Requirement already satisfied: pandas<=2.2.2,>=1.3.5 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.5.3)\n", + "Requirement already satisfied: six>=1.9.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from mixpanel==4.10.0->polly-python==3.1.0) (1.16.0)\n", + "Requirement already satisfied: urllib3 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from mixpanel==4.10.0->polly-python==3.1.0) (1.26.16)\n", + "Requirement already satisfied: typing-extensions>=4.2.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pydantic==1.10.12->polly-python==3.1.0) (4.7.1)\n", + "Requirement already satisfied: pyasn1 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from python-jose==3.3.0->polly-python==3.1.0) (0.5.0)\n", + "Requirement already satisfied: rsa in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from python-jose==3.3.0->polly-python==3.1.0) (4.7.2)\n", + "Requirement already satisfied: ecdsa!=0.15 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from python-jose==3.3.0->polly-python==3.1.0) (0.18.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from requests==2.28.1->polly-python==3.1.0) (2023.7.22)\n", + "Collecting charset-normalizer<3,>=2\n", + " Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB)\n", + "Requirement already satisfied: idna<4,>=2.5 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from requests==2.28.1->polly-python==3.1.0) (2.10)\n", + "Requirement already satisfied: docutils>=0.11 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from rst2txt==1.1.0->polly-python==3.1.0) (0.16)\n", + "Requirement already satisfied: pygments in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from rst2txt==1.1.0->polly-python==3.1.0) (2.16.1)\n", + "Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from boto3<2.0,>=1.24.0->polly-python==3.1.0) (1.0.1)\n", + "Requirement already satisfied: s3transfer<0.7.0,>=0.6.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from boto3<2.0,>=1.24.0->polly-python==3.1.0) (0.6.2)\n", + "Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from botocore<2.0,>=1.27.0->polly-python==3.1.0) (2.8.2)\n", + "Requirement already satisfied: h5py>=2.6.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from cmapPy<=4.0.1->polly-python==3.1.0) (3.10.0)\n", + "Requirement already satisfied: cffi>=1.12 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from cryptography<=38.0.0,>=37.0.1->polly-python==3.1.0) (1.15.1)\n", + "Requirement already satisfied: wrapt<2,>=1.10 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from Deprecated>=1.2.12->polly-python==3.1.0) (1.16.0)\n", + "Requirement already satisfied: pytz>=2020.1 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pandas<=2.2.2,>=1.3.5->polly-python==3.1.0) (2023.3)\n", + "Requirement already satisfied: tenacity>=6.2.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from plotly>=5.0.0->polly-python==3.1.0) (8.2.3)\n", + "Requirement already satisfied: packaging in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from plotly>=5.0.0->polly-python==3.1.0) (23.1)\n", + "Requirement already satisfied: tomli>=1.0.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pytest>=6.2.5->polly-python==3.1.0) (2.0.1)\n", + "Requirement already satisfied: exceptiongroup>=1.0.0rc8 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pytest>=6.2.5->polly-python==3.1.0) (1.1.3)\n", + "Requirement already satisfied: iniconfig in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pytest>=6.2.5->polly-python==3.1.0) (2.0.0)\n", + "Requirement already satisfied: pluggy<2.0,>=0.12 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pytest>=6.2.5->polly-python==3.1.0) (1.3.0)\n", + "Requirement already satisfied: pycparser in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from cffi>=1.12->cryptography<=38.0.0,>=37.0.1->polly-python==3.1.0) (2.21)\n", + "Installing collected packages: tabulate, charset-normalizer, requests, cmapPy, polly-python\n", + " Attempting uninstall: tabulate\n", + " Found existing installation: tabulate 0.8.10\n", + " Uninstalling tabulate-0.8.10:\n", + " Successfully uninstalled tabulate-0.8.10\n", + " Attempting uninstall: charset-normalizer\n", + " Found existing installation: charset-normalizer 3.2.0\n", + " Uninstalling charset-normalizer-3.2.0:\n", + " Successfully uninstalled charset-normalizer-3.2.0\n", + " Attempting uninstall: requests\n", + " Found existing installation: requests 2.31.0\n", + " Uninstalling requests-2.31.0:\n", + " Successfully uninstalled requests-2.31.0\n", + " Attempting uninstall: polly-python\n", + " Found existing installation: polly-python 1.0.0\n", + " Uninstalling polly-python-1.0.0:\n", + " Successfully uninstalled polly-python-1.0.0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", + "polly-validator 0.0.2 requires requests==2.25.1, but you have requests 2.28.1 which is incompatible.\n", + "polly-validator 0.0.2 requires tabulate==0.8.10, but you have tabulate 0.9.0 which is incompatible.\u001b[0m\u001b[31m\n", + "\u001b[0mSuccessfully installed charset-normalizer-2.1.1 cmapPy-4.0.1 polly-python-3.1.0 requests-2.28.1 tabulate-0.9.0\n", + "Note: you may need to restart the kernel to use updated packages.\n" + ] + } + ], + "source": [ + "%pip install polly-python" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7bc653a8", + "metadata": {}, + "outputs": [], + "source": [ + "# import\n", + "\n", + "import os\n", + "import json\n", + "from polly.auth import Polly\n", + "from polly.workspaces import Workspaces\n", + "import pandas as pd" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "384c3ba2", + "metadata": {}, + "outputs": [], + "source": [ + "# authentication \n", + "\n", + "AUTH_KEY = \"auth key\"\n", + "Polly.auth(AUTH_KEY, env=\"polly\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7fe534db", + "metadata": {}, + "outputs": [], + "source": [ + "# connect to workspace\n", + "\n", + "workspaces = Workspaces()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e24c8617", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Workspace_idWorkspace_namestatusdescriptionlast_modifiedtag_namesfavouritewatch
016562test_function_anshuactiveNone2024-09-30 11:13:02[]FalseFalse
116563test_srishtiactive2024-09-27 10:06:49[]FalseFalse
216556new WS 21active2024-09-25 08:27:05[]FalseFalse
316531_PRD-870_Restoredactive2024-09-25 07:04:58[{'tag_name': 'PRD-870'}]FalseTrue
415487Test 2_Restoredactive2024-09-19 12:35:14[]FalseFalse
...........................
18814454OA_484archived2022-06-03 12:51:52[]FalseFalse
1895803TEST_NOTIFICATIONSactive2022-05-16 07:30:58[]FalseFalse
1904060Search_OGUI24_Restored_Restoredarchived2022-05-09 12:01:40[]FalseFalse
1914026Copy URL workspaceactive2022-03-30 07:07:09[]FalseTrue
1924028Notebooksactive2022-03-24 09:52:17[]TrueFalse
\n", + "

193 rows × 8 columns

\n", + "
" + ], + "text/plain": [ + " Workspace_id Workspace_name status description \\\n", + "0 16562 test_function_anshu active None \n", + "1 16563 test_srishti active \n", + "2 16556 new WS 21 active \n", + "3 16531 _PRD-870_Restored active \n", + "4 15487 Test 2_Restored active \n", + ".. ... ... ... ... \n", + "188 14454 OA_484 archived \n", + "189 5803 TEST_NOTIFICATIONS active \n", + "190 4060 Search_OGUI24_Restored_Restored archived \n", + "191 4026 Copy URL workspace active \n", + "192 4028 Notebooks active \n", + "\n", + " last_modified tag_names favourite watch \n", + "0 2024-09-30 11:13:02 [] False False \n", + "1 2024-09-27 10:06:49 [] False False \n", + "2 2024-09-25 08:27:05 [] False False \n", + "3 2024-09-25 07:04:58 [{'tag_name': 'PRD-870'}] False True \n", + "4 2024-09-19 12:35:14 [] False False \n", + ".. ... ... ... ... \n", + "188 2022-06-03 12:51:52 [] False False \n", + "189 2022-05-16 07:30:58 [] False False \n", + "190 2022-05-09 12:01:40 [] False False \n", + "191 2022-03-30 07:07:09 [] False True \n", + "192 2022-03-24 09:52:17 [] True False \n", + "\n", + "[193 rows x 8 columns]" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# get all workspaces\n", + "\n", + "workspaces.fetch_my_workspaces()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4d891f0e", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
file_namesizelast_modified
0folder1--
\n", + "
" + ], + "text/plain": [ + " file_name size last_modified\n", + "0 folder1 - -" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# get content of a workspace with workspace id\n", + "\n", + "query = workspaces.list_contents(workspace_id)\n", + "query" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "db6d40c2", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:root:Workspace Created !\n" + ] + }, + { + "data": { + "text/plain": [ + "{'name': 'test_2024_04Nov',\n", + " 'description': None,\n", + " 'project_property': {'type': 'workspaces', 'labels': ''},\n", + " 'created_time': '2024-11-04 09:48:30',\n", + " 'last_modified': '2024-11-04 09:48:30',\n", + " 'status': 1,\n", + " 'creator': 1647238511,\n", + " 'organisation': 1,\n", + " 'id': 16579,\n", + " 'tag_names': []}" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#create new workspace with given name\n", + "\n", + "workspaces.create_workspace(\"test_2024_04Nov\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b60926a5", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Workspace_copy started, You will be notified upon completion.\n", + "Copy Operation Successful!\n" + ] + } + ], + "source": [ + "# copy content from one workspace to another\n", + "\n", + "workspaces.create_copy({sorce workspace id}, \"source path\", {destination workspace id}, \"destination path\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f11bcdf4", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:root:Download successful to path=/import\n" + ] + } + ], + "source": [ + "# download from a workspace\n", + "\n", + "workspaces.download_from_workspaces({workspace id}, \"workspace source path\", \"destination local path\", copy_workspace_path=True)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c492f025", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:root:Upload successful on workspace-id=16579.\n" + ] + } + ], + "source": [ + "# upload from local to workspace\n", + "\n", + "workspaces.upload_to_workspaces({workspace id}, \"workspace destination path\", \"local source path\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7b77b457", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "INFO:root:Sync successful on workspace-id=16563.\n" + ] + } + ], + "source": [ + "# sync workspace data from workspace to local\n", + "\n", + "workspaces.sync_data({workspace id}, \"polly://{workspace sorce path}\",\"local destination path\")\n" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.6" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From be42d287f1efb376828dc0e8b835247ac4ae11e1 Mon Sep 17 00:00:00 2001 From: Kapil Kumar Date: Thu, 20 Mar 2025 15:13:52 +0530 Subject: [PATCH 3/4] added omiatlas to polly-python --- .DS_Store | Bin 8196 -> 8196 bytes OmixAtlas/omixAtlas with polly-python.ipynb | 1331 +++++++++++++++++++ 2 files changed, 1331 insertions(+) create mode 100644 OmixAtlas/omixAtlas with polly-python.ipynb diff --git a/.DS_Store b/.DS_Store index 318971837ec45e081de07968ccbfd95074a34238..895f45f1c5281c25693608ce610e447a2fbae50b 100644 GIT binary patch delta 145 zcmZp1XmOa}&nUbxU^hRb@Ma!?NJeK)27iWJhD?SE21kYxh8%`OhGNg0{N$vZ{3Hej z1_2;;WME+A`ws>{9s>i0j>$#BC*?6j8H&q-i}G^v^U{HO7&j*g{$bi!T+OtZUE&+d M=1.24.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.28.40)\n", + "Requirement already satisfied: cryptography<=38.0.0,>=37.0.1 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (38.0.0)\n", + "Requirement already satisfied: python-jose==3.3.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (3.3.0)\n", + "Requirement already satisfied: pydantic==1.10.12 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.10.12)\n", + "Requirement already satisfied: numpy<=1.26.4 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.25.2)\n", + "Requirement already satisfied: mixpanel==4.10.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (4.10.0)\n", + "Requirement already satisfied: plotly>=5.0.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (5.18.0)\n", + "Requirement already satisfied: retrying==1.3.4 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.3.4)\n", + "Requirement already satisfied: botocore<2.0,>=1.27.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.31.40)\n", + "Requirement already satisfied: pytest>=6.2.5 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (7.4.3)\n", + "Collecting tabulate==0.9.0\n", + " Downloading tabulate-0.9.0-py3-none-any.whl (35 kB)\n", + "Requirement already satisfied: Deprecated>=1.2.12 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.2.14)\n", + "Requirement already satisfied: joblib>=1.2.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.3.2)\n", + "Collecting cmapPy<=4.0.1\n", + " Downloading cmapPy-4.0.1-py2.py3-none-any.whl (150 kB)\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m150.2/150.2 kB\u001b[0m \u001b[31m7.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25hRequirement already satisfied: rst2txt==1.1.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.1.0)\n", + "Requirement already satisfied: cloudpathlib>=0.15.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (0.16.0)\n", + "Requirement already satisfied: pandas<=2.2.2,>=1.3.5 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from polly-python==3.1.0) (1.5.3)\n", + "Requirement already satisfied: six>=1.9.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from mixpanel==4.10.0->polly-python==3.1.0) (1.16.0)\n", + "Requirement already satisfied: urllib3 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from mixpanel==4.10.0->polly-python==3.1.0) (1.26.16)\n", + "Requirement already satisfied: typing-extensions>=4.2.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pydantic==1.10.12->polly-python==3.1.0) (4.7.1)\n", + "Requirement already satisfied: pyasn1 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from python-jose==3.3.0->polly-python==3.1.0) (0.5.0)\n", + "Requirement already satisfied: rsa in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from python-jose==3.3.0->polly-python==3.1.0) (4.7.2)\n", + "Requirement already satisfied: ecdsa!=0.15 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from python-jose==3.3.0->polly-python==3.1.0) (0.18.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from requests==2.28.1->polly-python==3.1.0) (2023.7.22)\n", + "Collecting charset-normalizer<3,>=2\n", + " Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB)\n", + "Requirement already satisfied: idna<4,>=2.5 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from requests==2.28.1->polly-python==3.1.0) (2.10)\n", + "Requirement already satisfied: docutils>=0.11 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from rst2txt==1.1.0->polly-python==3.1.0) (0.16)\n", + "Requirement already satisfied: pygments in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from rst2txt==1.1.0->polly-python==3.1.0) (2.16.1)\n", + "Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from boto3<2.0,>=1.24.0->polly-python==3.1.0) (1.0.1)\n", + "Requirement already satisfied: s3transfer<0.7.0,>=0.6.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from boto3<2.0,>=1.24.0->polly-python==3.1.0) (0.6.2)\n", + "Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from botocore<2.0,>=1.27.0->polly-python==3.1.0) (2.8.2)\n", + "Requirement already satisfied: h5py>=2.6.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from cmapPy<=4.0.1->polly-python==3.1.0) (3.10.0)\n", + "Requirement already satisfied: cffi>=1.12 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from cryptography<=38.0.0,>=37.0.1->polly-python==3.1.0) (1.15.1)\n", + "Requirement already satisfied: wrapt<2,>=1.10 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from Deprecated>=1.2.12->polly-python==3.1.0) (1.16.0)\n", + "Requirement already satisfied: pytz>=2020.1 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pandas<=2.2.2,>=1.3.5->polly-python==3.1.0) (2023.3)\n", + "Requirement already satisfied: tenacity>=6.2.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from plotly>=5.0.0->polly-python==3.1.0) (8.2.3)\n", + "Requirement already satisfied: packaging in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from plotly>=5.0.0->polly-python==3.1.0) (23.1)\n", + "Requirement already satisfied: tomli>=1.0.0 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pytest>=6.2.5->polly-python==3.1.0) (2.0.1)\n", + "Requirement already satisfied: exceptiongroup>=1.0.0rc8 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pytest>=6.2.5->polly-python==3.1.0) (1.1.3)\n", + "Requirement already satisfied: iniconfig in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pytest>=6.2.5->polly-python==3.1.0) (2.0.0)\n", + "Requirement already satisfied: pluggy<2.0,>=0.12 in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from pytest>=6.2.5->polly-python==3.1.0) (1.3.0)\n", + "Requirement already satisfied: pycparser in ./.environments/miniconda/envs/polly/lib/python3.10/site-packages (from cffi>=1.12->cryptography<=38.0.0,>=37.0.1->polly-python==3.1.0) (2.21)\n", + "Installing collected packages: tabulate, charset-normalizer, requests, cmapPy, polly-python\n", + " Attempting uninstall: tabulate\n", + " Found existing installation: tabulate 0.8.10\n", + " Uninstalling tabulate-0.8.10:\n", + " Successfully uninstalled tabulate-0.8.10\n", + " Attempting uninstall: charset-normalizer\n", + " Found existing installation: charset-normalizer 3.2.0\n", + " Uninstalling charset-normalizer-3.2.0:\n", + " Successfully uninstalled charset-normalizer-3.2.0\n", + " Attempting uninstall: requests\n", + " Found existing installation: requests 2.31.0\n", + " Uninstalling requests-2.31.0:\n", + " Successfully uninstalled requests-2.31.0\n", + " Attempting uninstall: polly-python\n", + " Found existing installation: polly-python 1.0.0\n", + " Uninstalling polly-python-1.0.0:\n", + " Successfully uninstalled polly-python-1.0.0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n", + "polly-validator 0.0.2 requires requests==2.25.1, but you have requests 2.28.1 which is incompatible.\n", + "polly-validator 0.0.2 requires tabulate==0.8.10, but you have tabulate 0.9.0 which is incompatible.\u001b[0m\u001b[31m\n", + "\u001b[0mSuccessfully installed charset-normalizer-2.1.1 cmapPy-4.0.1 polly-python-3.1.0 requests-2.28.1 tabulate-0.9.0\n", + "Note: you may need to restart the kernel to use updated packages.\n" + ] + } + ], + "source": [ + "%pip install polly-python\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7bc653a8", + "metadata": {}, + "outputs": [], + "source": [ + "# import\n", + "\n", + "import os\n", + "import json\n", + "from polly.omixatlas import OmixAtlas\n", + "from polly.jobs import jobs\n", + "import pandas as pd" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "384c3ba2", + "metadata": {}, + "outputs": [], + "source": [ + "AUTH_KEY = \"auth key\"\n", + "Polly.auth(AUTH_KEY, env=\"polly\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7fe534db", + "metadata": {}, + "outputs": [], + "source": [ + "# connecting to omixatlas\n", + "\n", + "omixatlas = OmixAtlas()\n", + "job = jobs()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0cf2acb0", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " OmixAtlas 1728297667220 Created \n", + " Repository Id Repository Name Category Display Name \\\n", + "0 1728297667220 test_bulkrna_oa_sri private test bulkrna OA sri \n", + "\n", + " Description \n", + "0 this is for bulk rna seq diy \n" + ] + } + ], + "source": [ + "# create omixatlas\n", + "\n", + "result = omixatlas.create(display_name = \"test bulkrna OA sri\", description = \"this is for bulk rna seq diy \") \n", + "print(result)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4a72361d", + "metadata": {}, + "outputs": [], + "source": [ + "# updating a existing omixatlas\n", + "\n", + "res = omixatlas.update(repo_key = \"{repokey}\", display_name = \"test bulkrna OA sri\", description = \"this is the updated description of this omixatlas\")\n", + "print(result)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "491de7cb", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "cell_line_count 1\n", + "cell_type_count 11\n", + "data_source_count 1\n", + "data_type_count 1\n", + "dataset_count 6\n", + "datatypes [{'raw counts transcriptomics': 6}]\n", + "disease_count 8\n", + "drug_count 1\n", + "indexes {}\n", + "linked_workspace_id None\n", + "normal_sample_count 153\n", + "organism_count 3\n", + "repo_id 1722434200350\n", + "repo_name bulk_rna_sri_test\n", + "sample_count 574.0\n", + "sources [{'geo': 6}]\n", + "tissue_count 4\n", + "v2_indexes {'files': 'bulk_rna_sri_test_files', 'gct_col_...\n", + "Name: data, dtype: object" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#getting basic details\n", + "\n", + "omix_atlas_summary = pd.DataFrame.from_dict(omixatlas.omixatlas_summary('1722434200350'))['data']\n", + "omix_atlas_summary" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "9e350a46", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'data': [{'repo_name': 'bulk_rna_sri_test',\n", + " 'repo_id': '1722434200350',\n", + " 'indexes': {},\n", + " 'v2_indexes': {'files': 'bulk_rna_sri_test_files',\n", + " 'gct_col_metadata': 'bulk_rna_sri_test_gct_col_metadata'},\n", + " 'linked_workspace_id': None,\n", + " 'sources': [{'geo': 6}],\n", + " 'datatypes': [{'raw counts transcriptomics': 6}],\n", + " 'dataset_count': 6,\n", + " 'disease_count': 8,\n", + " 'tissue_count': 4,\n", + " 'organism_count': 3,\n", + " 'cell_line_count': 1,\n", + " 'cell_type_count': 11,\n", + " 'drug_count': 1,\n", + " 'data_type_count': 1,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 574.0,\n", + " 'normal_sample_count': 153},\n", + " {'repo_id': '1724226646825',\n", + " 'repo_name': 'demo_srishti_omixatlas',\n", + " 'indexes': {},\n", + " 'v2_indexes': {},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [],\n", + " 'datatypes': [],\n", + " 'dataset_count': 0,\n", + " 'disease_count': 0,\n", + " 'tissue_count': 0,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 0,\n", + " 'data_source_count': 0,\n", + " 'sample_count': 0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1669033066992',\n", + " 'repo_name': 'destination_atlas',\n", + " 'indexes': {'files': 'destination_atlas_files',\n", + " 'gct_col_metadata': 'destination_atlas_gct_col_metadata'},\n", + " 'v2_indexes': {'files': 'destination_atlas_files',\n", + " 'gct_col_metadata': 'destination_atlas_gct_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 47}],\n", + " 'datatypes': [{'raw counts transcriptomics': 7}],\n", + " 'dataset_count': 47,\n", + " 'disease_count': 47,\n", + " 'tissue_count': 41,\n", + " 'organism_count': 4,\n", + " 'cell_line_count': 25,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 53,\n", + " 'data_type_count': 1,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 3383.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1679482518578',\n", + " 'repo_name': 'details_page',\n", + " 'indexes': {'files': 'details_page_files',\n", + " 'gct_col_metadata': 'details_page_gct_col_metadata'},\n", + " 'v2_indexes': {'files': 'details_page_files',\n", + " 'gct_col_metadata': 'details_page_gct_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'some source': 27},\n", + " {'test': 1},\n", + " {'testcrtnjrny': 1},\n", + " {'this is a test': 1}],\n", + " 'datatypes': [{'raw counts transcriptomics': 27}, {'microarray': 3}],\n", + " 'dataset_count': 30,\n", + " 'disease_count': 42,\n", + " 'tissue_count': 28,\n", + " 'organism_count': 4,\n", + " 'cell_line_count': 15,\n", + " 'cell_type_count': 24,\n", + " 'drug_count': 12,\n", + " 'data_type_count': 2,\n", + " 'data_source_count': 4,\n", + " 'sample_count': 4263.0,\n", + " 'normal_sample_count': 2136},\n", + " {'repo_id': '1685621126191',\n", + " 'repo_name': 'gdx_demo_atlas',\n", + " 'indexes': {'files': 'gdx_demo_atlas_files',\n", + " 'gct_col_metadata': 'gdx_demo_atlas_gct_col_metadata',\n", + " 'comparisons': 'gdx_demo_atlas_comparisons',\n", + " 'comparison_data': 'gdx_demo_atlas_comparison_data',\n", + " 'pathway_data': 'gdx_demo_atlas_pathway_data'},\n", + " 'v2_indexes': {'files': 'gdx_demo_atlas_files',\n", + " 'gct_col_metadata': 'gdx_demo_atlas_gct_col_metadata',\n", + " 'comparisons': 'gdx_demo_atlas_comparisons',\n", + " 'comparison_data': 'gdx_demo_atlas_comparison_data',\n", + " 'pathway_data': 'gdx_demo_atlas_pathway_data'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 37}],\n", + " 'datatypes': [{'raw counts transcriptomics': 29}, {'': 4}],\n", + " 'dataset_count': 37,\n", + " 'disease_count': 48,\n", + " 'tissue_count': 28,\n", + " 'organism_count': 6,\n", + " 'cell_line_count': 21,\n", + " 'cell_type_count': 18,\n", + " 'drug_count': 12,\n", + " 'data_type_count': 2,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 947.0,\n", + " 'normal_sample_count': 267},\n", + " {'repo_id': '1663151941472',\n", + " 'repo_name': 'c_oa',\n", + " 'indexes': {'files': 'c_oa_files'},\n", + " 'v2_indexes': {'files': 'c_oa_files'},\n", + " 'linked_workspace_id': 14918,\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'': 10}],\n", + " 'datatypes': [{'drug response': 10}],\n", + " 'dataset_count': 10,\n", + " 'disease_count': 3,\n", + " 'tissue_count': 1,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 5,\n", + " 'cell_type_count': 1,\n", + " 'drug_count': 1,\n", + " 'data_type_count': 1,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 10.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1722598229271',\n", + " 'repo_name': 'bulk_rna_a_omixatlas',\n", + " 'indexes': {},\n", + " 'v2_indexes': {},\n", + " 'org_id': '1',\n", + " 'data_type': 'bulk_rna_seq',\n", + " 'data_management_version': 'v2',\n", + " 'sources': [],\n", + " 'datatypes': [],\n", + " 'dataset_count': 0,\n", + " 'disease_count': 0,\n", + " 'tissue_count': 0,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 0,\n", + " 'data_source_count': 0,\n", + " 'sample_count': 0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1659450268526',\n", + " 'repo_name': 'multiple_oa_2',\n", + " 'indexes': {'files': 'multiple_oa_2_files',\n", + " 'gct_col_metadata': 'multiple_oa_2_gct_col_metadata'},\n", + " 'v2_indexes': {'files': 'multiple_oa_2_files',\n", + " 'gct_col_metadata': 'multiple_oa_2_gct_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'cbioportal': 225}, {'geo': 165}, {'depmap': 5}, {'tyra': 5}],\n", + " 'datatypes': [{'copy number variation': 191},\n", + " {'transcriptomics': 165},\n", + " {'mutation': 30},\n", + " {'fusion': 4},\n", + " {'gene dependency': 4},\n", + " {'drug screens': 1}],\n", + " 'dataset_count': 400,\n", + " 'disease_count': 157,\n", + " 'tissue_count': 127,\n", + " 'organism_count': 7,\n", + " 'cell_line_count': 130,\n", + " 'cell_type_count': 62,\n", + " 'drug_count': 71,\n", + " 'data_type_count': 6,\n", + " 'data_source_count': 4,\n", + " 'sample_count': 276187.0,\n", + " 'normal_sample_count': 182293},\n", + " {'repo_id': '1720168375094',\n", + " 'repo_name': 'single_cell_sri_test',\n", + " 'v2_indexes': {},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [],\n", + " 'datatypes': [],\n", + " 'dataset_count': 0,\n", + " 'disease_count': 0,\n", + " 'tissue_count': 0,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 0,\n", + " 'data_source_count': 0,\n", + " 'sample_count': 0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1678794482481',\n", + " 'repo_name': 'csv_oa_test',\n", + " 'v2_indexes': {'files': 'csv_oa_test_files'},\n", + " 'linked_workspace_id': '15184',\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'src_1': 2},\n", + " {'all': 1},\n", + " {'test datastet': 1},\n", + " {'test ondtst': 1}],\n", + " 'datatypes': [{'all': 3}, {'datatype_1': 2}],\n", + " 'dataset_count': 5,\n", + " 'disease_count': 4,\n", + " 'tissue_count': 4,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 2,\n", + " 'data_source_count': 4,\n", + " 'sample_count': 0.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1663919116821',\n", + " 'repo_name': 'ai_in_drug_discovery_oa',\n", + " 'indexes': {'files': 'ai_in_drug_discovery_oa_files',\n", + " 'gct_col_metadata': 'ai_in_drug_discovery_oa_gct_col_metadata'},\n", + " 'v2_indexes': {'files': 'ai_in_drug_discovery_oa_files',\n", + " 'gct_col_metadata': 'ai_in_drug_discovery_oa_gct_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 112}],\n", + " 'datatypes': [{'transcriptomics': 111}, {'microarray': 1}],\n", + " 'dataset_count': 112,\n", + " 'disease_count': 69,\n", + " 'tissue_count': 42,\n", + " 'organism_count': 6,\n", + " 'cell_line_count': 28,\n", + " 'cell_type_count': 60,\n", + " 'drug_count': 57,\n", + " 'data_type_count': 2,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 3220.0,\n", + " 'normal_sample_count': 1579},\n", + " {'repo_id': '1667375323145',\n", + " 'repo_name': 'bbio_omixatlas_only_h5seurat',\n", + " 'indexes': {'files': 'bbio_omixatlas_only_h5seurat_files'},\n", + " 'v2_indexes': {'files': 'bbio_omixatlas_only_h5seurat_files'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'branchbio': 4}],\n", + " 'datatypes': [{'single cell multiomics': 4}],\n", + " 'dataset_count': 4,\n", + " 'disease_count': 2,\n", + " 'tissue_count': 3,\n", + " 'organism_count': 1,\n", + " 'cell_line_count': 1,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 1,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 4.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1689071945246',\n", + " 'repo_name': 'gdx_test_s',\n", + " 'v2_indexes': {'files': 'gdx_test_s_files',\n", + " 'gct_col_metadata': 'gdx_test_s_gct_col_metadata',\n", + " 'comparisons': 'gdx_test_s_comparisons',\n", + " 'comparison_data': 'gdx_test_s_comparison_data',\n", + " 'pathway_data': 'gdx_test_s_pathway_data'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 1}],\n", + " 'datatypes': [{'': 1}],\n", + " 'dataset_count': 1,\n", + " 'disease_count': 1,\n", + " 'tissue_count': 1,\n", + " 'organism_count': 1,\n", + " 'cell_line_count': 1,\n", + " 'cell_type_count': 2,\n", + " 'drug_count': 1,\n", + " 'data_type_count': 1,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 6.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1673411159486',\n", + " 'repo_name': 'bulk_rnaseq_atlas',\n", + " 'indexes': {'files': 'bulk_rnaseq_atlas_files',\n", + " 'gct_col_metadata': 'bulk_rnaseq_atlas_gct_col_metadata'},\n", + " 'v2_indexes': {'files': 'bulk_rnaseq_atlas_files',\n", + " 'gct_col_metadata': 'bulk_rnaseq_atlas_gct_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 4}, {'test2': 1}, {'testan': 1}],\n", + " 'datatypes': [{'raw counts transcriptomics': 5}, {'yo': 1}],\n", + " 'dataset_count': 6,\n", + " 'disease_count': 7,\n", + " 'tissue_count': 5,\n", + " 'organism_count': 3,\n", + " 'cell_line_count': 207,\n", + " 'cell_type_count': 7,\n", + " 'drug_count': 1,\n", + " 'data_type_count': 2,\n", + " 'data_source_count': 3,\n", + " 'sample_count': 237.0,\n", + " 'normal_sample_count': 88},\n", + " {'repo_id': '31',\n", + " 'repo_name': 'lincs',\n", + " 'indexes': {'files': 'lincs_files',\n", + " 'gct_col_metadata': 'lincs_gct_col_metadata'},\n", + " 'v2_indexes': {'files': 'lincs_files',\n", + " 'gct_col_metadata': 'lincs_gct_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo, lincs': 699}, {'geo': 95}, {'cbioportal': 2}],\n", + " 'datatypes': [{'transcriptomics': 794}, {'': 1}],\n", + " 'dataset_count': 796,\n", + " 'disease_count': 38,\n", + " 'tissue_count': 28,\n", + " 'organism_count': 2,\n", + " 'cell_line_count': 70,\n", + " 'cell_type_count': 4,\n", + " 'drug_count': 571,\n", + " 'data_type_count': 2,\n", + " 'data_source_count': 3,\n", + " 'sample_count': 198121.0,\n", + " 'normal_sample_count': 9062},\n", + " {'repo_id': '1711002664882',\n", + " 'repo_name': 'archived_oa',\n", + " 'indexes': {},\n", + " 'v2_indexes': {},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [],\n", + " 'datatypes': [],\n", + " 'dataset_count': 0,\n", + " 'disease_count': 0,\n", + " 'tissue_count': 0,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 0,\n", + " 'data_source_count': 0,\n", + " 'sample_count': 0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1670915426568',\n", + " 'repo_name': 'single_cell_destination',\n", + " 'indexes': {'files': 'single_cell_destination_files',\n", + " 'h5ad_col_metadata': 'single_cell_destination_h5ad_col_metadata'},\n", + " 'v2_indexes': {'files': 'single_cell_destination_files',\n", + " 'h5ad_col_metadata': 'single_cell_destination_h5ad_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 13}, {'tabula sapiens': 1}],\n", + " 'datatypes': [{'single cell': 14}],\n", + " 'dataset_count': 14,\n", + " 'disease_count': 15,\n", + " 'tissue_count': 14,\n", + " 'organism_count': 2,\n", + " 'cell_line_count': 3,\n", + " 'cell_type_count': 56,\n", + " 'drug_count': 11,\n", + " 'data_type_count': 1,\n", + " 'data_source_count': 2,\n", + " 'sample_count': 107.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1654268055800',\n", + " 'repo_name': 'ingestion_test_1',\n", + " 'indexes': {'files': 'ingestion_test_1_files',\n", + " 'gct_col_metadata': 'ingestion_test_1_gct_col_metadata'},\n", + " 'v2_indexes': {'files': 'ingestion_test_1_files',\n", + " 'gct_col_metadata': 'ingestion_test_1_gct_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 79},\n", + " {'cbioportal': 13},\n", + " {'ccle': 3},\n", + " {'': 2},\n", + " {'tcga': 1}],\n", + " 'datatypes': [{'transcriptomics': 64},\n", + " {'': 26},\n", + " {'copy_number_variation': 5},\n", + " {'single_cell': 1}],\n", + " 'dataset_count': 98,\n", + " 'disease_count': 0,\n", + " 'tissue_count': 0,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 4,\n", + " 'data_source_count': 5,\n", + " 'sample_count': 0.0,\n", + " 'normal_sample_count': 386},\n", + " {'repo_id': '1692767232097',\n", + " 'repo_name': 'prop_data_test',\n", + " 'v2_indexes': {},\n", + " 'data_management_version': 'v1',\n", + " 'sources': [],\n", + " 'datatypes': [],\n", + " 'dataset_count': 0,\n", + " 'disease_count': 0,\n", + " 'tissue_count': 0,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 0,\n", + " 'data_source_count': 0,\n", + " 'sample_count': 0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1694071639576',\n", + " 'repo_name': 'gdx_omixatlas',\n", + " 'v2_indexes': {'files': 'gdx_omixatlas_files',\n", + " 'gct_col_metadata': 'gdx_omixatlas_gct_col_metadata',\n", + " 'comparisons': 'gdx_omixatlas_comparisons',\n", + " 'comparison_data': 'gdx_omixatlas_comparison_data',\n", + " 'pathway_data': 'gdx_omixatlas_pathway_data'},\n", + " 'data_management_version': 'v1',\n", + " 'sources': [{'geo': 37}],\n", + " 'datatypes': [{'raw counts transcriptomics': 37}],\n", + " 'dataset_count': 37,\n", + " 'disease_count': 22,\n", + " 'tissue_count': 16,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 25,\n", + " 'cell_type_count': 12,\n", + " 'drug_count': 18,\n", + " 'data_type_count': 1,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 1136.0,\n", + " 'normal_sample_count': 364},\n", + " {'repo_id': '1657777478388',\n", + " 'repo_name': 'ingestion_testing_oa',\n", + " 'indexes': {'files': 'ingestion_testing_oa_files',\n", + " 'gct_col_metadata': 'ingestion_testing_oa_gct_col_metadata'},\n", + " 'v2_indexes': {'files': 'ingestion_testing_oa_files',\n", + " 'gct_col_metadata': 'ingestion_testing_oa_gct_col_metadata'},\n", + " 'data_management_version': 'v1',\n", + " 'sources': [{'pride': 1}],\n", + " 'datatypes': [{'proteomics': 1}],\n", + " 'dataset_count': 1,\n", + " 'disease_count': 1,\n", + " 'tissue_count': 1,\n", + " 'organism_count': 1,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 1,\n", + " 'drug_count': 2,\n", + " 'data_type_count': 1,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 3.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1677039559242',\n", + " 'repo_name': 'diy_poa',\n", + " 'indexes': {'files': 'diy_poa_files',\n", + " 'h5ad_col_metadata': 'diy_poa_h5ad_col_metadata'},\n", + " 'v2_indexes': {'files': 'diy_poa_files',\n", + " 'h5ad_col_metadata': 'diy_poa_h5ad_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 3}],\n", + " 'datatypes': [{'single cell': 3}],\n", + " 'dataset_count': 3,\n", + " 'disease_count': 4,\n", + " 'tissue_count': 3,\n", + " 'organism_count': 1,\n", + " 'cell_line_count': 1,\n", + " 'cell_type_count': 26,\n", + " 'drug_count': 1,\n", + " 'data_type_count': 1,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 8.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1709709572426',\n", + " 'repo_name': 'vcf_demo2',\n", + " 'v2_indexes': {},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [],\n", + " 'datatypes': [],\n", + " 'dataset_count': 0,\n", + " 'disease_count': 0,\n", + " 'tissue_count': 0,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 0,\n", + " 'data_source_count': 0,\n", + " 'sample_count': 0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1690534314003',\n", + " 'repo_name': 'hybrid_test_repo',\n", + " 'v2_indexes': {'files': 'hybrid_test_repo_files',\n", + " 'gct_col_metadata': 'hybrid_test_repo_gct_col_metadata',\n", + " 'h5ad_col_metadata': 'hybrid_test_repo_h5ad_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 2}, {'src_tst_1': 1}],\n", + " 'datatypes': [{'': 1},\n", + " {'raw counts transcriptomics': 1},\n", + " {'single cell': 1}],\n", + " 'dataset_count': 3,\n", + " 'disease_count': 6,\n", + " 'tissue_count': 2,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 1,\n", + " 'cell_type_count': 11,\n", + " 'drug_count': 1,\n", + " 'data_type_count': 3,\n", + " 'data_source_count': 2,\n", + " 'sample_count': 86.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1659621145863',\n", + " 'repo_name': 'hmp_omixatlas',\n", + " 'indexes': {'files': 'hmp_omixatlas_files',\n", + " 'biom_col_metadata': 'hmp_omixatlas_biom_col_metadata',\n", + " 'biom_row_metadata': 'hmp_omixatlas_biom_row_metadata'},\n", + " 'v2_indexes': {'files': 'hmp_omixatlas_files',\n", + " 'biom_col_metadata': 'hmp_omixatlas_biom_col_metadata',\n", + " 'biom_row_metadata': 'hmp_omixatlas_biom_row_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'human microbiome project (hmp)': 32}, {'microbiome db': 1}],\n", + " 'datatypes': [{'metagenomics': 26},\n", + " {'metatranscriptomics': 6},\n", + " {'microbiome': 1}],\n", + " 'dataset_count': 33,\n", + " 'disease_count': 1,\n", + " 'tissue_count': 2,\n", + " 'organism_count': 1,\n", + " 'cell_line_count': 1,\n", + " 'cell_type_count': 1,\n", + " 'drug_count': 16,\n", + " 'data_type_count': 3,\n", + " 'data_source_count': 2,\n", + " 'sample_count': 1248.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1666789252487',\n", + " 'repo_name': 'bbio_omixatlas',\n", + " 'indexes': {'files': 'bbio_omixatlas_files'},\n", + " 'v2_indexes': {'files': 'bbio_omixatlas_files'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'branchbio': 1}],\n", + " 'datatypes': [{'single cell multiomics': 1}],\n", + " 'dataset_count': 1,\n", + " 'disease_count': 1,\n", + " 'tissue_count': 1,\n", + " 'organism_count': 1,\n", + " 'cell_line_count': 1,\n", + " 'cell_type_count': 1,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 1,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 1.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '17',\n", + " 'repo_name': 'sc_data_lake',\n", + " 'indexes': {'files': 'sc_data_lake_files',\n", + " 'h5ad_col_metadata': 'sc_data_lake_h5ad_col_metadata',\n", + " 'h5ad_row_metadata': 'sc_data_lake_h5ad_row_metadata'},\n", + " 'v2_indexes': {'files': 'sc_data_lake_files',\n", + " 'h5ad_col_metadata': 'sc_data_lake_h5ad_col_metadata',\n", + " 'h5ad_row_metadata': 'sc_data_lake_h5ad_row_metadata'},\n", + " 'data_management_version': 'v1',\n", + " 'sources': [{'geo': 105},\n", + " {'expression atlas': 20},\n", + " {'publication': 11},\n", + " {'': 5},\n", + " {'scp': 5},\n", + " {'cziscience': 4},\n", + " {'covid-19 cell atlas': 2},\n", + " {'gene expression omnibus (geo)': 2},\n", + " {'humancellatlas': 2}],\n", + " 'datatypes': [{'single cell': 132}, {'single cell1': 1}],\n", + " 'dataset_count': 156,\n", + " 'disease_count': 45,\n", + " 'tissue_count': 65,\n", + " 'organism_count': 3,\n", + " 'cell_line_count': 5,\n", + " 'cell_type_count': 163,\n", + " 'drug_count': 11,\n", + " 'data_type_count': 2,\n", + " 'data_source_count': 9,\n", + " 'sample_count': 1232147.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1669085436194',\n", + " 'repo_name': 'source_atlas',\n", + " 'indexes': {'files': 'source_atlas_files',\n", + " 'gct_col_metadata': 'source_atlas_gct_col_metadata'},\n", + " 'v2_indexes': {'files': 'source_atlas_files',\n", + " 'gct_col_metadata': 'source_atlas_gct_col_metadata'},\n", + " 'data_type': 'bulk_rna_seq',\n", + " 'data_management_version': 'v1',\n", + " 'sources': [{'geo': 44}, {'': 1}, {'test': 1}],\n", + " 'datatypes': [{'raw counts transcriptomics': 44}, {'transcriptomics': 1}],\n", + " 'dataset_count': 46,\n", + " 'disease_count': 39,\n", + " 'tissue_count': 39,\n", + " 'organism_count': 8,\n", + " 'cell_line_count': 23,\n", + " 'cell_type_count': 26,\n", + " 'drug_count': 13,\n", + " 'data_type_count': 2,\n", + " 'data_source_count': 3,\n", + " 'sample_count': 3464.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1674572370484',\n", + " 'repo_name': 'test_pipeline',\n", + " 'indexes': {'files': 'test_pipeline_files',\n", + " 'gct_col_metadata': 'test_pipeline_gct_col_metadata'},\n", + " 'v2_indexes': {'files': 'test_pipeline_files',\n", + " 'gct_col_metadata': 'test_pipeline_gct_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 45}],\n", + " 'datatypes': [{'raw counts transcriptomics': 32}, {'transcriptomics': 13}],\n", + " 'dataset_count': 45,\n", + " 'disease_count': 34,\n", + " 'tissue_count': 18,\n", + " 'organism_count': 2,\n", + " 'cell_line_count': 9,\n", + " 'cell_type_count': 24,\n", + " 'drug_count': 9,\n", + " 'data_type_count': 2,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 2922.0,\n", + " 'normal_sample_count': 2278},\n", + " {'repo_id': '1673014297214',\n", + " 'repo_name': 'test_connector_pipeline',\n", + " 'indexes': {'files': 'test_connector_pipeline_files',\n", + " 'gct_col_metadata': 'test_connector_pipeline_gct_col_metadata'},\n", + " 'v2_indexes': {'files': 'test_connector_pipeline_files',\n", + " 'gct_col_metadata': 'test_connector_pipeline_gct_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 11}],\n", + " 'datatypes': [{'transcriptomics': 11}],\n", + " 'dataset_count': 11,\n", + " 'disease_count': 11,\n", + " 'tissue_count': 5,\n", + " 'organism_count': 2,\n", + " 'cell_line_count': 65,\n", + " 'cell_type_count': 7,\n", + " 'drug_count': 3,\n", + " 'data_type_count': 1,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 141.0,\n", + " 'normal_sample_count': 29},\n", + " {'repo_id': '1674475984908',\n", + " 'repo_name': 'single_cell_test',\n", + " 'indexes': {'files': 'single_cell_test_files',\n", + " 'h5ad_col_metadata': 'single_cell_test_h5ad_col_metadata'},\n", + " 'v2_indexes': {'files': 'single_cell_test_files',\n", + " 'h5ad_col_metadata': 'single_cell_test_h5ad_col_metadata'},\n", + " 'data_management_version': 'v1',\n", + " 'sources': [{'array express': 2},\n", + " {'covid-19 cell atlas': 1},\n", + " {'human cell atlas': 1}],\n", + " 'datatypes': [{'single cell': 4}],\n", + " 'dataset_count': 4,\n", + " 'disease_count': 4,\n", + " 'tissue_count': 2,\n", + " 'organism_count': 2,\n", + " 'cell_line_count': 1,\n", + " 'cell_type_count': 11,\n", + " 'drug_count': 2,\n", + " 'data_type_count': 1,\n", + " 'data_source_count': 3,\n", + " 'sample_count': 31.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1643016586529',\n", + " 'repo_name': 'geo',\n", + " 'indexes': {'files': 'geo_files',\n", + " 'gct_col_metadata': 'geo_gct_col_metadata'},\n", + " 'v2_indexes': {'files': 'geo_files',\n", + " 'gct_col_metadata': 'geo_gct_col_metadata'},\n", + " 'linked_workspace_id': '15196',\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 5}, {'source': 1}, {'vfv': 1}],\n", + " 'datatypes': [{'transcriptomics': 6}, {'': 1}],\n", + " 'dataset_count': 7,\n", + " 'disease_count': 12,\n", + " 'tissue_count': 8,\n", + " 'organism_count': 3,\n", + " 'cell_line_count': 5,\n", + " 'cell_type_count': 6,\n", + " 'drug_count': 2,\n", + " 'data_type_count': 2,\n", + " 'data_source_count': 3,\n", + " 'sample_count': 1741.0,\n", + " 'normal_sample_count': 154446},\n", + " {'repo_id': '1693554957612',\n", + " 'repo_name': 'testing_nf_pipeline',\n", + " 'indexes': {},\n", + " 'v2_indexes': {},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [],\n", + " 'datatypes': [],\n", + " 'dataset_count': 0,\n", + " 'disease_count': 0,\n", + " 'tissue_count': 0,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 0,\n", + " 'data_source_count': 0,\n", + " 'sample_count': 0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1709709547712',\n", + " 'repo_name': 'vcf_demo1',\n", + " 'v2_indexes': {},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [],\n", + " 'datatypes': [],\n", + " 'dataset_count': 0,\n", + " 'disease_count': 0,\n", + " 'tissue_count': 0,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 0,\n", + " 'data_source_count': 0,\n", + " 'sample_count': 0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1691567442682',\n", + " 'repo_name': 'test_aug_09',\n", + " 'indexes': {},\n", + " 'v2_indexes': {},\n", + " 'data_management_version': 'v1',\n", + " 'sources': [],\n", + " 'datatypes': [],\n", + " 'dataset_count': 0,\n", + " 'disease_count': 0,\n", + " 'tissue_count': 0,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 0,\n", + " 'data_source_count': 0,\n", + " 'sample_count': 0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1679312499313',\n", + " 'repo_name': 'test_pipeline_rnaseq',\n", + " 'indexes': {'files': 'test_pipeline_rnaseq_files',\n", + " 'gct_col_metadata': 'test_pipeline_rnaseq_gct_col_metadata'},\n", + " 'v2_indexes': {'files': 'test_pipeline_rnaseq_files',\n", + " 'gct_col_metadata': 'test_pipeline_rnaseq_gct_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 110}],\n", + " 'datatypes': [{'raw counts transcriptomics': 108}, {'transcriptomics': 2}],\n", + " 'dataset_count': 110,\n", + " 'disease_count': 73,\n", + " 'tissue_count': 41,\n", + " 'organism_count': 3,\n", + " 'cell_line_count': 39,\n", + " 'cell_type_count': 49,\n", + " 'drug_count': 22,\n", + " 'data_type_count': 2,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 1926.0,\n", + " 'normal_sample_count': 1696},\n", + " {'repo_id': '1698731902069',\n", + " 'repo_name': 'test_oa_sr',\n", + " 'v2_indexes': {'files': 'test_oa_sr_files',\n", + " 'gct_col_metadata': 'test_oa_sr_gct_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [],\n", + " 'datatypes': [],\n", + " 'dataset_count': 0,\n", + " 'disease_count': 0,\n", + " 'tissue_count': 0,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 0,\n", + " 'data_source_count': 0,\n", + " 'sample_count': 0.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1649664527538',\n", + " 'repo_name': 'tyra_cell_viability_assay',\n", + " 'indexes': {'files': 'tyra_cell_viability_assay_files'},\n", + " 'v2_indexes': {'files': 'tyra_cell_viability_assay_files'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [],\n", + " 'datatypes': [],\n", + " 'dataset_count': 3760,\n", + " 'disease_count': 0,\n", + " 'tissue_count': 0,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 0,\n", + " 'data_source_count': 0,\n", + " 'sample_count': 0.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1697712481470',\n", + " 'repo_name': 'transactional_ingestion_ps',\n", + " 'v2_indexes': {'files': 'transactional_ingestion_ps_files',\n", + " 'gct_col_metadata': 'transactional_ingestion_ps_gct_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 1}],\n", + " 'datatypes': [{'raw counts transcriptomics': 1}],\n", + " 'dataset_count': 1,\n", + " 'disease_count': 2,\n", + " 'tissue_count': 2,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 1,\n", + " 'cell_type_count': 3,\n", + " 'drug_count': 1,\n", + " 'data_type_count': 1,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 3.0,\n", + " 'normal_sample_count': 36},\n", + " {'repo_id': '1698657821316',\n", + " 'repo_name': 'test_oa_gates',\n", + " 'indexes': {'files': 'test_oa_gates_files',\n", + " 'gct_col_metadata': 'test_oa_gates_gct_col_metadata'},\n", + " 'v2_indexes': {'files': 'test_oa_gates_files',\n", + " 'gct_col_metadata': 'test_oa_gates_gct_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 5}],\n", + " 'datatypes': [{'raw counts transcriptomics': 5}],\n", + " 'dataset_count': 5,\n", + " 'disease_count': 7,\n", + " 'tissue_count': 1,\n", + " 'organism_count': 2,\n", + " 'cell_line_count': 1,\n", + " 'cell_type_count': 1,\n", + " 'drug_count': 1,\n", + " 'data_type_count': 1,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 1860.0,\n", + " 'normal_sample_count': 603},\n", + " {'repo_id': '1680106629523',\n", + " 'repo_name': 'single_sch_oa',\n", + " 'indexes': {'files': 'single_sch_oa_files',\n", + " 'h5ad_col_metadata': 'single_sch_oa_h5ad_col_metadata'},\n", + " 'v2_indexes': {'files': 'single_sch_oa_files',\n", + " 'h5ad_col_metadata': 'single_sch_oa_h5ad_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 2}, {'': 1}, {'ghi': 1}, {'publication': 1}],\n", + " 'datatypes': [{'': 2}, {'single cell': 1}, {'single_cell': 1}],\n", + " 'dataset_count': 5,\n", + " 'disease_count': 9,\n", + " 'tissue_count': 6,\n", + " 'organism_count': 2,\n", + " 'cell_line_count': 1,\n", + " 'cell_type_count': 40,\n", + " 'drug_count': 13,\n", + " 'data_type_count': 3,\n", + " 'data_source_count': 4,\n", + " 'sample_count': 35.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1722849364887',\n", + " 'repo_name': 'testing_repo_combined_oa_1_v1',\n", + " 'v2_indexes': {'files': 'testing_repo_combined_oa_1_v1_files'},\n", + " 'data_management_version': 'v1',\n", + " 'sources': [{'geo': 1}],\n", + " 'datatypes': [{'raw counts transcriptomics': 1}],\n", + " 'dataset_count': 1,\n", + " 'disease_count': 1,\n", + " 'tissue_count': 1,\n", + " 'organism_count': 1,\n", + " 'cell_line_count': 1,\n", + " 'cell_type_count': 2,\n", + " 'drug_count': 1,\n", + " 'data_type_count': 1,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 12.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1698397847153',\n", + " 'repo_name': 'transactional_test_ps',\n", + " 'v2_indexes': {'files': 'transactional_test_ps_files'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [],\n", + " 'datatypes': [],\n", + " 'dataset_count': 0,\n", + " 'disease_count': 0,\n", + " 'tissue_count': 0,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 0,\n", + " 'drug_count': 0,\n", + " 'data_type_count': 0,\n", + " 'data_source_count': 0,\n", + " 'sample_count': 0.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1674580012706',\n", + " 'repo_name': 'test_single_cell',\n", + " 'indexes': {'files': 'test_single_cell_files',\n", + " 'h5ad_col_metadata': 'test_single_cell_h5ad_col_metadata'},\n", + " 'v2_indexes': {'files': 'test_single_cell_files',\n", + " 'h5ad_col_metadata': 'test_single_cell_h5ad_col_metadata'},\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 3}, {'scp': 3}],\n", + " 'datatypes': [{'single cell': 4}, {'': 2}],\n", + " 'dataset_count': 6,\n", + " 'disease_count': 8,\n", + " 'tissue_count': 6,\n", + " 'organism_count': 0,\n", + " 'cell_line_count': 0,\n", + " 'cell_type_count': 3,\n", + " 'drug_count': 1,\n", + " 'data_type_count': 2,\n", + " 'data_source_count': 2,\n", + " 'sample_count': 898615.0,\n", + " 'normal_sample_count': 0},\n", + " {'repo_id': '1671791834799',\n", + " 'repo_name': 'single_cell_source',\n", + " 'indexes': {'files': 'single_cell_source_files',\n", + " 'h5ad_col_metadata': 'single_cell_source_h5ad_col_metadata'},\n", + " 'v2_indexes': {'files': 'single_cell_source_files',\n", + " 'h5ad_col_metadata': 'single_cell_source_h5ad_col_metadata'},\n", + " 'data_type': 'single_cell',\n", + " 'data_management_version': 'v2',\n", + " 'sources': [{'geo': 1}],\n", + " 'datatypes': [],\n", + " 'dataset_count': 1,\n", + " 'disease_count': 2,\n", + " 'tissue_count': 2,\n", + " 'organism_count': 1,\n", + " 'cell_line_count': 1,\n", + " 'cell_type_count': 1,\n", + " 'drug_count': 1,\n", + " 'data_type_count': 0,\n", + " 'data_source_count': 1,\n", + " 'sample_count': 39.0,\n", + " 'normal_sample_count': 0}]}" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# get all omixatlases\n", + "\n", + "omixatlas.get_all_omixatlas()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "62517e15", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Query execution succeeded (time taken: 2.53 seconds, data scanned: 0.000 MB)\n", + "Fetched 30 rows\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
column_namecolumn_type
0src_uristring
1sample_idstring
2curated_gene_modifiedarray<string>
3curated_cell_linestring
4curated_cohort_namestring
\n", + "
" + ], + "text/plain": [ + " column_name column_type\n", + "0 src_uri string\n", + "1 sample_id string\n", + "2 curated_gene_modified array\n", + "3 curated_cell_line string\n", + "4 curated_cohort_name string" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# query metadata in omixatlases\n", + "\n", + "query = \"DESCRIBE bulk_rna_sri_test.samples\"\n", + "results=omixatlas.query_metadata(query)\n", + "results.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "id": "1a5184e5", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Query execution succeeded (time taken: 3.20 seconds, data scanned: 0.000 MB)\n", + "Fetched 2 rows\n" + ] + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
table_name
0bulk_rna_sri_test.datasets
1bulk_rna_sri_test.samples
\n", + "
" + ], + "text/plain": [ + " table_name\n", + "0 bulk_rna_sri_test.datasets\n", + "1 bulk_rna_sri_test.samples" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "query = \"SHOW TABLES IN bulk_rna_sri_test\"\n", + "results=omixatlas.query_metadata(query)\n", + "results.head()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.6" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} From c45fc053bce598608564f5add385718c62115c50 Mon Sep 17 00:00:00 2001 From: Kapil Kumar Date: Thu, 20 Mar 2025 15:33:20 +0530 Subject: [PATCH 4/4] added gitignore --- .gitignore | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa6e7ae --- /dev/null +++ b/.gitignore @@ -0,0 +1,58 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +dist/ +develop-eggs/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg + +#ds store in mac +polly/.DS_Store +.DS_Store +tests/.DS_Store + +# Scrapy stuff: +.scrapy + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# SageMath parsed files +*.sage.py + +# dotenv +.env + +# virtualenv +.venv +venv/ +ENV/ + +# mypy +.mypy_cache/ + +# IDE settings +.vscode/ +.idea