curategpt.wrappers.bio package
Submodules
curategpt.wrappers.bio.alliance_gene_wrapper module
Chat with a KB.
- class curategpt.wrappers.bio.alliance_gene_wrapper.AllianceGeneWrapper(source_locator=None, local_store=None, extractor=None, _label_adapter=None, taxon_id='NCBITaxon:9606')
Bases:
BaseWrapper
A wrapper over a Alliance (AGR) gene API.
In future this may be extended to other objects.
- default_object_type = 'Gene'
-
name:
ClassVar
[str
] = 'alliance_gene'
- object_ids(taxon_id=None, **kwargs)
Get all gene ids for a given taxon id
- Parameters:
taxon_id (
Optional
[str
])kwargs
- Return type:
Iterator
[str
]- Returns:
- objects(collection=None, object_ids=None, **kwargs)
All genes
- Parameters:
collection (
Optional
[str
])object_ids (
Optional
[Iterable
[str
]])kwargs
- Return type:
Iterator
[Dict
]- Returns:
-
taxon_id:
str
= 'NCBITaxon:9606'
curategpt.wrappers.bio.bacdive_wrapper module
Wrapper for JSON (or YAML) documents.
- class curategpt.wrappers.bio.bacdive_wrapper.BacDiveWrapper(source_locator=None, local_store=None, extractor=None, format=None, path_expression=None)
Bases:
BaseWrapper
A wrapper over a bacdive json files.
This is a static wrapper: it cannot be searched
- default_object_type = 'OrganismTaxon'
-
format:
str
= None
-
name:
ClassVar
[str
] = 'bacdive'
- objects(collection=None, object_ids=None, **kwargs)
Return all objects in the view.
- Parameters:
collection (
Optional
[str
])object_ids (
Optional
[Iterable
[str
]]) – Optional list of IDs to fetchkwargs
- Return type:
Iterator
[Dict
]- Returns:
-
path_expression:
str
= None
- prefix: ClassVar[str] = 'bacdive'
- wrap_object(obj)
Convert an object from the source representation to the store representation.
- Parameters:
obj (
Dict
)- Return type:
Iterator
[Dict
]- Returns:
curategpt.wrappers.bio.gocam_wrapper module
- class curategpt.wrappers.bio.gocam_wrapper.GOCAMWrapper(source_locator=None, local_store=None, extractor=None, _label_adapter=None, pubmed_wrapper=None, ro_adapter=None, session=<factory>, include_standard_annotations=False, **_kwargs)
Bases:
BaseWrapper
An view over a GO CAM source.
- default_object_type = 'Pathway'
-
include_standard_annotations:
bool
= False
- property label_adapter: BasicOntologyInterface
Get the label adapter.
-
name:
ClassVar
[str
] = 'gocam'
- object_by_id(object_id)
- Return type:
Optional
[Dict
]
- object_from_dict(obj)
- Return type:
Optional
[Dict
]
- objects(collection=None, object_ids=None, **kwargs)
Return all objects in the view.
- Parameters:
collection (
Optional
[str
])object_ids (
Optional
[Iterable
[str
]]) – Optional list of IDs to fetchkwargs
- Return type:
Iterator
[Dict
]- Returns:
-
pubmed_wrapper:
PubmedWrapper
= None
-
ro_adapter:
BasicOntologyInterface
= None
-
session:
Session
curategpt.wrappers.bio.mediadive_wrapper module
- class curategpt.wrappers.bio.mediadive_wrapper.MediaDiveWrapper(source_locator=None, local_store=None, extractor=None, _label_adapter=None)
Bases:
BaseWrapper
A wrapper over MediaDive.
- default_object_type = 'ComplexMixture'
-
name:
ClassVar
[str
] = 'mediadive'
- object_ids(**kwargs)
Get all medium ids in database
- Parameters:
kwargs
- Return type:
Iterator
[str
]- Returns:
- objects(collection=None, object_ids=None, **kwargs)
All media
- Parameters:
collection (
Optional
[str
])object_ids (
Optional
[Iterable
[str
]]) – optional list of object ids to retrieve (if None, all objects are retrieved)kwargs
- Return type:
Iterator
[Dict
]- Returns:
curategpt.wrappers.bio.omicsdi_wrapper module
Chat with a KB.
- class curategpt.wrappers.bio.omicsdi_wrapper.OmicsDIWrapper(source_locator=None, local_store=None, extractor=None, source=None)
Bases:
BaseWrapper
A wrapper to provide a search facade over OMICS DI Search.
This is a dynamic wrapper: it can be used as a search facade, but cannot be ingested in whole.
- additional_info(local_id, source)
Augment the local ID with information from the database.
- default_object_type = 'Dataset'
- external_search(text, expand=False, where=None, **kwargs)
Search the OmicsDI database for the given text.
TODO: full text retrieval doesn’t seem to work well
- Return type:
List
[Dict
]
-
name:
ClassVar
[str
] = 'omicsdi'
- objects_by_ids(ids, source=None)
Augment the local ID with information from the database.
-
source:
str
= None
curategpt.wrappers.bio.reactome_wrapper module
Chat with a KB.
- class curategpt.wrappers.bio.reactome_wrapper.ReactomeWrapper(source_locator=None, local_store=None, extractor=None, _label_adapter=None, taxon_id='NCBITaxon:9606')
Bases:
BaseWrapper
A wrapper over a Reactome API.
- default_object_type = 'Event'
-
name:
ClassVar
[str
] = 'reactome'
- object_ids(taxon_id=None, **kwargs)
Get all object ids for a given taxon id
- Parameters:
taxon_id (
Optional
[str
])kwargs
- Return type:
Iterator
[str
]- Returns:
- objects(collection=None, object_ids=None, **kwargs)
All events
- Parameters:
collection (
Optional
[str
])object_ids (
Optional
[Iterable
[str
]])kwargs
- Return type:
Iterator
[Dict
]- Returns:
- prefix: ClassVar[str] = 'Reactome'
-
taxon_id:
str
= 'NCBITaxon:9606'
- curategpt.wrappers.bio.reactome_wrapper.generic_object(obj)
- curategpt.wrappers.bio.reactome_wrapper.ids_from_tree(objs)
Recursively yield all ids from a tree of objects
Note: may contain duplicates
- Parameters:
objs (
List
)- Returns:
- curategpt.wrappers.bio.reactome_wrapper.pub_object(obj)
- curategpt.wrappers.bio.reactome_wrapper.simple_entity_object(obj)
- curategpt.wrappers.bio.reactome_wrapper.term_object(obj)
curategpt.wrappers.bio.uniprot_wrapper module
Chat with a KB.
- class curategpt.wrappers.bio.uniprot_wrapper.UniprotWrapper(source_locator=None, local_store=None, extractor=None, _label_adapter=None, taxon_id=None, session=<factory>)
Bases:
BaseWrapper
A wrapper over the UniProt API.
- default_object_type = 'Protein'
-
name:
ClassVar
[str
] = 'uniprot'
- object_ids(taxon_id=None, **kwargs)
Get all gene ids for a given taxon id
- Parameters:
taxon_id (
Optional
[str
])kwargs
- Return type:
Iterator
[str
]- Returns:
- objects(collection=None, object_ids=None, **kwargs)
All proteins
- Return type:
Iterator
[Dict
]
- objects_by_ids(object_ids)
Return objects by their IDs.
- Parameters:
object_ids (
List
[str
])- Return type:
List
[Dict
]- Returns:
-
session:
CachedSession
-
taxon_id:
Optional
[str
] = None