diff --git a/docs/notebooks/example.ipynb b/docs/notebooks/example.ipynb index 12a4e1e..36a2013 100644 --- a/docs/notebooks/example.ipynb +++ b/docs/notebooks/example.ipynb @@ -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." ] @@ -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", - "**{class}`nf_rnaseq.api_schema.APIClient`**\n", + "**{class}`APIClient`**\n", "\n", "Parent Class that governs all shared API client properties and functions\n", " \n", @@ -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", "\n", " \n", @@ -167,7 +167,7 @@ "\n", "
\n", "\n", - "**{class}`nf_rnaseq.api_schema.API.APIClientGET`**\n", + "**{class}`APIClientGET`**\n", "\n", "Child class of `APIClient` that provides basic `GET` functionality for HTTP requests\n", "\n", @@ -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", "
\n", " \n", @@ -232,7 +232,7 @@ "\n", "
\n", "\n", - "**{class}`nf_rnaseq.api_schema.API.APIClientPOST`**\n", + "**{class}`APIClientPOST`**\n", "\n", "Child class of `APIClient` that provides basic `POST` functionality for HTTP requests\n", "\n", @@ -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." ] }, { @@ -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." ] }, { @@ -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)." ] }, { @@ -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)." ] }, { @@ -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",