An open API service indexing awesome lists of open source software.

https://github.com/hubmapconsortium/hubmap-api-py-client

Python client for the Cells API
https://github.com/hubmapconsortium/hubmap-api-py-client

hidivelab ot2od030545

Last synced: 14 days ago
JSON representation

Python client for the Cells API

Awesome Lists containing this project

README

          

Help on class ExternalClient in hubmap_api_py_client:

hubmap_api_py_client.Client = class ExternalClient(builtins.object)
| hubmap_api_py_client.Client(base_url)
|
| The Client provides methods for querying different entity types.
| The methods return ResultSets which can be combined with set operators,
| and then finally evaluated to get the actual data.
|
| Methods defined here:
|
| __init__(self, base_url)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| get_bounds(self, modality=None, var_id=None)
| Gets the minimum and maximum value for a given modality, or a given gene/protein in a given modality.
| Args:
| modality (str): Required. The data modality for which the maximum value will be returned.
| Must be one of ['atac', 'codex', 'rna'].
| var_id (str): Optional. A gene_symbol or protein_id. If provided, the maximum value for that
| gene or protein in the specified modality will be returned
|
| Returns:
| dict
|
| select_cells lambda self, where=None, has=None, genomic_modality=None, logical_operator=None
| Select a set of cells. If no params are provided, selects the set of all cells.
| Otherwise, selects a set of cells filtered based on parameters supplied.
|
| Args:
| where (str): The type of entity for which identifiers are supplied as input to query
| Must be one of ["cell", "gene", "protein", "organ", "dataset"]
| has (List[str]): A list of entity identifiers (gene symbols, organ names, dataset UUIDS,
| etc) or expressions (i.e. "Ki67 > 1000) supplied as input to the query.
| genomic_modality (str): Modality to consider in quantitative queries.
| Required for queries in which "where" is "gene". Must be one of ["rna", "atac"].
| logical_operator (str): The logical operator applied to filters generated by elements of
| "has". Required for queries in which "where" is "gene" or "protein" and "has" contains
| more than one element. Must be one of ["and", "or"].
|
| Returns:
| ResultsSet
|
| select_celltypes lambda self, where=None, has=None
| Select a set of cell types. If no params are provided, selects the set of all cell types.
| Otherwise, selects a set of cell types filtered based on parameters supplied.
|
| Args:
| where (str): The type of entity for which identifiers are supplied as input to query
| Must be one of ["celltype", "dataset", "organ"].
| has (List[str]): A list of entity identifiers supplied as input to the query.
|
| Returns:
| ResultsSet
|
| select_clusters lambda self, where=None, has=None, genomic_modality=None, p_value=None, logical_operator=None
| Select a set of clusters. If no params are provided, selects the set of all clusters.
| Otherwise, selects a set of clusters filtered based on parameters supplied.
|
| Args:
| where (str): The type of entity for which identifiers are supplied as input to query.
| Must be one of ["gene", "cluster", "dataset"].
| has (List[str]): A list of entity identifiers (gene symbol, dataset uuid, etc) supplied
| as input to the query.
| genomic_modality (str): Modality to consider for quantitative queries.
| Required for queries in which "where" is "gene". Must be one of ["rna", "atac"].
| p_value (float): Threshold of significance applied to gene-cluster associations.
| Required for queries in which "where" is "gene." Must be between 0 and 1.
| logical_operator (str): The logical operator applied to filters generated by elements of
| "has." Required for queries in which "where" is "gene" and "has" contains
| more than one element. Must be one of ["and", "or"].
|
| Returns:
| ResultsSet
|
| select_datasets lambda self, where=None, has=None, genomic_modality=None, logical_operator=None, min_cell_percentage=None
| Select a set of datasets. If no params are provided, selects the set of all datasets.
| Otherwise, selects a set of datasets filtered based on parameters supplied.
|
| Args:
| where (str): The type of entity for which identifiers are supplied as input to query.
| Must be one of ["dataset", "cell", "cluster"].
| has (List[str]): A list of entity identifiers or expressions (dataset_uuids, etc) supplied as
| input to the query.
| genomic_modality (str): Modality to consider in quantitative queries.
| Required for queries in which "where" is "gene". Must be one of ["rna", "atac"].
| min_cell_percentage (float): Minimum percentage of cells which must satisfy the quantitative
| expression in "has"
| Returns:
| ResultsSet
|
| select_genes lambda self, where=None, has=None, genomic_modality=None, p_value=None, logical_operator=None
| Select a set of genes. If no params are provided, selects the set of all genes.
| Otherwise, selects a set of genes filtered based on parameters supplied.
| where (str): The type of entity for which identifiers are supplied as input to query
| Must be one of ["gene", "organ", "cluster"].
| has (List[str]): A list of entity identifiers (gene_symbols, organ_names, etc) supplied as
| input to the query.
| genomic_modality (str): Modality to consider for quantitative queries.
| Required for queries in which "where" is "organ" or "cluster".
| Must be one of ["rna", "atac"].
| p_value (float): Threshold of significance applied to gene-organ and gene-cluster
| associations. Required for queries in which "where" is "organ" or "cluster."
| Must be between 0 and 1.
| logical_operator (str): The logical operator applied to filters generated by elements of
| "has". Required for queries in which "where" is "organ" or "cluster" and
| "has" contains more than one element. Must be one of ["and", "or"].
|
| Returns:
| ResultsSet
|
| select_organs lambda self, where=None, has=None, genomic_modality=None, p_value=None, logical_operator=None
| Select a set of organs. If no params are provided, selects the set of all organs.
| Otherwise, selects a set of organs filtered based on parameters supplied.
|
| Args:
| where (str): The type of entity for which identifiers are supplied as input to query
| Must be one of ["gene", "organ"].
| has (List[str]): A list of entity identifiers (gene_symbols, organ_names) supplied as input
| to the query.
| genomic_modality (str): Modality to consider for quantitative queries.
| Required for queries in which "where" is "gene". Must be one of ["rna", "atac"].
| p_value (float): Threshold of significance applied to gene-organ associations.
| Required for queries in which "where" is "gene." Must be between 0 and 1.
| logical_operator (str): The logical operator applied to filters generated by elements of
| "has". Required for queries in which "where" is "gene" and "has" contains more than
| one element. Must be one of ["and", "or"].
|
| Returns:
| ResultsSet
|
| select_proteins lambda self, where=None, has=None
| Select a set of proteins. If no params are provided, selects the set of all proteins.
| Otherwise, selects a set of proteins filtered based on parameters supplied.
|
| Args:
| where (str): The type of entity for which identifiers are supplied as input to query
| Must be one of ["protein"].
| has (List[str]): A list of entity identifiers (protein ids) supplied as input to the query.
|
| Returns:
| ResultsSet
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)