Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
susannasiebert committed Oct 20, 2023
2 parents 5562fcd + 23174c3 commit 219fb86
Show file tree
Hide file tree
Showing 10 changed files with 244 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<ng-container *ngIf="variantInfo.cosmicId; else noValue">
<cvc-link-tag
href="http://cancer.sanger.ac.uk/cosmic/mutation/overview?id={{
variantInfo.cosmicId
variantInfo.cosmicId.replace('COSM', '')
}}"
tooltip="View on COSMIC">
{{ variantInfo.cosmicId }}
Expand Down
2 changes: 1 addition & 1 deletion client/src/app/views/welcome/welcome.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class WelcomeComponent implements OnInit {
imageUrl: 'assets/images/2023-CGC-hackathon-attendees.jpg',
},
{
title: 'Introducing Molecular Profiles (HTML)',
title: 'Introducing Molecular Profiles',
date: '2023-01-09',
htmlText: `Today we have rolled out support for a new core concept in CIViC: <a href="https://civic.readthedocs.io/en/latest/model/molecular_profiles.html" target="_blank"> Molecular Profiles</a>. Molecular Profiles are logical combinations of one or more CIViC Variants. While most Molecular Profiles will consist of a single Variant (“Simple”) they will also allow users to build “Complex” (multi-variant) Molecular Profiles to associate Evidence with. These complex profiles expand the CIViC data model to allow for clinical significance to be evaluated within contexts such as variant co-occurrence or mutual exclusivity. Going forward, Evidence will be associated with a Molecular Profile rather than directly with a Variant. If you have any questions about this change, please feel free to <a href="mailto:[email protected]">contact us</a>. We have also prepared a <a href="https://www.youtube.com/watch?v=--i54jy746w" target="_blank" >video</a > explaining this new feature.`,
link: {
Expand Down
120 changes: 85 additions & 35 deletions client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,14 @@
dependencies:
"@babel/highlight" "^7.18.6"

"@babel/code-frame@^7.22.13":
version "7.22.13"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e"
integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==
dependencies:
"@babel/highlight" "^7.22.13"
chalk "^2.4.2"

"@babel/code-frame@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.5.tgz#234d98e1551960604f1246e6475891a570ad5658"
Expand Down Expand Up @@ -431,7 +439,7 @@
"@jridgewell/gen-mapping" "^0.3.2"
jsesc "^2.5.1"

"@babel/generator@^7.22.5", "@babel/generator@^7.22.7":
"@babel/generator@^7.22.5":
version "7.22.9"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.9.tgz#572ecfa7a31002fa1de2a9d91621fd895da8493d"
integrity sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==
Expand All @@ -441,6 +449,16 @@
"@jridgewell/trace-mapping" "^0.3.17"
jsesc "^2.5.1"

"@babel/generator@^7.23.0":
version "7.23.0"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420"
integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==
dependencies:
"@babel/types" "^7.23.0"
"@jridgewell/gen-mapping" "^0.3.2"
"@jridgewell/trace-mapping" "^0.3.17"
jsesc "^2.5.1"

"@babel/[email protected]", "@babel/helper-annotate-as-pure@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882"
Expand Down Expand Up @@ -546,6 +564,11 @@
resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be"
integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==

"@babel/helper-environment-visitor@^7.22.20":
version "7.22.20"
resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167"
integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==

"@babel/helper-environment-visitor@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz#f06dd41b7c1f44e1f8da6c4055b41ab3a09a7e98"
Expand All @@ -567,12 +590,13 @@
"@babel/template" "^7.22.5"
"@babel/types" "^7.22.5"

"@babel/helper-hoist-variables@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678"
integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==
"@babel/helper-function-name@^7.23.0":
version "7.23.0"
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759"
integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==
dependencies:
"@babel/types" "^7.18.6"
"@babel/template" "^7.22.15"
"@babel/types" "^7.23.0"

"@babel/helper-hoist-variables@^7.22.5":
version "7.22.5"
Expand Down Expand Up @@ -762,6 +786,11 @@
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2"
integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==

"@babel/helper-validator-identifier@^7.22.20":
version "7.22.20"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0"
integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==

"@babel/helper-validator-identifier@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193"
Expand Down Expand Up @@ -823,6 +852,15 @@
chalk "^2.0.0"
js-tokens "^4.0.0"

"@babel/highlight@^7.22.13":
version "7.22.20"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54"
integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==
dependencies:
"@babel/helper-validator-identifier" "^7.22.20"
chalk "^2.4.2"
js-tokens "^4.0.0"

"@babel/highlight@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031"
Expand All @@ -837,7 +875,12 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.7.tgz#66fe23b3c8569220817d5feb8b9dcdc95bb4f71b"
integrity sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==

"@babel/parser@^7.22.5", "@babel/parser@^7.22.7":
"@babel/parser@^7.22.15", "@babel/parser@^7.23.0":
version "7.23.0"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719"
integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==

"@babel/parser@^7.22.5":
version "7.22.7"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.7.tgz#df8cf085ce92ddbdbf668a7f186ce848c9036cae"
integrity sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==
Expand Down Expand Up @@ -1750,35 +1793,28 @@
"@babel/parser" "^7.20.7"
"@babel/types" "^7.20.7"

"@babel/traverse@^7.10.3", "@babel/traverse@^7.14.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.20.10", "@babel/traverse@^7.20.12", "@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7":
version "7.20.12"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.12.tgz#7f0f787b3a67ca4475adef1f56cb94f6abd4a4b5"
integrity sha512-MsIbFN0u+raeja38qboyF8TIT7K0BFzz/Yd/77ta4MsUsmP2RAnidIlwq7d5HFQrH/OZJecGV6B71C4zAgpoSQ==
"@babel/template@^7.22.15":
version "7.22.15"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38"
integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==
dependencies:
"@babel/code-frame" "^7.18.6"
"@babel/generator" "^7.20.7"
"@babel/helper-environment-visitor" "^7.18.9"
"@babel/helper-function-name" "^7.19.0"
"@babel/helper-hoist-variables" "^7.18.6"
"@babel/helper-split-export-declaration" "^7.18.6"
"@babel/parser" "^7.20.7"
"@babel/types" "^7.20.7"
debug "^4.1.0"
globals "^11.1.0"
"@babel/code-frame" "^7.22.13"
"@babel/parser" "^7.22.15"
"@babel/types" "^7.22.15"

"@babel/traverse@^7.22.5", "@babel/traverse@^7.22.6":
version "7.22.8"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.8.tgz#4d4451d31bc34efeae01eac222b514a77aa4000e"
integrity sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==
"@babel/traverse@^7.10.3", "@babel/traverse@^7.14.0", "@babel/traverse@^7.16.8", "@babel/traverse@^7.20.10", "@babel/traverse@^7.20.12", "@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7", "@babel/traverse@^7.22.5", "@babel/traverse@^7.22.6":
version "7.23.2"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8"
integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==
dependencies:
"@babel/code-frame" "^7.22.5"
"@babel/generator" "^7.22.7"
"@babel/helper-environment-visitor" "^7.22.5"
"@babel/helper-function-name" "^7.22.5"
"@babel/code-frame" "^7.22.13"
"@babel/generator" "^7.23.0"
"@babel/helper-environment-visitor" "^7.22.20"
"@babel/helper-function-name" "^7.23.0"
"@babel/helper-hoist-variables" "^7.22.5"
"@babel/helper-split-export-declaration" "^7.22.6"
"@babel/parser" "^7.22.7"
"@babel/types" "^7.22.5"
"@babel/parser" "^7.23.0"
"@babel/types" "^7.23.0"
debug "^4.1.0"
globals "^11.1.0"

Expand All @@ -1791,6 +1827,15 @@
"@babel/helper-validator-identifier" "^7.19.1"
to-fast-properties "^2.0.0"

"@babel/types@^7.22.15", "@babel/types@^7.23.0":
version "7.23.0"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb"
integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==
dependencies:
"@babel/helper-string-parser" "^7.22.5"
"@babel/helper-validator-identifier" "^7.22.20"
to-fast-properties "^2.0.0"

"@babel/types@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.5.tgz#cd93eeaab025880a3a47ec881f4b096a5b786fbe"
Expand Down Expand Up @@ -1934,6 +1979,11 @@
dependencies:
eslint-visitor-keys "^3.3.0"

"@fastify/busboy@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.0.0.tgz#f22824caff3ae506b18207bad4126dbc6ccdb6b8"
integrity sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==

"@gar/promisify@^1.1.3":
version "1.1.3"
resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6"
Expand Down Expand Up @@ -9123,11 +9173,11 @@ unc-path-regex@^0.1.2:
integrity sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==

undici@^5.12.0:
version "5.22.0"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.22.0.tgz#5e205d82a5aecc003fc4388ccd3d2c6e8674a0ad"
integrity sha512-fR9RXCc+6Dxav4P9VV/sp5w3eFiSdOjJYsbtWfd4s5L5C4ogyuVpdKIVHeW0vV1MloM65/f7W45nR9ZxwVdyiA==
version "5.26.3"
resolved "https://registry.yarnpkg.com/undici/-/undici-5.26.3.tgz#ab3527b3d5bb25b12f898dfd22165d472dd71b79"
integrity sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==
dependencies:
busboy "^1.6.0"
"@fastify/busboy" "^2.0.0"

unicode-canonical-property-names-ecmascript@^2.0.0:
version "2.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def ready?(organization_id: nil, id:, fields:, **kwargs)

@evidence_item = evidence_item

input_errors = InputAdaptors::EvidenceItemInputAdaptor.check_input_for_errors(evidence_input_object: fields)
input_errors = InputAdaptors::EvidenceItemInputAdaptor.check_input_for_errors(evidence_input_object: fields, revised_eid: id)

if input_errors.any?
raise GraphQL::ExecutionError, input_errors.join('|')
Expand Down
17 changes: 13 additions & 4 deletions server/app/jobs/set_allele_registry_id_single_variant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,23 @@
class SetAlleleRegistryIdSingleVariant < AlleleRegistryIds

def perform(variant)
old_allele_registry_id = variant.allele_registry_id
allele_registry_id = get_allele_registry_id(variant)
if allele_registry_id == '_:CA' && variant.allele_registry_id != 'unregistered'
if allele_registry_id == '_:CA' && old_allele_registry_id != 'unregistered'
variant.allele_registry_id = 'unregistered'
variant.save
elsif allele_registry_id.present? && allele_registry_id != '_:CA' && allele_registry_id != variant.allele_registry_id
variant.save!
elsif allele_registry_id.present? && allele_registry_id != '_:CA' && allele_registry_id != old_allele_registry_id
variant.allele_registry_id = allele_registry_id
variant.save
variant.save!
add_allele_registry_link(allele_registry_id)
elsif old_allele_registry_id.present? && allele_registry_id.nil?
variant.allele_registry_id = nil
variant.save!
end
unless Variant.where(allele_registry_id: old_allele_registry_id).exists?
if old_allele_registry_id != '_:CA' and old_allele_registry_id != 'undefined'
delete_allele_registry_link(old_allele_registry_id)
end
end
end
end
4 changes: 2 additions & 2 deletions server/app/jobs/set_allele_registry_ids.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ def perform
allele_registry_id = get_allele_registry_id(v)
if allele_registry_id == '_:CA'
v.allele_registry_id = 'unregistered'
v.save
v.save!
elsif allele_registry_id.present?
v.allele_registry_id = allele_registry_id
v.save
v.save!
add_allele_registry_link(allele_registry_id)
end
end
Expand Down
7 changes: 5 additions & 2 deletions server/app/jobs/update_allele_registry_ids.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ def perform
if allele_registry_id != old_allele_registry_id || old_allele_registry_id == '_:CA'
if allele_registry_id == '_:CA'
v.allele_registry_id = 'unregistered'
v.save
v.save!
elsif allele_registry_id.present?
v.allele_registry_id = allele_registry_id
v.save
v.save!
add_allele_registry_link(allele_registry_id)
elsif old_allele_registry_id.present? && allele_registry_id.nil?
v.allele_registry_id = nil
v.save!
end
#delete the linkout if no other variant has this allele registry ID
unless Variant.where(allele_registry_id: old_allele_registry_id).exists?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def perform
EvidenceItem.new(self.class.evidence_fields(input))
end

def self.check_input_for_errors(evidence_input_object: )
def self.check_input_for_errors(evidence_input_object: , revised_eid: nil)
errors = []
fields = evidence_input_object

Expand All @@ -20,6 +20,9 @@ def self.check_input_for_errors(evidence_input_object: )
query_fields.delete(:phenotype_ids)

eid_query = EvidenceItem.where(query_fields)
if revised_eid.present?
eid_query = eid_query.where.not(id: revised_eid)
end

if eid = eid_query.first
if eid.therapy_ids.sort == fields.therapy_ids.sort && eid.phenotype_ids.sort == fields.phenotype_ids.sort
Expand Down
2 changes: 1 addition & 1 deletion server/app/models/variant_alias.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def self.get_or_create_by_name(name)
if found = self.where('lower(name) = ?', name.downcase).first
found
else
self.create!(name: name.upcase)
self.create!(name: name)
end
end
end
Loading

0 comments on commit 219fb86

Please sign in to comment.