Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup to rearrange the outputs for the ora compression manager #666

Merged
merged 4 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export class OraCompressionIcav2PipelineManagerStack extends cdk.Stack {
environment: {
ICAV2_ACCESS_TOKEN_SECRET_ID: icav2AccessTokenSecretObj.secretName,
},
timeout: Duration.seconds(60),
timeout: Duration.seconds(120),
memorySize: 1024,
});
// Give the lambda function access to the secret
Expand All @@ -248,6 +248,8 @@ export class OraCompressionIcav2PipelineManagerStack extends cdk.Stack {
)
),
definitionSubstitutions: {
__event_bus_name__: eventBusObj.eventBusName,
__detail_type__: this.globals.outputCompressionDetailType,
__merge_sizes_lambda_function_arn__: setMergeSizesLambdaObj.currentVersion.functionArn,
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def handler(events, context):

# Get analysis uri
analysis_uri = events.get("analysis_output_uri")
instrument_run_id = events.get("instrument_run_id")
portal_run_id = events.get("portal_run_id")

# Convert analysis uri to project folder object
analysis_project_data_obj = convert_uri_to_project_data_obj(analysis_uri)
Expand All @@ -87,19 +87,19 @@ def handler(events, context):
parent_folder_id=analysis_project_data_obj.data.id,
)

# Get multiqc directory
# Get instrument run id
try:
instrument_run_id_project_data_obj: ProjectData = next(
filter(
lambda project_data_iter: (
project_data_iter.data.details.name == instrument_run_id and
project_data_iter.data.details.name == portal_run_id and
DataType[project_data_iter.data.details.data_type] == DataType.FOLDER
),
analysis_top_level_data_list
)
)
except StopIteration:
raise ValueError(f"instrument run id directory '{instrument_run_id}' not found in '{analysis_uri}'")
raise ValueError(f"output directory '{portal_run_id}' not found in '{analysis_uri}'")

return {
"instrument_run_ora_output_uri": convert_project_data_obj_to_uri(instrument_run_id_project_data_obj, UriType.S3),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"Get fastq files from fastq list csv": {
"Type": "Task",
"Resource": "arn:aws:states:::lambda:invoke",
"OutputPath": "$.Payload",
"Parameters": {
"Payload": {
"output_dir_uri.$": "$.payload.data.outputs.instrumentRunOraOutputUri"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"input_json": {
"instrument_run_directory": {
"class": "Directory",
"basename.$": "$.get_input_parameters_from_event.inputs.instrumentRunId",
"basename.$": "$.portal_run_id",
"location.$": "$.get_input_parameters_from_event.inputs.instrumentRunDirectoryUri"
},
"ora_reference": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"Parameters": {
"FunctionName": "${__set_outputs_json_lambda_function_arn__}",
"Payload": {
"instrument_run_id.$": "$.get_db_attributes_step.ready_event_data_inputs.instrumentRunId",
"portal_run_id.$": "$.portal_run_id",
"analysis_output_uri.$": "$.get_db_attributes_step.analysis_output_uri"
}
},
Expand Down