Skip to content

Commit

Permalink
fix: exclude factors from unique gene name check in MPs (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson authored Jun 4, 2024
1 parent 1c0c3e2 commit 34c4f66
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def headers(_context)
variants {
feature {
featureInstance {
__typename
... on Gene {
name
}
Expand Down
9 changes: 8 additions & 1 deletion server/lib/genome/importers/api_importers/civic/importer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,14 @@ def create_interaction_claims

# retain molecular profiles consisting of multiple variations on the same gene,
# but skip multi-gene profiles (eg fusions)
gene_names = ei.molecular_profile.variants.map { |v| v.feature.feature_instance.name.upcase }.uniq
gene_names = ei.molecular_profile.variants.map do |variant|
feature_instance = variant.feature.feature_instance
if feature_instance.__typename == "Gene"
feature_instance.name.upcase
else # skip Factors for now
nil
end
end.compact.uniq
next if gene_names.length != 1
gc = GeneClaim.joins(:source).where(sources: {source_db_name: "CIViC"}, gene_claims: {name: gene_names[0]}).first

Expand Down

0 comments on commit 34c4f66

Please sign in to comment.