vantage6.client.subclients.study.StudySubClient#

class StudySubClient(parent)#

Bases: SubClient

Subclient for the algorithm store.

__init__(parent)#

Methods

__init__(parent)

add_organization(organization[, study])

Add an organization to a study

create(name, organizations[, collaboration])

Create new study

delete([id_])

Deletes a study

get(id_)

Get a study by its id.

list([name, organization, ...])

View your studies

remove_organization(organization[, study])

Remove an organization from a study

update(id_[, name, organizations])

Update study information

add_organization(organization, study=None)#

Add an organization to a study

Parameters:
  • organization (int) – Id of the organization you want to add to the study

  • study (int, optional) – Id of the study you want to add the organization to.

Returns:

Containing the updated list of organizations in the study

Return type:

list[dict]

create(name, organizations, collaboration=None)#

Create new study

Parameters:
  • name (str) – Name of the study

  • organizations (list[int]) – List of organization ids which participate in the study

  • collaboration (int | None) – Id of the collaboration the study is part of. If None, the value of setup_collaboration() is used.

Returns:

Containing the new study information

Return type:

dict

delete(id_=None)#

Deletes a study

Parameters:

id (int) – Id of the study you want to delete

Returns:

Message from the server

Return type:

dict

get(id_)#

Get a study by its id.

Parameters:

id (int) – The id of the study

Returns:

The study

Return type:

dict

list(name=None, organization=None, include_organizations=False, page=1, per_page=20)#

View your studies

Parameters:
  • name (str, optional (with LIKE operator)) – Filter studies by name

  • organization (int, optional) – Filter studies by organization id

  • include_organizations (bool, optional) – Include organizations in the response, by default False

  • page (int, optional) – Pagination page, by default 1

  • per_page (int, optional) – Number of items on a single page, by default 20

Returns:

Containing collabotation information

Return type:

list[dict]

remove_organization(organization, study=None)#

Remove an organization from a study

Parameters:
  • organization (int) – Id of the organization you want to remove from the study

  • study (int, optional) – Id of the study you want to remove the organization from

Returns:

Containing the updated list of organizations in the study

Return type:

list[dict]

update(id_, name=None, organizations=None)#

Update study information

Parameters:
  • id (int) – Id of the study you want to update.

  • name (str, optional) – New name of the study

  • organizations (list[int], optional) – New list of organization ids which participate in the study

Returns:

Containing the updated study information

Return type:

dict