qsprpred.data.sources package

Subpackages

Submodules

qsprpred.data.sources.data_source module

class qsprpred.data.sources.data_source.DataSource[source]

Bases: ABC

General definition of a data source. It is essentially a factory for creating MoleculeTable and QSPRDataSet instances.

abstract getData(name: str | None = None, **kwargs) MoleculeTable[source]

Get the molecule data from the source as a MoleculeTable.

Parameters:
  • name (str, optional) – The name of the dataset.

  • kwargs – Additional keyword arguments to pass to the method.

Returns:

The molecule data.

Return type:

MoleculeTable

getDataSet(target_props: list[TargetSpec | dict], name: str | None = None, **kwargs) QSPRTable[source]

Get the dataset from the source as a QSPRDataSet. Essentially just creates a QSPRDataSet from the MoleculeTable obtained from the getData method.

Parameters:
  • target_props (list[TargetProperty | dict]) – The target properties to add.

  • name (str, optional) – The name of the dataset.

  • kwargs – Additional keyword arguments to pass to the getData method and the QSPRDataSet constructor.

Returns:

The dataset.

Return type:

QSPRDataSet

Module contents

class qsprpred.data.sources.DataSource[source]

Bases: ABC

General definition of a data source. It is essentially a factory for creating MoleculeTable and QSPRDataSet instances.

abstract getData(name: str | None = None, **kwargs) MoleculeTable[source]

Get the molecule data from the source as a MoleculeTable.

Parameters:
  • name (str, optional) – The name of the dataset.

  • kwargs – Additional keyword arguments to pass to the method.

Returns:

The molecule data.

Return type:

MoleculeTable

getDataSet(target_props: list[TargetSpec | dict], name: str | None = None, **kwargs) QSPRTable[source]

Get the dataset from the source as a QSPRDataSet. Essentially just creates a QSPRDataSet from the MoleculeTable obtained from the getData method.

Parameters:
  • target_props (list[TargetProperty | dict]) – The target properties to add.

  • name (str, optional) – The name of the dataset.

  • kwargs – Additional keyword arguments to pass to the getData method and the QSPRDataSet constructor.

Returns:

The dataset.

Return type:

QSPRDataSet