Skip to content

Commit

Permalink
Merge branch 'main' into do_gwascat_harmonisation
Browse files Browse the repository at this point in the history
  • Loading branch information
DSuveges authored Dec 7, 2023
2 parents 6a373ea + f2f8399 commit caa8895
Show file tree
Hide file tree
Showing 76 changed files with 691 additions and 467 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
run: poetry install --no-interaction --no-root
- name: Install library
run: poetry install --no-interaction
- name: Check dependencies
run: poetry run deptry .
- name: Run tests
run: poetry run pytest
- name: Upload coverage to Codecov
Expand Down
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ repos:
- id: check-json
- id: check-toml
- id: check-yaml
- id: pretty-format-json
args:
- --autofix
- --no-ensure-ascii
- --no-sort-keys
- id: check-ast
- id: debug-statements
- id: check-docstring-first
Expand Down Expand Up @@ -96,3 +91,9 @@ repos:
rev: 0.3.8
hooks:
- id: pydoclint

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3"
hooks:
- id: prettier
args: ["--staged"]
7 changes: 3 additions & 4 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
"ms-python.isort",
"ms-python.mypy-type-checker",
"ms-python.python",
"ms-python.black-formatter"
"ms-python.black-formatter",
"esbenp.prettier-vscode"
],
"unwantedRecommendations": [
"ms-python.flake8"
]
"unwantedRecommendations": ["ms-python.flake8"]
}
9 changes: 2 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true,
"args": [
"--config-dir=./configs"
]
"args": ["--config-dir=./configs"]
},
{
"name": "Python: Current File [local]",
Expand All @@ -19,10 +17,7 @@
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true,
"args": [
"--config-dir=./configs",
"environment=local"
]
"args": ["--config-dir=./configs", "environment=local"]
}
]
}
17 changes: 3 additions & 14 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
"source.organizeImports": true
}
},
"python.terminal.launchArgs": [
"-m",
"IPython",
"--no-autoindent"
],
"python.terminal.launchArgs": ["-m", "IPython", "--no-autoindent"],
"[jsonc]": {
"editor.tabSize": 2,
"editor.insertSpaces": true,
Expand All @@ -23,16 +19,9 @@
}
},
"json.format.keepLines": true,
"isort.args": [
"--profile",
"black"
],
"isort.args": ["--profile", "black"],
"autoDocstring.docstringFormat": "google",
"python.testing.pytestArgs": [
".",
"--doctest-modules",
"--cov=src/"
],
"python.testing.pytestArgs": [".", "--doctest-modules", "--cov=src/"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"mypy-type-checker.severity": {
Expand Down
366 changes: 183 additions & 183 deletions LICENSE.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/opentargets/genetics_etl_python/main.svg)](https://results.pre-commit.ci/badge/github/opentargets/genetics_etl_python)

# Genetics Portal Data Pipeline (experimental)

- [Documentation](https://opentargets.github.io/genetics_etl_python/)
3 changes: 1 addition & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false # if true: only post the comment if coverage changes
require_changes: false # if true: only post the comment if coverage changes

coverage:
status:
Expand Down
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = {extends: ['@commitlint/config-conventional']};
module.exports = { extends: ["@commitlint/config-conventional"] };
13 changes: 9 additions & 4 deletions config/datasets/gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ anderson: gs://genetics-portal-input/v2g_input/andersson2014/enhancer_tss_associ
javierre: gs://genetics-portal-input/v2g_input/javierre_2016_preprocessed.parquet
jung: gs://genetics-portal-raw/pchic_jung2019/jung2019_pchic_tableS3.csv
thurman: gs://genetics-portal-input/v2g_input/thurman2012/genomewideCorrs_above0.7_promoterPlusMinus500kb_withGeneNames_32celltypeCategories.bed8.gz
catalog_associations: ${datasets.inputs}/v2d/gwas_catalog_v1.0.2-associations_e110_r2023-09-11.tsv
catalog_studies: ${datasets.inputs}/v2d/gwas-catalog-v1.0.3-studies-r2023-09-11.tsv
catalog_ancestries: ${datasets.inputs}/v2d/gwas-catalog-v1.0.3-ancestries-r2023-09-11.tsv
catalog_sumstats_lut: ${datasets.inputs}/v2d/harmonised_list-r2023-09-11.txt
catalog_associations: ${datasets.inputs}/v2d/gwas_catalog_v1.0.2-associations_e110_r2023-11-24.tsv
catalog_studies:
# To get a complete representation of all GWAS Catalog studies, we need to ingest the list of unpublished studies from a different file.
- ${datasets.inputs}/v2d/gwas-catalog-v1.0.3-studies-r2023-11-24.tsv
- ${datasets.inputs}/v2d/gwas-catalog-v1.0.3-unpublished-studies-r2023-11-24.tsv
catalog_ancestries:
- ${datasets.inputs}/v2d/gwas-catalog-v1.0.3-ancestries-r2023-11-24.tsv
- ${datasets.inputs}/v2d/gwas-catalog-v1.0.3-unpublished-ancestries-r2023-11-24.tsv
catalog_sumstats_lut: ${datasets.inputs}/v2d/harmonised_list-r2023-11-24a.txt
ukbiobank_manifest: gs://genetics-portal-input/ukb_phenotypes/neale2_saige_study_manifest.190430.tsv
l2g_gold_standard_curation: ${datasets.inputs}/l2g/gold_standard/curation.json
gene_interactions: ${datasets.inputs}/l2g/interaction # 23.09 data
Expand Down
4 changes: 2 additions & 2 deletions config/step/gwas_catalog.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_target_: otg.gwas_catalog.GWASCatalogStep
catalog_studies_file: ${datasets.catalog_studies}
catalog_ancestry_file: ${datasets.catalog_ancestries}
catalog_study_files: ${datasets.catalog_studies}
catalog_ancestry_files: ${datasets.catalog_ancestries}
catalog_associations_file: ${datasets.catalog_associations}
catalog_sumstats_lut: ${datasets.catalog_sumstats_lut}
variant_annotation_path: ${datasets.variant_annotation}
Expand Down
6 changes: 3 additions & 3 deletions docs/assets/javascripts/extra.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$('.contributors img[data-src]').each(function () {
src = $(this).attr("data-src");
$(this).attr('src', src);
$(".contributors img[data-src]").each(function () {
src = $(this).attr("data-src");
$(this).attr("src", src);
});
86 changes: 45 additions & 41 deletions docs/assets/overrides/partials/source-file.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,50 @@
<hr />
<div class="md-source-file">
<small>
<ul class="metadata page-metadata" data-bi-name="page info" lang="en-us" dir="ltr">
<!-- mkdocs-git-revision-date-plugin -->
{% if page.meta.git_creation_date_localized %}
<li>
<span class="icon twemoji">
{% include ".icons/material/clock-plus-outline.svg" %}
</span>
<span class="label">
{{ page.meta.git_creation_date_localized }}
</span>
</li>
{% endif %}
<small>
<ul
class="metadata page-metadata"
data-bi-name="page info"
lang="en-us"
dir="ltr"
>
<!-- mkdocs-git-revision-date-plugin -->
{% if page.meta.git_creation_date_localized %}
<li>
<span class="icon twemoji">
{% include ".icons/material/clock-plus-outline.svg" %}
</span>
<span class="label"> {{ page.meta.git_creation_date_localized }} </span>
</li>
{% endif %} {% if page.meta.git_revision_date_localized %}
<li>
<span class="icon twemoji">
{% include ".icons/material/clock-edit-outline.svg" %}
</span>
<span class="label"> {{ page.meta.git_revision_date_localized }} </span>
</li>
{% endif %}

{% if page.meta.git_revision_date_localized %}
<li>
<span class="icon twemoji">
{% include ".icons/material/clock-edit-outline.svg" %}
</span>
<span class="label">
{{ page.meta.git_revision_date_localized }}
</span>
</li>
{% endif %}

<li>
<span class="icon twemoji">
{% include ".icons/material/github.svg" %}
</span>
<span class="label">
Contributors
</span>
</li>
<li class="contributors-holder">
<ul class="contributors" data-bi-name="contributors">
{%- for user in committers -%}
<li><a href="{{ user.url }}" title="{{ user.name }}" data-bi-name="contributorprofile"
target="_blank"><img src="{{ user.avatar }}" alt="{{ user.name }}"></a></li>
{%- endfor -%}
</ul>
</li>
<li>
<span class="icon twemoji">
{% include ".icons/material/github.svg" %}
</span>
<span class="label"> Contributors </span>
</li>
<li class="contributors-holder">
<ul class="contributors" data-bi-name="contributors">
{%- for user in committers -%}
<li>
<a
href="{{ user.url }}"
title="{{ user.name }}"
data-bi-name="contributorprofile"
target="_blank"
><img src="{{ user.avatar }}" alt="{{ user.name }}"
/></a>
</li>
{%- endfor -%}
</ul>
</small>
</li>
</ul>
</small>
</div>
90 changes: 43 additions & 47 deletions docs/assets/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -1,79 +1,75 @@
.metadata {
list-style: none;
padding: 0;
margin: 0;
margin-bottom: 15px;
color: #999;
list-style: none;
padding: 0;
margin: 0;
margin-bottom: 15px;
color: #999;
}

.metadata.page-metadata .contributors-text {
margin-right: 5px;
display: inline-block;
margin-right: 5px;
display: inline-block;
}

.metadata.page-metadata {
display: flex !important;
flex-direction: row;
align-items: center;
font-size: 1.2em;
display: flex !important;
flex-direction: row;
align-items: center;
font-size: 1.2em;
}


.metadata.page-metadata li {
list-style: none;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
margin-bottom: 0 !important;
list-style: none;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
margin-bottom: 0 !important;
}


.metadata.page-metadata li .icon {
width: 1.1rem;
height: 1.1rem;
margin-right: 2px;
width: 1.1rem;
height: 1.1rem;
margin-right: 2px;
}


.metadata.page-metadata li .icon svg {
fill: #999;
fill: #999;
}


.page-metadata .contributors-holder {
margin: 0 !important;
margin-left: 1em;
margin: 0 !important;
margin-left: 1em;
}

.page-metadata .contributors {
margin-right: 5px;
display: inline-block;
list-style: none;
display: flex;
flex-direction: row;
margin-right: 5px;
display: inline-block;
list-style: none;
display: flex;
flex-direction: row;
}

.page-metadata .contributors li {
display: inline-flex;
margin: 0 !important;
padding: 0 !important;
display: inline-flex;
margin: 0 !important;
padding: 0 !important;
}

.page-metadata .contributors li img {
border-radius: 50%;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
opacity: 0.8;
vertical-align: middle;
width: 1.6rem;
transition: all 0.2s ease-in-out;
border-radius: 50%;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
opacity: 0.8;
vertical-align: middle;
width: 1.6rem;
transition: all 0.2s ease-in-out;
}

.page-metadata .contributors li img:hover {
opacity: 1;
filter: grayscale(0%);
-webkit-filter: grayscale(0%);
vertical-align: middle;
transform: scale(1.2);
opacity: 1;
filter: grayscale(0%);
-webkit-filter: grayscale(0%);
vertical-align: middle;
transform: scale(1.2);
}
Loading

0 comments on commit caa8895

Please sign in to comment.