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

Clinvar-based filtration leads to duplicate lines #565

Closed
holtgrewe opened this issue Jun 30, 2022 · 6 comments · Fixed by #630
Closed

Clinvar-based filtration leads to duplicate lines #565

holtgrewe opened this issue Jun 30, 2022 · 6 comments · Fixed by #630
Labels
bug Something isn't working

Comments

@holtgrewe
Copy link
Collaborator

holtgrewe commented Jun 30, 2022

Describe the bug
When using the "Clinvar pathogenic" preset duplicate lines are possible.

To Reproduce
Steps to reproduce the behavior:

  1. Filter the NA12878 trio with "Clinvar pathogenic" filter.
  2. See the result:
    image

Expected behavior
Only one line per variant should be shown.

Screenshots
See above.

Additional context

@holtgrewe holtgrewe added the bug Something isn't working label Jun 30, 2022
@holtgrewe
Copy link
Collaborator Author

Root Cause Analysis
We are using a LEFT JOIN in the SQL. If there are multiple Clinvar records (there is one per disease) this generates multiple output records.

@holtgrewe holtgrewe added this to the anthenea-1.2.2 (stable) milestone Jun 30, 2022
@your-highness
Copy link
Collaborator

Dear @holtgrewe ,

I think our problem is linked to this issue but not dependent on the "Clinvar pathogenic" preset:

In our Athenea 1.2.1 installation when analysing NA-12878 for the reported CYP2C19:c.681G>A variant with all filters relaxed and "Gene Allowlist" set to "CYP2C19" duplicated lines are observed, e.g. for chr10:96,535,124.A>G 57 entries where displayed. I commented on one of the entries and all duplicates where shown as "commented" which indicates that the same entry is shown multiple times.

We checked if the imported TSV has multiple variant entries but it was not the case.

Config:
grafik

Results (Snippet):
grafik

Best,

@holtgrewe
Copy link
Collaborator Author

@your-highness We always join with clinvar. This also occurs outside of the clinvar filter but there the problem is obvious whereas the variants are not so obviously spotted outside.

@holtgrewe
Copy link
Collaborator Author

Further Root Cause Analysis
Originally, we had only one clinvar record in our internal tables. This changed in the last data release. We did not properly catch this change in VarFish Server.

@holtgrewe
Copy link
Collaborator Author

holtgrewe commented Aug 26, 2022

Resolution Proposal
Adjust ExtendQueryPartsClinvarJoin to use a lateral join and merge all records.

Affected Components
VarFish Server

Affected Modules/Files
variants.queries

Required Architectural Changes
None

Required Database Changes
None

Backport Possible?
Yes

Resolution Sketch

  • Adjust ExtendQueryPartsClinvarJoin with the proposed change.
  • Also, we need to adjust ExtendQueryPartsClinvarJoinAndFilter to still work correctly.

@holtgrewe holtgrewe linked a pull request Aug 26, 2022 that will close this issue
holtgrewe added a commit that referenced this issue Aug 26, 2022
Related-Issue: #565
Closes: #565
Projected-Results-Impact: require-revalidation
holtgrewe added a commit that referenced this issue Aug 26, 2022
Related-Issue: #565
Closes: #565
Projected-Results-Impact: require-revalidation
holtgrewe added a commit that referenced this issue Aug 26, 2022
Related-Issue: #565
Closes: #565
Projected-Results-Impact: require-revalidation
@holtgrewe
Copy link
Collaborator Author

holtgrewe added a commit that referenced this issue Aug 26, 2022
Related-Issue: #565
Closes: #565
Projected-Results-Impact: require-revalidation
holtgrewe added a commit that referenced this issue Aug 29, 2022
Related-Issue: #565
Closes: #565
Projected-Results-Impact: require-revalidation
holtgrewe added a commit that referenced this issue Aug 29, 2022
Related-Issue: #565
Closes: #565
Projected-Results-Impact: require-revalidation
holtgrewe added a commit that referenced this issue Sep 6, 2022
Related-Issue: #565
Closes: #565
Projected-Results-Impact: require-revalidation
holtgrewe added a commit that referenced this issue Sep 6, 2022
Related-Issue: #565
Closes: #565
Projected-Results-Impact: require-revalidation
holtgrewe added a commit that referenced this issue Sep 6, 2022
Related-Issue: #565
Closes: #565
Projected-Results-Impact: require-revalidation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants