Skip to content
Merged

Dev #4958

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
2a3cdcf
fix gene search dataset type for clickhouse
hanars Aug 11, 2025
d496738
Merge pull request #4924 from broadinstitute/clickhouse-gene-search-d…
hanars Aug 11, 2025
6046145
codacy fixes
hanars Aug 12, 2025
a702076
explicitly include project guid in call filter
hanars Aug 12, 2025
e34f145
do individual guid mapping outside of clcikhouse
hanars Aug 12, 2025
1a1f82d
Merge pull request #4925 from broadinstitute/codacy-clean-up
hanars Aug 12, 2025
d9a6426
Merge pull request #4926 from broadinstitute/project-in-call-filter
hanars Aug 12, 2025
7a38ccb
fix compound hets
hanars Aug 12, 2025
de40cf0
properly handle multi sample types
hanars Aug 12, 2025
37e1d8a
codacy
hanars Aug 12, 2025
0d1c34d
Merge branch 'dev' of https://github.com/broadinstitute/seqr into mul…
hanars Aug 12, 2025
b894da4
Merge pull request #4927 from broadinstitute/multi-project-post-proce…
hanars Aug 12, 2025
f12abb8
first pass group genotype filters
hanars Aug 12, 2025
f5b9bdf
handle unfiltered samples in entry data
hanars Aug 12, 2025
144738a
fix gcnv inheritance search
hanars Aug 12, 2025
5da61c1
any affected
hanars Aug 12, 2025
52700a9
clean up
hanars Aug 12, 2025
6307bb5
handle unfiltered quality samples
hanars Aug 12, 2025
e9c71e0
include sample type in inheritance filter
hanars Aug 13, 2025
709e43a
cleaner map creation
hanars Aug 13, 2025
cb96f15
multi sample type
hanars Aug 13, 2025
1ddfa82
clean up
hanars Aug 13, 2025
ec3d685
clean up
hanars Aug 13, 2025
3121927
clean up
hanars Aug 13, 2025
043aca7
clean up
hanars Aug 13, 2025
6c973ac
clean up
hanars Aug 13, 2025
fe68442
Merge pull request #4930 from broadinstitute/better-inheritance-filter
hanars Aug 13, 2025
6495031
gnomad genomes dict (#4931)
bpblanken Aug 13, 2025
623ca4d
minimize maps for single family search
hanars Aug 13, 2025
0babf4f
fix multi sample type
hanars Aug 14, 2025
fb11f92
use dict to prefilter gnomad
hanars Aug 14, 2025
605311e
Merge pull request #4932 from broadinstitute/single-family-inheritanc…
hanars Aug 14, 2025
2322f2e
test fixtures
hanars Aug 14, 2025
cad2e84
do not use gnomad af entries column
hanars Aug 14, 2025
850dec6
clean up
hanars Aug 14, 2025
35b05d6
Merge branch 'dev' of https://github.com/broadinstitute/seqr into gno…
hanars Aug 14, 2025
9f3c9a0
codacy cleanup
hanars Aug 14, 2025
a2305c7
Merge pull request #4934 from broadinstitute/gnomad-af-prefilter
hanars Aug 14, 2025
6ab511a
imporve any affected performance
hanars Aug 14, 2025
5b84ed7
Merge pull request #4935 from broadinstitute/any-affected-performance
hanars Aug 14, 2025
b754862
map gentoypes to allowed sample ids
hanars Aug 14, 2025
0d6e283
quality filter
hanars Aug 15, 2025
5834f9d
fix map construction
hanars Aug 15, 2025
d457969
update fixture data
hanars Aug 15, 2025
7774096
handle any allowed genotypes
hanars Aug 15, 2025
83150a8
cleaner nullabel genotypes
hanars Aug 15, 2025
2c61836
do not allow mismatches in affected status
hanars Aug 15, 2025
00f5074
cleaner logic
hanars Aug 15, 2025
15fddb8
fix test
hanars Aug 15, 2025
afbd83c
undo test code
hanars Aug 15, 2025
482a657
Revert "do not use gnomad af entries column"
hanars Aug 15, 2025
7ca4496
Revert "test fixtures"
hanars Aug 15, 2025
d6e0f48
Revert "clean up"
hanars Aug 15, 2025
5a99a36
Revert "use dict to prefilter gnomad"
hanars Aug 15, 2025
a04a258
fix merge
hanars Aug 15, 2025
d6f79da
correctl use pruning"
hanars Aug 15, 2025
5e8bee3
drop full gnamd tables and dicts
hanars Aug 15, 2025
73d63a2
Merge branch 'dev' of https://github.com/broadinstitute/seqr into no-…
hanars Aug 15, 2025
8fe7fc3
fix conditional
hanars Aug 15, 2025
a8e4f4f
Merge pull request #4937 from broadinstitute/gnomad-af-prefilter-actu…
hanars Aug 15, 2025
7c2489c
correctly set up fixture data
hanars Aug 15, 2025
8019734
update tests for new fixture data
hanars Aug 15, 2025
94ea882
Merge branch 'dev' of https://github.com/broadinstitute/seqr into no-…
hanars Aug 15, 2025
01ccb45
implement new fields
bpblanken Aug 18, 2025
a88dd00
bacth bulk updates for saved variant models
hanars Aug 18, 2025
bbd4c0f
do not allow moving families still associated with analysis groups
hanars Aug 18, 2025
edb24e5
include group names in error message
hanars Aug 18, 2025
25a144d
Merge pull request #4936 from broadinstitute/no-allow-missing-samples…
hanars Aug 18, 2025
4d94dc0
first pass restructure sample data
hanars Aug 18, 2025
cc2dd05
Merge pull request #4939 from broadinstitute/no-move-analysis-group-f…
hanars Aug 18, 2025
612e15e
fix sample data agg
hanars Aug 18, 2025
6be66df
Merge branch 'dev' of https://github.com/broadinstitute/seqr into sam…
hanars Aug 18, 2025
eca2e2b
Merge pull request #4940 from broadinstitute/sample-data-cleanup
hanars Aug 18, 2025
eee2be3
remove underused helper fnc
hanars Aug 18, 2025
61e529d
clean up
hanars Aug 18, 2025
fb48ceb
Merge branch 'dev' of https://github.com/broadinstitute/seqr into bat…
hanars Aug 18, 2025
25a4128
invalid search test
hanars Aug 18, 2025
349e528
test multi project mult dat atype comp het
hanars Aug 18, 2025
a5bfb5c
test multi sample type multi dataset type
hanars Aug 18, 2025
c73574e
better multi sample type tests
hanars Aug 18, 2025
4b3d065
Merge pull request #4938 from broadinstitute/batch-saved-variant-key-…
hanars Aug 18, 2025
e794cdd
include svs in test results
hanars Aug 18, 2025
cc1f82e
correctly filter both ends of padded interval
hanars Aug 18, 2025
2329bc5
fix comp het multi sample type multi data type
hanars Aug 18, 2025
f2a3e1d
test topmed
hanars Aug 18, 2025
bd23ac1
fix end chrom filtering
hanars Aug 18, 2025
a99915f
better hgmd tests
hanars Aug 18, 2025
65c8efc
fix recssive
hanars Aug 18, 2025
42a1abb
fix cached reults
hanars Aug 18, 2025
15b330e
fix cached reults
hanars Aug 18, 2025
48f23c7
Merge branch 'dev' of github.com:broadinstitute/seqr into benb/implem…
bpblanken Aug 19, 2025
1bed4d5
use array field
bpblanken Aug 19, 2025
6516dc4
ws
bpblanken Aug 19, 2025
eb9852d
just use uint
bpblanken Aug 19, 2025
5a5bfac
better bacthing for saved variant updates
hanars Aug 19, 2025
9235f1b
a few missing columns
bpblanken Aug 19, 2025
bea3870
properly filter gnomad sv ac
hanars Aug 19, 2025
70d7a10
Merge pull request #4943 from broadinstitute/saved-variant-key-batches
hanars Aug 19, 2025
f5d9bca
allow sample id mismatches across dataset types
hanars Aug 19, 2025
1b5a1eb
Merge pull request #4944 from broadinstitute/gnomad-sv-ac-filter
hanars Aug 19, 2025
830342e
Merge pull request #4945 from broadinstitute/cross-dataset-type-sampl…
hanars Aug 19, 2025
9e31031
fix number of families in log
hanars Aug 19, 2025
602f72d
fix estring encoding
hanars Aug 19, 2025
abec12a
Merge pull request #4946 from broadinstitute/num-families-log-fix
hanars Aug 19, 2025
c501460
Merge branch 'dev' of https://github.com/broadinstitute/seqr into cli…
hanars Aug 19, 2025
b2f087a
correctly handle different genotype annotations for different dataset…
hanars Aug 19, 2025
d761e34
fix reassignment error
hanars Aug 19, 2025
27e53ef
Merge pull request #4947 from broadinstitute/multi-snv-single-sv-proj…
hanars Aug 19, 2025
9242860
Merge pull request #4941 from broadinstitute/clickouse-coverage
hanars Aug 19, 2025
6368e1d
actually test get saved variant sv
hanars Aug 20, 2025
ca53d9a
fix single sample type property
hanars Aug 19, 2025
41d3a2c
fix test
hanars Aug 20, 2025
09c256b
Merge pull request #4948 from broadinstitute/saved-sv-error
hanars Aug 20, 2025
7acd66d
Merge branch 'dev' of https://github.com/broadinstitute/seqr into gen…
hanars Aug 20, 2025
633c637
feat: implement new fields (#4942)
bpblanken Aug 20, 2025
4d8ee55
Merge branch 'dev' of https://github.com/broadinstitute/seqr into gen…
hanars Aug 20, 2025
30f8341
add large list specific logic
hanars Aug 20, 2025
f7ebe1e
get gene db ids
hanars Aug 20, 2025
09d7147
filter on db ids
hanars Aug 20, 2025
64d022e
fix finction call
hanars Aug 20, 2025
64baf6b
clean up
hanars Aug 20, 2025
b2d24ba
better interval representation
hanars Aug 20, 2025
5593151
clean up
hanars Aug 20, 2025
9b9d8c1
fix tests
hanars Aug 20, 2025
3952e55
show error when results are truncated
hanars Aug 20, 2025
6c37a5c
Merge pull request #4950 from broadinstitute/handle-too-many-results
hanars Aug 20, 2025
569b09a
Merge pull request #4949 from broadinstitute/gene-search-optimization
hanars Aug 20, 2025
868424e
include user-readable family id in discovery variant error
hanars Aug 21, 2025
d1d8c1f
update tests
hanars Aug 21, 2025
323f2a2
add build support info to faq
hanars Aug 21, 2025
1de5dbe
Merge pull request #4952 from broadinstitute/faq-update-build-support
hanars Aug 21, 2025
fd50329
fix tests
hanars Aug 21, 2025
e3427db
backend specific project data deletion
hanars Aug 21, 2025
aa642b1
Merge pull request #4951 from broadinstitute/family-id-error-message
hanars Aug 21, 2025
7bd50ce
test all backends
hanars Aug 21, 2025
ab01339
correctly handle gcv
hanars Aug 21, 2025
9549f3e
backend specific transfer families
hanars Aug 21, 2025
b77eb40
test transfer families all backends
hanars Aug 21, 2025
c10e803
fix flappy test
hanars Aug 21, 2025
f31fcf9
chore: add handling for clinvar edge case (#4953)
bpblanken Aug 21, 2025
d585575
use clickhosue fixture data in lookup test
hanars Aug 22, 2025
82dfa46
properly handle multiple sample types in variant lookup
hanars Aug 22, 2025
b2ba562
clean up
hanars Aug 22, 2025
7ae5314
Merge pull request #4954 from broadinstitute/backend-specific-deactiv…
hanars Aug 22, 2025
d7f7666
Merge pull request #4956 from broadinstitute/lookup-multi-sample-tpyes
hanars Aug 22, 2025
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
21 changes: 21 additions & 0 deletions clickhouse_search/backend/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ def process_rhs(self, compiler, connection):
return rhs_params[0], []


@NestedField.register_lookup
@ArrayField.register_lookup
class ArrayAll(ArrayExists):
lookup_name = "array_all"
function = "arrayAll"


class ArrayFilter(lookups.Transform):
def __init__(self, *args, conditions=None, **kwargs):
super().__init__(*args, **kwargs)
Expand All @@ -113,6 +120,20 @@ class ArrayNotEmptyTransform(lookups.Transform):
output_field = BooleanField()


@ArrayField.register_lookup
class BitmapHasAny(ArrayLookup):
lookup_name = "bitmap_has_any"
function = "bitmapHasAny"

def process_lhs(self, compiler, connection):
lhs, lhs_params = super().process_lhs(compiler, connection)
return f'bitmapBuild({lhs})', lhs_params

def process_rhs(self, compiler, connection):
rhs, rhs_params = super().process_rhs(compiler, connection)
return f'bitmapBuild{rhs.split("::")[0]}', rhs_params


class DictGet(Func):
function = 'dictGet'
template = '%(function)s("%(dict_name)s", (%(fields)s), %(expressions)s)'
Expand Down
6 changes: 6 additions & 0 deletions clickhouse_search/fixtures/clickhouse_saved_variants.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
"sample_type": "WGS",
"xpos": 1248367227,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": true,
"geneId_ids": [6, 48],
"filters": [],
"sign": 1,
"calls": [
Expand Down Expand Up @@ -118,6 +120,8 @@
"sample_type": "WES",
"xpos": 2103343353,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": true,
"geneId_ids": [48, 45],
"filters": [],
"sign": 1,
"calls": [
Expand Down Expand Up @@ -196,6 +200,8 @@
"sample_type": "WGS",
"xpos": 1248367227,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": false,
"geneId_ids": [],
"filters": [],
"sign": 1,
"calls": [
Expand Down
189 changes: 188 additions & 1 deletion clickhouse_search/fixtures/clickhouse_search.json
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@
"sample_type": "WES",
"xpos": 1000010439,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": false,
"geneId_ids": [],
"filters": [],
"sign": 1,
"calls": [
Expand All @@ -292,6 +294,8 @@
"sample_type": "WES",
"xpos": 1038724419,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": true,
"geneId_ids": [60, 72],
"filters": [],
"sign": 1,
"calls": [
Expand All @@ -310,6 +314,8 @@
"sample_type": "WES",
"xpos": 1091502721,
"is_gnomad_gt_5_percent": true,
"is_annotated_in_any_gene": true,
"geneId_ids": [61, 60],
"filters": [],
"sign": 1,
"calls": [
Expand All @@ -328,6 +334,70 @@
"sample_type": "WES",
"xpos": 1091511686,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": true,
"geneId_ids": [61],
"filters": [
"VQSRTrancheSNP99.95to100.00"
],
"sign": 1,
"calls": [
["HG00733", 0, 0, 0, 45],
["HG00732", 0, 0, 0, 24],
["HG00731", 1, 58, 0.17241, 29]
]
}
}, {
"model": "clickhouse_search.entriessnvindel",
"pk": 52,
"fields": {
"key": 2,
"project_guid": "R0001_1kg",
"family_guid": "F000002_2_x",
"sample_type": "WES",
"xpos": 1038724419,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": true,
"geneId_ids": [60, 72],
"filters": [],
"sign": 1,
"calls": [
["HG00733", 0, 40, 0, 33],
["HG00732", 1, 99, 0.625, 32],
["HG00731", 2, 99, 1, 36]
]
}
}, {
"model": "clickhouse_search.entriessnvindel",
"pk": 53,
"fields": {
"key": 3,
"project_guid": "R0001_1kg",
"family_guid": "F000002_2_x",
"sample_type": "WES",
"xpos": 1091502721,
"is_gnomad_gt_5_percent": true,
"is_annotated_in_any_gene": true,
"geneId_ids": [61, 60],
"filters": [],
"sign": 1,
"calls": [
["HG00733", 1, 99, 0.40741, 27],
["HG00732", 0, 99, 0.45946, 37],
["HG00731", 1, 99, 1, 40]
]
}
}, {
"model": "clickhouse_search.entriessnvindel",
"pk": 54,
"fields": {
"key": 4,
"project_guid": "R0001_1kg",
"family_guid": "F000002_2_x",
"sample_type": "WES",
"xpos": 1091511686,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": true,
"geneId_ids": [61],
"filters": [
"VQSRTrancheSNP99.95to100.00"
],
Expand All @@ -348,10 +418,11 @@
"sample_type": "WES",
"xpos": 1091502721,
"is_gnomad_gt_5_percent": true,
"is_annotated_in_any_gene": true,
"geneId_ids": [61, 60],
"filters": [],
"sign": 1,
"calls": [
["NA20872", 1, 99, 0.34285714285714286, 35],
["NA20870", 1, 99, 0.6785714285714286, 28]
]
}
Expand All @@ -365,6 +436,8 @@
"sample_type": "WES",
"xpos": 1000010439,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": false,
"geneId_ids": [],
"filters": [],
"sign": 1,
"calls": [
Expand All @@ -381,6 +454,8 @@
"sample_type": "WES",
"xpos": 1038724419,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": true,
"geneId_ids": [60, 72],
"filters": [],
"sign": 1,
"calls": [
Expand All @@ -397,6 +472,8 @@
"sample_type": "WES",
"xpos": 1000010146,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": false,
"geneId_ids": [],
"filters": [],
"sign": 1,
"calls": [
Expand All @@ -413,6 +490,8 @@
"sample_type": "WGS",
"xpos": 1000010439,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": false,
"geneId_ids": [],
"filters": [],
"sign": 1,
"calls": [
Expand All @@ -429,6 +508,8 @@
"sample_type": "WGS",
"xpos": 1038724419,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": true,
"geneId_ids": [60, 72],
"filters": [],
"sign": 1,
"calls": [
Expand All @@ -445,6 +526,8 @@
"sample_type": "WGS",
"xpos": 1000010146,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": false,
"geneId_ids": [],
"filters": [],
"sign": 1,
"calls": [
Expand All @@ -461,6 +544,8 @@
"sample_type": "WGS",
"xpos": 1000010439,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": false,
"geneId_ids": [],
"filters": [],
"sign": 1,
"calls": [
Expand All @@ -479,6 +564,8 @@
"sample_type": "WGS",
"xpos": 1038724419,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": true,
"geneId_ids": [60, 72],
"filters": [],
"sign": 1,
"calls": [
Expand All @@ -497,6 +584,8 @@
"sample_type": "WGS",
"xpos": 1091502721,
"is_gnomad_gt_5_percent": true,
"is_annotated_in_any_gene": true,
"geneId_ids": [61, 60],
"filters": [],
"sign": 1,
"calls": [
Expand All @@ -515,6 +604,8 @@
"sample_type": "WGS",
"xpos": 1091511686,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": true,
"geneId_ids": [61],
"filters": [
"VQSRTrancheSNP99.95to100.00"
],
Expand All @@ -535,6 +626,8 @@
"sample_type": "WGS",
"xpos": 1009310123,
"is_gnomad_gt_5_percent": false,
"is_annotated_in_any_gene": true,
"geneId_ids": [71],
"filters": [],
"sign": 1,
"calls": [
Expand Down Expand Up @@ -581,6 +674,8 @@
"sample_type": "WES",
"xpos": 7143270172,
"is_gnomad_gt_5_percent": true,
"is_annotated_in_any_gene": true,
"geneId_ids": [73, 74],
"filters": [
"VQSRTrancheSNP99.90to99.95"
],
Expand All @@ -600,6 +695,8 @@
"sample_type": "WGS",
"xpos": 1000010439,
"is_gnomad_gt_5_percent": true,
"is_annotated_in_any_gene": false,
"geneId_ids": [],
"filters": [],
"sign": 1,
"calls": [
Expand Down Expand Up @@ -1116,6 +1213,66 @@
["HG00733", 1, 3, 29, false, 38721781, 38734440, 7, ["ENSG00000275023", "ENSG00000277258", "ENSG00000277972"], false, true, false]
]
}
}, {
"model": "clickhouse_search.entriesgcnv",
"pk": 48,
"fields": {
"key": 16,
"project_guid": "R0001_1kg",
"family_guid": "F000002_2_x",
"xpos": 14022417556,
"filters": [],
"sign": 1,
"calls": [
["HG00731", 1, 3, 38, false, 22438910, 22469796, 0, [], false, true, false],
["HG00733", null, null, null, null, null, null, null, [], null, null, null]
]
}
}, {
"model": "clickhouse_search.entriesgcnv",
"pk": 49,
"fields": {
"key": 17,
"project_guid": "R0001_1kg",
"family_guid": "F000002_2_x",
"xpos": 16029802672,
"filters": [],
"sign": 1,
"calls": [
["HG00731", 1, 3, 29, false, 29809156, 29815990, 8, ["ENSG00000103495", "ENSG00000167371", "ENSG00000280893"], false, true, false],
["HG00733", 1, 3, 37, false, 29809156, 29815990, 8, ["ENSG00000103495", "ENSG00000167371", "ENSG00000280893"], false, true, false]
]
}
}, {
"model": "clickhouse_search.entriesgcnv",
"pk": 40,
"fields": {
"key": 18,
"project_guid": "R0001_1kg",
"family_guid": "F000002_2_x",
"xpos": 17038717327,
"filters": [],
"sign": 1,
"calls": [
["HG00731", 2, 4, 13, true, 38717327, 38719636, 3, ["ENSG00000275023"], true, false, false],
["HG00733", null, null, null, null, null, null, null, [], null, null, null]
]
}
}, {
"model": "clickhouse_search.entriesgcnv",
"pk": 41,
"fields": {
"key": 19,
"project_guid": "R0001_1kg",
"family_guid": "F000002_2_x",
"xpos": 17038721781,
"filters": [],
"sign": 1,
"calls": [
["HG00731", 1, 3, 28, false, 38721781, 38735703, 7, ["ENSG00000275023", "ENSG00000277258", "ENSG00000277972"], false, true, false],
["HG00733", 1, 3, 29, false, 38721781, 38734440, 7, ["ENSG00000275023", "ENSG00000277258", "ENSG00000277972"], false, true, false]
]
}
}, {
"model": "clickhouse_search.entriesgcnv",
"pk": 32,
Expand Down Expand Up @@ -1339,5 +1496,35 @@
"gencode_gene_type": "protein_coding",
"gencode_release": 27
}
},
{
"model": "reference_data.geneinfo",
"pk": 73,
"fields": {
"gene_id": "ENSG00000271079",
"gene_symbol": "CTAGE15",
"chrom_grch38": "7",
"start_grch38": 143571801,
"end_grch38": 143574387,
"strand_grch38": "+",
"coding_region_size_grch38": 0,
"gencode_gene_type": "protein_coding",
"gencode_release": 27
}
},
{
"model": "reference_data.geneinfo",
"pk": 74,
"fields": {
"gene_id": "ENSG00000176227",
"gene_symbol": "CTAGE6",
"chrom_grch38": "7",
"start_grch38": 91500851,
"end_grch38": 91525764,
"strand_grch38": "+",
"coding_region_size_grch38": 0,
"gencode_gene_type": "protein_coding",
"gencode_release": 27
}
}
]
Loading