Skip to content

Commit

Permalink
added title and version to reference file objs
Browse files Browse the repository at this point in the history
  • Loading branch information
B3rse committed Dec 6, 2024
1 parent 7199e39 commit f96e35f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions pipeline_utils/lib/yaml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,12 @@ def to_json(
if getattr(self, self.CODE_SCHEMA, None):
ref_json[self.CODE_SCHEMA] = self.code

# title
ref_json[self.TITLE_SCHEMA] = self._link_title(self.name)

# version
ref_json[self.VERSION_SCHEMA] = self.version

return ref_json


Expand Down
1 change: 1 addition & 0 deletions tests/repo_correct/portal_objects/file_reference.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ type:
description: hg38 full reference genome plus decoy for CGAP, fasta format
format: fa
version: hg38
title: "GENOME"
8 changes: 6 additions & 2 deletions tests/test_yaml_file_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ def test_file_reference():
"uuid": "1936f246-22e1-45dc-bb5c-9cfd55537fe7",
"data_category": ["Sequencing Reads"],
"data_type": ["Unaligned Reads"],
"variant_type": ["SNV"]
"variant_type": ["SNV"],
"version": "hg38",
"title": "reference genome"
},
{
"aliases": ["cgap-core:ReferenceFile-reference_genome_hg38"],
Expand All @@ -34,7 +36,9 @@ def test_file_reference():
"consortia": ["cgap-core"],
"status": None,
"data_category": ["Sequencing Reads"],
"data_type": ["Aligned Reads"]
"data_type": ["Aligned Reads"],
"version": "hg38",
"title": "GENOME"
}
]

Expand Down

0 comments on commit f96e35f

Please sign in to comment.