Skip to content

Data Export

Exporting sample deliverables to S3

This shortcut enables the user to export all or a subset of sample deliverables to AWS S3 created by Gencove's analysis pipeline.

The shortcut's input_helper() method accepts:

  • Gencove project id
  • Optional list of file types
  • Optional list of sample statuses; if not defined otherwise, only succeeded samples are used

and returns a dictionary containing a list of Sample objects from the Gencove platform.

Alternatively, the user may provide a list of Sample objects to the shortcut without using input_helper().

If the user is copying the files to a bucket that is outside of Explorer workspace, standard AWS credentials need to be provided.

from gencove_explorer_library.shortcuts.export_sample_deliverables import ExportSampleDeliverablesToS3

input_parameters = ExportSampleDeliverablesToS3.input_helper("aa3a46e0-c390-4943-b613-26f9908367d5")

export = ExportSampleDeliverablesToS3(
    s3_path="s3://bucket/prefix/",
    aws_session_configuration={
        "aws_access_key_id": "AKIA...",
        "aws_secret_access_key": "123...",
    },
    **input_parameters,
).run()

Exporting sample deliverables to Azure

This shortcut enables the user to export all or a subset of sample deliverables to Microsoft Azure Storage created by Gencove's analysis pipeline.

The shortcut's input_helper() method accepts:

  • Gencove project id
  • Optional list of file types
  • Optional list of sample statuses; if not defined otherwise, only succeeded samples are used

and returns a dictionary containing a list of Sample objects from the Gencove platform.

Alternatively, the user may provide a list of Sample objects to the shortcut without using input_helper().

In order to be able to upload to Azure Storage, the user needs to provide a connection string.

from gencove_explorer_library.shortcuts.export_sample_deliverables import ExportSampleDeliverablesToAzureStorage

input_parameters = ExportSampleDeliverablesToAzureStorage.input_helper("aa3a46e0-c390-4943-b613-26f9908367d5")

export = ExportSampleDeliverablesToAzureStorage(
    azure_container_name="my-container",
    azure_blob_path="foo/bar/baz",
    azure_connection_string="DefaultEndpointsProtocol=https;AccountName=storagesample;AccountKey=<account-key>",
    **input_parameters,
).run()

Exporting sample deliverables to GCP

This shortcut enables the user to export all or a subset of sample deliverables to GCP Cloud Storage created by Gencove's analysis pipeline.

The shortcut's input_helper() method accepts:

  • Gencove project id
  • Optional list of file types
  • Optional list of sample statuses; if not defined otherwise, only succeeded samples are used

and returns a dictionary containing a list of Sample objects from the Gencove platform.

Alternatively, the user may provide a list of Sample objects to the shortcut without using input_helper().

In order to be able to upload to GCP Storage, the user needs to provide a path to a GCP service account JSON credentials file.

from gencove_explorer_library.shortcuts.export_sample_deliverables import ExportSampleDeliverablesToGCPStorage

input_parameters = ExportSampleDeliverablesToGCPStorage.input_helper("aa3a46e0-c390-4943-b613-26f9908367d5")

export = ExportSampleDeliverablesToGCPStorage(
    storage_bucket="my-bucket",
    storage_path="foo/bar/baz",
    gcp_service_account_json_path="credentials.json",
    **input_parameters,
).run()