Skip to content

CivicGksMolecularProfile extension should not include coordinates that are all null #192

@korikuzma

Description

@korikuzma

if isinstance(variant.coordinates, Coordinate):
coords = variant.coordinates
extensions.append(
Extension(
name="CIViC representative coordinate",
value={
"chromosome": coords.chromosome,
"start": coords.start,
"stop": coords.stop,
"reference_bases": coords.reference_bases,
"variant_bases": coords.variant_bases,
"ensembl_version": coords.ensembl_version,
"representative_transcript": coords.representative_transcript,
"reference_build": coords.reference_build,
"type": coords.type,
},
)
)

There are some instances where this returns:

{
          "name": "CIViC representative coordinate",
          "value": {
            "chromosome": null,
            "start": null,
            "stop": null,
            "reference_bases": null,
            "variant_bases": null,
            "ensembl_version": null,
            "representative_transcript": null,
            "reference_build": null,
            "type": "coordinates"
          }
        }

This isn't really useful. We should either exclude this from the extensions entirely or just set the value to null. I think it's fine to exclude and assume it will only be present if there is at least one non-null value.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions