Skip to content

Commit f96e35f

Browse files
committed
added title and version to reference file objs
1 parent 7199e39 commit f96e35f

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

pipeline_utils/lib/yaml_parser.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,12 @@ def to_json(
645645
if getattr(self, self.CODE_SCHEMA, None):
646646
ref_json[self.CODE_SCHEMA] = self.code
647647

648+
# title
649+
ref_json[self.TITLE_SCHEMA] = self._link_title(self.name)
650+
651+
# version
652+
ref_json[self.VERSION_SCHEMA] = self.version
653+
648654
return ref_json
649655

650656

tests/repo_correct/portal_objects/file_reference.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ type:
3030
description: hg38 full reference genome plus decoy for CGAP, fasta format
3131
format: fa
3232
version: hg38
33+
title: "GENOME"

tests/test_yaml_file_reference.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ def test_file_reference():
2424
"uuid": "1936f246-22e1-45dc-bb5c-9cfd55537fe7",
2525
"data_category": ["Sequencing Reads"],
2626
"data_type": ["Unaligned Reads"],
27-
"variant_type": ["SNV"]
27+
"variant_type": ["SNV"],
28+
"version": "hg38",
29+
"title": "reference genome"
2830
},
2931
{
3032
"aliases": ["cgap-core:ReferenceFile-reference_genome_hg38"],
@@ -34,7 +36,9 @@ def test_file_reference():
3436
"consortia": ["cgap-core"],
3537
"status": None,
3638
"data_category": ["Sequencing Reads"],
37-
"data_type": ["Aligned Reads"]
39+
"data_type": ["Aligned Reads"],
40+
"version": "hg38",
41+
"title": "GENOME"
3842
}
3943
]
4044

0 commit comments

Comments
 (0)