Skip to content

3942 add intervals to clickhouse #70

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

Merged
merged 2 commits into from
Aug 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions config/clickhouse/schema/intervals_log.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
create database if not exists ot;

CREATE TABLE if not exists ot.intervals_log
(
`chromosome` Enum8('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', 'X', 'Y'),
`start` UInt32,
`end` UInt32,
`geneId` String,
`biosampleName` LowCardinality(String),
`biosampleId` LowCardinality(String),
`intervalType` LowCardinality(String),
`distanceToTSS` UInt32,
`score` Float64,
`resourceScore` Array(Tuple(name LowCardinality(String), value Float64)),
`datasourceId` LowCardinality(String),
`pmid` String,
`studyId` String,
)
engine = Log;
;
12 changes: 12 additions & 0 deletions config/clickhouse/scripts/intervals.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
create database if not exists ot;

create table if not exists ot.intervals engine = MergeTree ()
order by
(chromosome, start, end) as (
select
*
from
ot.intervals_log
);

drop table ot.intervals_log;
1 change: 1 addition & 0 deletions config/clickhouse/users.d/users.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<use_uncompressed_cache>1</use_uncompressed_cache>
<load_balancing>random</load_balancing>
<max_query_size>1048576</max_query_size>
<date_time_overflow_behavior>saturate</date_time_overflow_behavior>
</default>
<readonly>
<max_memory_usage>30000000000</max_memory_usage>
Expand Down
1 change: 1 addition & 0 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ steps:
- name: explode load all datasets
foreach:
- aotf
- intervals
- literature
- w2v
- sentences
Expand Down
4 changes: 4 additions & 0 deletions config/datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ clickhouse:
table: associations_otf_log
input_dir: view/association_otf
postload_script: config/clickhouse/scripts/aotf.sql
intervals:
table: intervals_log
input_dir: output/intervals
postload_script: config/clickhouse/scripts/intervals.sql
literature:
table: literature_log
input_dir: output/literature
Expand Down
2 changes: 1 addition & 1 deletion deployment/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ variable "open_search_jvm_options" {
variable "clickhouse_image_tag" {
description = "Clickhouse image tag"
type = string
default = "23.3.1.2823"
default = "25.6.3.116"
}

variable "data_location_source" {
Expand Down