curate_gpt.wrappers.investigation package

Submodules

curate_gpt.wrappers.investigation.ess_deepdive_wrapper module

Chat with a KB.

class curate_gpt.wrappers.investigation.ess_deepdive_wrapper.ESSDeepDiveWrapper(source_locator=None, local_store=None, extractor=None, session=<factory>, limit=50)

Bases: BaseWrapper

A wrapper over the ESSDeepDive API.

default_object_type = 'Class'
limit: int = 50
name: ClassVar[str] = 'ess_deepdive'
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 fetch

  • kwargs

Return type:

Iterator[Dict]

Returns:

session: CachedSession
curate_gpt.wrappers.investigation.ess_deepdive_wrapper.get_records(session, cursor=1, limit=200, maximum=None)

Iterate through all records in ESSDeepDive and download them.

Parameters:

cursor

Return type:

Iterator[dict]

Returns:

curate_gpt.wrappers.investigation.fairsharing_wrapper module

Chat with a KB.

class curate_gpt.wrappers.investigation.fairsharing_wrapper.FAIRSharingWrapper(source_locator=None, local_store=None, extractor=None, session=<factory>, user=None, password=None, _jwt=None)

Bases: BaseWrapper

A wrapper over the NMDC Biosample API.

default_object_type = 'Metadata'
property jwt: str
name: ClassVar[str] = 'fairsharing'
object_by_id(object_id)
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 fetch

  • kwargs

Return type:

Iterator[Dict]

Returns:

password: str = None
session: CachedSession
user: str = None

curate_gpt.wrappers.investigation.jgi_wrapper module

Chat with a KB.

class curate_gpt.wrappers.investigation.jgi_wrapper.JGIWrapper(source_locator=None, local_store=None, extractor=None)

Bases: BaseWrapper

A wrapper to provide a search facade over JGI Data Search.

This is a dynamic wrapper: it can be used as a search facade, but cannot be ingested in whole.

Search an external source and return the results.

Parameters:
  • text (str)

  • kwargs

Return type:

List

Returns:

name: ClassVar[str] = 'jgi'

curate_gpt.wrappers.investigation.ncbi_bioproject_wrapper module

EUtils-based wrapper for studies in NCBI.

class curate_gpt.wrappers.investigation.ncbi_bioproject_wrapper.NCBIBioprojectWrapper(source_locator=None, local_store=None, extractor=None, eutils_client=None, session=<factory>, _uses_cache=False)

Bases: EUtilsWrapper

A wrapper to provide a search facade over NCBI bioproject.

This is a dynamic wrapper: it can be used as a search facade, but cannot be ingested in whole.

default_object_type = 'Study'
eutils_db: ClassVar[str] = 'bioproject'
id_prefix: ClassVar[str] = 'bioproject'
name: ClassVar[str] = 'ncbi_bioproject'
objects_from_dict(results)
Return type:

List[Dict]

curate_gpt.wrappers.investigation.ncbi_biosample_wrapper module

Chat with a KB.

class curate_gpt.wrappers.investigation.ncbi_biosample_wrapper.NCBIBiosampleWrapper(source_locator=None, local_store=None, extractor=None, eutils_client=None, session=<factory>, _uses_cache=False)

Bases: EUtilsWrapper

A wrapper to provide a search facade over NCBI Biosample.

This is a dynamic wrapper: it can be used as a search facade, but cannot be ingested in whole.

default_object_type = 'Sample'
eutils_db: ClassVar[str] = 'biosample'
id_prefix: ClassVar[str] = 'biosample'
name: ClassVar[str] = 'ncbi_biosample'
objects_from_dict(results)
Return type:

List[Dict]

curate_gpt.wrappers.investigation.nmdc_wrapper module

Chat with a KB.

class curate_gpt.wrappers.investigation.nmdc_wrapper.NMDCWrapper(source_locator=None, local_store=None, extractor=None, _label_adapter=None)

Bases: BaseWrapper

A wrapper over the NMDC Biosample API.

default_object_type = 'BioSample'
property label_adapter: BasicOntologyInterface

Get the label adapter.

name: ClassVar[str] = 'nmdc'
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 fetch

  • kwargs

Return type:

Iterator[Dict]

Returns:

curate_gpt.wrappers.investigation.nmdc_wrapper.get_samples(cursor=1, limit=200, maximum=None)

Iterate through all samples in NMDC and download them.

Parameters:

cursor

Return type:

Iterator[dict]

Returns:

Module contents