Skip to content

Reports

Reports

The OmixAtlas class contains functions which will enable users to generate reports, link reports to a dataset in OmixAtlas and fetch reports linked with dataset in an OmixAtlas.

Parameters:

Name Type Description Default
token str

token copy from polly.

required
Usage

from polly.OmixAtlas import OmixAtlas

omixatlas = OmixAtlas(token)

delete_linked_report(repo_key, dataset_id, report_id)

Delete the link of the report in workspaces with the specified dataset in OmixAtlas. On success displays a success message.

Parameters:

Name Type Description Default
repo_key str

repo_key(repo_name/repo_id) of the repository which is linked.

required
Dataset_id str

dataset_id of the dataset to be unlinked

required
Report_id str

report id associated with the report in workspaces that is to be deleted. This id can be found when invoking the fetch_linked_report() function.

required

Raises:

Type Description
InvalidParameterException

Invalid parameter passed

Returns:

Type Description
None

None

fetch_linked_reports(repo_key, dataset_id)

Fetch linked reports for a dataset_id in an omixatlas.

Parameters:

Name Type Description Default
repo_key str

repo_key(repo_name/repo_id) of the repository for which to fetch the report

required
Dataset_id str

dataset_id of the dataset which to fetch the reports.

required

Raises:

Type Description
InvalidParameterException

invalid parameters

RequestException

api request exception

UnauthorizedException

unauthorized to perform this action

Returns:

Type Description
pd.DataFrame

A Dataframe with the details of the linked reports - who added the report, when it was added and the link.

generate_report(repo_key, dataset_id, workspace_id, workspace_path='')

This function is used to generate a metadata distribution report for a dataset belonging to the geo repository. The generated report is then saved to the workspace provided. This is a MVP release to minimise time taken by users to determine relevance of a dataset in their research, we’re enabling auto-generation of reports. These reports will contain dataset and sample level metadata along with some graphs showing how the samples are distributed. It will help them figure out which cohorts could be of interest in a given dataset. This template can be modified and we’re open to user’s feedback. This report is available on the user’s local path as well as an option to upload the report to workspaces is given.

Parameters:

Name Type Description Default
repo_key str

repo_key(repo_name/repo_id) for which the report is to be generated

required
Dataset_id str

dataset_id for which the report is to be generated

required
Workspace_id str

workspace_id to where the report is to be uploaded

required
workspace_path str

workspace_path to which the report is to be uploaded

''

Raises:

Type Description
InvalidParameterException

Empty or Invalid Parameters

UnsupportedRepositoryException

repo other than GEO/ Unsupported repo

UnauthorizedException

unauthorized to perform this task

This function is used to link a file (html or pdf) present in a workspace with the specified dataset in OmixAtlas.
On success it displays the access key URL and a success message. Org admins can now link a report present in a workspace with the specified datasets in an OmixAtlas. Once a report is linked to a dataset in OmixAtlas, it can be fetched both from front-end and polly-python.

Parameters:

Name Type Description Default
repo_key str

repo_name/repo_id of the repository to be linked

required
dataset_id str

dataset_id of the dataset to be linked

required
workspace_id str

workspace_id for the file which is to be linked

required
workspace_path str

workspace_path for the file which is to be linked

required
access_key str

access_key (private or public) depending upon the link access type to be generated.

required

Raises:

Type Description
InvalidParameterException

invalid parameters

Returns:

Type Description
None

None

Examples