Skip to content

Commit

Permalink
Metadata schema updates (#140)
Browse files Browse the repository at this point in the history
* Change process/protocol_type to type

* Change file_format to format

* Fix unit tests

* Update pipeline-tools version
  • Loading branch information
samanehsan authored Apr 30, 2019
1 parent 27ce0e9 commit c09cfa4
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion adapter_pipelines/Optimus/adapter.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ workflow AdapterOptimus {
Int max_cromwell_retries = 0
Boolean add_md5s = false
String pipeline_tools_version = "v0.48.3"
String pipeline_tools_version = "v0.49.0"
call GetInputs as prep {
input:
Expand Down
2 changes: 1 addition & 1 deletion adapter_pipelines/cellranger/adapter.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ workflow Adapter10xCount {
Int max_cromwell_retries = 0
Boolean add_md5s = false
String pipeline_tools_version = "v0.48.3"
String pipeline_tools_version = "v0.49.0"
call GetInputs {
input:
Expand Down
2 changes: 1 addition & 1 deletion adapter_pipelines/ss2_single_sample/adapter.wdl
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ workflow AdapterSmartSeq2SingleCell{
Int max_cromwell_retries = 0
Boolean add_md5s = false
String pipeline_tools_version = "v0.48.3"
String pipeline_tools_version = "v0.49.0"
call GetInputs as prep {
input:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"AdapterSmartSeq2SingleCell.reference_bundle": "bf51d668-3e14-4843-9bc7-5d676fdf0e01",
"AdapterSmartSeq2SingleCell.format_map": "gs://hca-dcp-mint-test-data/adapters/file_format_map.json",
"AdapterSmartSeq2SingleCell.method": "SmartSeq2SingleCell",
"AdapterSmartSeq2SingleCell.analysis_file_version": "5.3.6",
"AdapterSmartSeq2SingleCell.analysis_protocol_schema_version": "8.0.7",
"AdapterSmartSeq2SingleCell.analysis_process_schema_version": "9.0.0",
"AdapterSmartSeq2SingleCell.analysis_file_version": "6.0.0",
"AdapterSmartSeq2SingleCell.analysis_protocol_schema_version": "9.0.0",
"AdapterSmartSeq2SingleCell.analysis_process_schema_version": "11.0.1",
"AdapterSmartSeq2SingleCell.run_type": "run",
"AdapterSmartSeq2SingleCell.add_md5s": false
}
6 changes: 3 additions & 3 deletions pipeline_tools/create_analysis_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def create_analysis_process(
),
'schema_type': SCHEMA_TYPE,
'process_core': get_analysis_process_core(analysis_workflow_id=analysis_id),
'process_type': get_analysis_process_type(),
'type': get_analysis_process_type(),
'timestamp_start_utc': format_timestamp(workflow_metadata.get('start')),
'timestamp_stop_utc': format_timestamp(workflow_metadata.get('end')),
'input_bundles': input_bundles_string.split(','),
Expand Down Expand Up @@ -110,7 +110,7 @@ def create_analysis_protocol(
'schema_type': SCHEMA_TYPE,
'protocol_core': get_analysis_protocol_core(pipeline_version=pipeline_version),
'computational_method': method,
'protocol_type': get_analysis_protocol_type(),
'type': get_analysis_protocol_type(),
}
return analysis_protocol

Expand Down Expand Up @@ -161,7 +161,7 @@ def get_outputs(output_urls, extension_to_format, schema_url, analysis_file_vers
'schema_type': 'file',
'file_core': {
'file_name': output_url.split('/')[-1],
'file_format': get_file_format(output_url, extension_to_format),
'format': get_file_format(output_url, extension_to_format),
},
}
for output_url in sorted(output_urls)
Expand Down
12 changes: 6 additions & 6 deletions pipeline_tools/tests/test_create_analysis_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Data:
'schema_type': 'file',
'file_core': {
'file_name': 'Aligned.sortedByCoord.out.bam',
'file_format': 'bam',
'format': 'bam',
'checksum': '0123456789abcdef0123456789abcdef',
},
},
Expand All @@ -29,7 +29,7 @@ class Data:
'schema_type': 'file',
'file_core': {
'file_name': 'GSM1957573_rna_metrics',
'file_format': 'metrics',
'format': 'metrics',
'checksum': 'abcdef0123456789abcdef0123456789',
},
},
Expand Down Expand Up @@ -257,8 +257,8 @@ def verify_outputs(
assert output_json[0]['describedBy'] == schema_url
assert output_json[0]['schema_type'] == 'file'
assert (
output_json[0]['file_core']['file_format']
== expected_outputs[0]['file_core']['file_format']
output_json[0]['file_core']['format']
== expected_outputs[0]['file_core']['format']
)
assert (
output_json[0]['file_core']['file_name']
Expand All @@ -272,8 +272,8 @@ def verify_outputs(
assert output_json[0]['describedBy'] == schema_url
assert output_json[1]['schema_type'] == 'file'
assert (
output_json[1]['file_core']['file_format']
== expected_outputs[1]['file_core']['file_format']
output_json[1]['file_core']['format']
== expected_outputs[1]['file_core']['format']
)
assert (
output_json[1]['file_core']['file_name']
Expand Down
6 changes: 3 additions & 3 deletions pipeline_tools/tests/test_create_envelope.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def _request_callback(request, context):
'schema_type': 'file',
'file_core': {
'file_name': 'test',
'file_format': 'bam',
'format': 'bam',
'checksum': '0123456789abcdef0123456789abcdef',
},
}
Expand All @@ -467,7 +467,7 @@ def _request_callback(request, context):
'schema_type': 'file',
'file_core': {
'file_name': 'test',
'file_format': 'bam',
'format': 'bam',
'checksum': '0123456789abcdef0123456789abcdef',
},
}
Expand All @@ -492,7 +492,7 @@ def _request_callback(request, context):
'schema_type': 'file',
'file_core': {
'file_name': 'test',
'file_format': 'bam',
'format': 'bam',
'checksum': '0123456789abcdef0123456789abcdef',
},
}
Expand Down

0 comments on commit c09cfa4

Please sign in to comment.