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

When revising a fusion variant, allow for optional exon coordinates #1178

Merged
merged 1 commit into from
Jan 15, 2025
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 @@ -88,8 +88,10 @@ function formFieldConfig(
{
key: 'referenceBuild',
type: 'reference-build-select',
props: {
required: true,
expressions: {
'props.required': (field) =>
Boolean(field.model.fivePrimeTranscript) ||
Boolean(field.model.threePrimeTranscript),
},
},
{
Expand All @@ -107,7 +109,11 @@ function formFieldConfig(
label: 'Ensembl Version',
description:
'Enter a valid Ensembl database version (e.g. 75)',
required: true,
},
expressions: {
'props.required': (field) =>
Boolean(field.model.fivePrimeTranscript) ||
Boolean(field.model.threePrimeTranscript),
},
},
],
Expand All @@ -125,11 +131,14 @@ function formFieldConfig(
type: 'base-input',
props: {
label: "5' Transcript",
required: !fivePrimeDisabled,
disabled: fivePrimeDisabled,
tooltip:
"Specify a transcript ID, including version number (e.g. ENST00000348159.4) for the 5' exon you have selected",
},
expressions: {
'props.required': (field) =>
Boolean(field.model.fivePrimeExonEnd),
},
validators: {
isTranscriptId: {
expression: isEnsemblTranscript,
Expand All @@ -149,11 +158,14 @@ function formFieldConfig(
},
props: {
label: "5' End Exon",
required: !fivePrimeDisabled,
disabled: fivePrimeDisabled,
tooltip:
'The exon number counted from the 5’ end of the transcript.',
},
expressions: {
'props.required': (field) =>
Boolean(field.model.fivePrimeTranscript),
},
},
{
key: 'fivePrimeOffset',
Expand Down Expand Up @@ -205,7 +217,6 @@ function formFieldConfig(
key: 'threePrimeTranscript',
type: 'base-input',
props: {
required: !threePrimeDisabled,
disabled: threePrimeDisabled,
label: "3' Transcript",
tooltip:
Expand All @@ -218,6 +229,10 @@ function formFieldConfig(
"3' Transcript must be a valid, human, versioned, Ensembl transcript ID",
},
},
expressions: {
'props.required': (field) =>
Boolean(field.model.threePrimeExonStart),
},
},
{
key: 'threePrimeExonStart',
Expand All @@ -232,9 +247,12 @@ function formFieldConfig(
label: "3' Start Exon",
tooltip:
'The exon number counted from the 3’ end of the transcript.',
required: !threePrimeDisabled,
disabled: threePrimeDisabled,
},
expressions: {
'props.required': (field) =>
Boolean(field.model.threePrimeTranscript),
},
},
{
key: 'threePrimeOffset',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ def resolve(fields:, id:, organization_id: nil, comment: nil)
updated_variant.single_variant_molecular_profile_id = variant.single_variant_molecular_profile_id
updated_variant.feature = variant.feature
updated_variant.fusion = variant.feature.feature_instance
updated_variant.name = updated_variant.generate_name
if variant.name == 'Fusion'
updated_variant.name = 'Fusion'
else
updated_variant.name = updated_variant.generate_name
end
updated_variant.vicc_compliant_name = updated_variant.generate_vicc_name

variant_revisions_obj = Activities::RevisedObjectPair.new(existing_obj: variant, updated_obj: updated_variant)
Expand Down
Loading