Skip to content

Commit

Permalink
Merge pull request #15 from tansey-lab/jw_general
Browse files Browse the repository at this point in the history
fixed example.ipynb docs causing RTD errors
  • Loading branch information
jessicaw9910 authored Aug 16, 2024
2 parents f677966 + 714b050 commit f410b7b
Showing 1 changed file with 25 additions and 20 deletions.
45 changes: 25 additions & 20 deletions docs/notebooks/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"source": [
"## Variables\n",
"\n",
"This module contains a dictionary for the default properties needed at instantiation of {class}`nf_rnaseq.biomart.BioMart`, {class}`nf_rnaseq.hgnc.HGNC`, {class}`nf_rnaseq.uniprot.UniProt`, {class}`nf_rnaseq.uniprot.UniProtGET`, and {class}`nf_rnaseq.uniprot.UniProtPOST`.\n",
"This module contains a dictionary for the default properties needed at instantiation of {class}`BioMart`, {class}`HGNC`, {class}`UniProt`, {class}`UniProtGET`, and {class}`UniProtPOST`.\n",
"\n",
"This package is optimized only to query the provided `url_base`, but the `term_in` and `term_out` can be modified."
]
Expand Down Expand Up @@ -101,9 +101,9 @@
"\n",
"## API schema\n",
"\n",
"The use of the API clients is governed by a series of `ABC` and `dataclass` objects whose inheritance, properties, and functions are described below:\n",
"The use of the API clients is governed by a series of `ABC` and `dataclass` objects from the `api_schema` module whose inheritance, properties, and functions are described below:\n",
"\n",
"<ins>**{class}`nf_rnaseq.api_schema.APIClient`**</ins>\n",
"<ins>**{class}`APIClient`**</ins>\n",
"\n",
"Parent Class that governs all shared API client properties and functions\n",
" \n",
Expand Down Expand Up @@ -134,13 +134,13 @@
"\n",
"**Functions**\n",
"\n",
"+ {func}`nf_rnaseq.APIClient.__post_init__`\n",
"+ {func}`APIClient.__post_init__`\n",
" \n",
"+ {func}`nf_rnaseq.APIClient.check_response`\n",
"+ {func}`APIClient.check_response`\n",
"\n",
"+ {func}`nf_rnaseq.APIClient.process_identifier`\n",
"+ {func}`APIClient.process_identifier`\n",
"\n",
"+ {func}`nf_rnaseq.APIClient.query_api` (`@abstractmethod`)\n",
"+ {func}`APIClient.query_api` (`@abstractmethod`)\n",
"\n",
"<table>\n",
" <tr>\n",
Expand All @@ -167,7 +167,7 @@
"\n",
"<br>\n",
"\n",
"<ins>**{class}`nf_rnaseq.api_schema.API.APIClientGET`**</ins>\n",
"<ins>**{class}`APIClientGET`**</ins>\n",
"\n",
"Child class of `APIClient` that provides basic `GET` functionality for HTTP requests\n",
"\n",
Expand All @@ -193,15 +193,15 @@
"\n",
"**Additional functions**\n",
"\n",
"+ {func}`nf_rnaseq.APIClientGET.__post_init__`\n",
"+ {func}`APIClientGET.__post_init__`\n",
"\n",
"+ {func}`nf_rnaseq.APIClientGET.query_api`\n",
"+ {func}`APIClientGET.query_api`\n",
"\n",
"+ {func}`nf_rnaseq.APIClient.create_query_url` (`@abstractmethod`)\n",
"+ {func}`APIClient.create_query_url` (`@abstractmethod`)\n",
"\n",
"+ {func}`nf_rnaseq.APIClient.check_if_job_ready` (`@abstractmethod`)\n",
"+ {func}`APIClient.check_if_job_ready` (`@abstractmethod`)\n",
"\n",
"+ {func}`nf_rnaseq.APIClient.maybe_get_gene_names` (`@abstractmethod`)\n",
"+ {func}`APIClient.maybe_get_gene_names` (`@abstractmethod`)\n",
"\n",
"<table>\n",
" <tr>\n",
Expand Down Expand Up @@ -232,7 +232,7 @@
"\n",
"<br>\n",
"\n",
"<ins>**{class}`nf_rnaseq.api_schema.API.APIClientPOST`**</ins>\n",
"<ins>**{class}`APIClientPOST`**</ins>\n",
"\n",
"Child class of `APIClient` that provides basic `POST` functionality for HTTP requests\n",
"\n",
Expand All @@ -245,7 +245,7 @@
"source": [
"## BioMart\n",
"\n",
"{class}`nf_rnaseq.biomart.BioMart` is a child class of can be used to retrieve multiple comma-delimited entries from [Ensembl's BioMart](https://useast.ensembl.org/info/data/biomart/index.html). Note that the following will produce a `requests.exceptions.JSONDecodeError` but that the results of the API query will be stored in the `text` property of the {class}`nf_rnaseq.biomart.BioMart` object instead of in the `json` property as a result."
"{class}`BioMart` is a child class of can be used to retrieve multiple comma-delimited entries from [Ensembl's BioMart](https://useast.ensembl.org/info/data/biomart/index.html). Note that the following will produce a `requests.exceptions.JSONDecodeError` but that the results of the API query will be stored in the `text` property of the {class}`BioMart` object instead of in the `json` property as a result."
]
},
{
Expand Down Expand Up @@ -364,7 +364,7 @@
"source": [
"## HGNC\n",
"\n",
"{class}`nf_rnaseq.hgnc.HGNC` can be used to retrieve single entries from the Human Genome Nomenclature Committee's (HGNC) [API](https://www.genenames.org/help/rest). Allowable searchable fields can be found on their website."
"{class}`HGNC` can be used to retrieve single entries from the Human Genome Nomenclature Committee's (HGNC) [API](https://www.genenames.org/help/rest). Allowable searchable fields can be found on their website."
]
},
{
Expand Down Expand Up @@ -440,7 +440,7 @@
"\n",
"### Single entry retrieval\n",
"\n",
"{class}`nf_rnaseq.uniprot.UniProt` can be used to retrieve single entries from UniProtKB's [individual entry API](https://www.uniprot.org/help/api_retrieve_entries)."
"{class}`UniProt` can be used to retrieve single entries from UniProtKB's [individual entry API](https://www.uniprot.org/help/api_retrieve_entries)."
]
},
{
Expand Down Expand Up @@ -514,7 +514,7 @@
"source": [
"### Bulk entry retrieval\n",
"\n",
"A combination of {class}`nf_rnaseq.uniprot.UniProtGET` and {class}`nf_rnaseq.uniprot.UniProtGET` can be used to retrieve a large number of entries from UniProtKB's [ID mapping API](https://www.uniprot.org/help/id_mapping)."
"A combination of {class}`UniProtPOST` and {class}`UniProtGET` can be used to retrieve a large number of entries from UniProtKB's [ID mapping API](https://www.uniprot.org/help/id_mapping)."
]
},
{
Expand Down Expand Up @@ -620,10 +620,15 @@
"source": [
"## Command line script\n",
"\n",
"The package also provides a command line \n",
"The package also provides a command line script with the following inputs:\n",
"\n",
"- `cachePath`: path to store `requests_cache` object\n",
"\n",
"- `database`: keys in {dict}`variables.DICT_DATABASES` (BioMart, HGNC, UniProt, UniProtBULK)\n",
"\n",
"- `input`: identifier or comma delimited list of identifiers\n",
"- `database`: keys in {dict}`nf_rnaseq.variables.DICT_DATABASES` (BioMart, HGNC, UniProt, UniProtBULK)\n",
"\n",
"- `tsv`: a `store_true` flag; if True save as TSV otherwise save as CSV\n",
"\n",
"### CSV output\n",
"```\n",
Expand Down

0 comments on commit f410b7b

Please sign in to comment.