Skip to content

Commit

Permalink
Add coordinate stub on gene variant creation
Browse files Browse the repository at this point in the history
  • Loading branch information
susannasiebert committed Oct 2, 2024
1 parent 17f0c39 commit 2d1066e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions server/app/models/activities/create_variant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,19 @@ def call_actions

@variant = cmd.variant
@molecular_profile = cmd.molecular_profile

stub_coordinates
variant.save!

events << cmd.events
end

def stub_coordinates
if variant.type == 'Variants::GeneVariant'
variant.coordinates = VariantCoordinate.generate_stub(variant, 'Gene Variant Coordinate')
end
end

def linked_entities
molecular_profile
end
Expand Down

0 comments on commit 2d1066e

Please sign in to comment.