Skip to content

Commit c847921

Browse files
vivienhopre-commit-ci[bot]DSuveges
authored
refactor: remove gene_index step (#946)
* refactor: rename all gene_index related files to target_index * refactor: rename gene_index to target_index in various files * refactor: rename gene_index to target_index in tests * refactor: rename fields to be compatible with new target_index * refactor: replace examples that use gene_index * refactor: delete gene_index step files * refactor: remove gene_index step from config * feat: replace the gene_index schema with the target_index schema * refactor: modify mock_target_index * fix: remove mock_target_index from test_validate_schema_missing_field * refactor: delete target.md * fix: fix study index validation tests * fix: fix l2g feature tests * chore: pre-commit auto fixes [...] * revert: revert column name after merging from dev --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Daniel Suveges <daniel.suveges@protonmail.com>
1 parent 111d902 commit c847921

40 files changed

+1306
-467
lines changed

docs/howto/command_line/run_step_in_cli.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Available options:
1414
eqtl_catalogue
1515
finngen_studies
1616
finngen_sumstat_preprocess
17-
gene_index
1817
gwas_catalog_ingestion
1918
gwas_catalog_sumstat_preprocess
2019
ld_index
@@ -28,16 +27,16 @@ Available options:
2827
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
2928
```
3029

31-
As indicated, you can run a step by specifying the step's name with the `step` argument. For example, to run the `gene_index` step, you can run:
30+
As indicated, you can run a step by specifying the step's name with the `step` argument. For example, to run the `gwas_catalog_sumstat_preprocess` step, you can run:
3231

3332
```bash
34-
gentropy step=gene_index
33+
gentropy step=gwas_catalog_sumstat_preprocess
3534
```
3635

37-
In most occassions, some mandatory values will be required to run the step. For example, the `gene_index` step requires the `step.target_path` and `step.gene_index_path` argument to be specified. You can complete the necessary arguments by adding them to the command line:
36+
In most occassions, some mandatory values will be required to run the step. For example, the `gwas_catalog_sumstat_preprocess` step requires the `step.raw_sumstats_path` and `step.out_sumstats_path` argument to be specified. You can complete the necessary arguments by adding them to the command line:
3837

3938
```bash
40-
gentropy step=gene_index step.target_path=/path/to/target step.gene_index_path=/path/to/gene_index
39+
gentropy step=gwas_catalog_sumstat_preprocess step.raw_sumstats_path=/path/to/raw_sumstats step.out_sumstats_path=/path/to/out_sumstats
4140
```
4241

4342
You can find more about the available steps in the [documentation](../../python_api/steps/_steps.md).

docs/howto/command_line/run_step_using_config.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ To run a step using a configuration file, you need to create a configuration fil
1515
```{ .sh .no-copy }
1616
config/
1717
├─ step/
18-
│ └─ my_gene_index.md
18+
│ └─ my_gwas_catalog_sumstat_preprocess.md
1919
└─ my_config.yml
2020
```
2121

22-
The configuration file should contain the parameters you want to use to run the step. For example, to run the `gene_index` step, you need to specify the `step.target_path` and `step.gene_index_path` parameters. The configuration file should look like this:
22+
The configuration file should contain the parameters you want to use to run the step. For example, to run the `gwas_catalog_sumstat_preprocess` step, you need to specify the `step.raw_sumstats_path` and `step.out_sumstats_path` parameters. The configuration file should look like this:
2323

2424
=== "my_config.yaml"
2525

@@ -31,20 +31,20 @@ The configuration file should contain the parameters you want to use to run the
3131

3232
This config file will specify that your configuration file will inherit the default configuration (`config`) and everything provided (`_self_`) will overwrite the default configuration.
3333

34-
=== "step/my_gene_index.md"
34+
=== "step/my_gwas_catalog_sumstat_preprocess.md"
3535

3636
``` yaml
3737
defaults:
38-
- gene_index
38+
- gwas_catalog_sumstat_preprocess
3939

40-
target_path: /path/to/target
41-
gene_index_path: /path/to/gene_index
40+
raw_sumstats_path: /path/to/raw_sumstats
41+
out_sumstats_path: /path/to/out_sumstats
4242
```
4343

44-
This config file will inherit the default configuration for the `gene_index` step and overwrite the `target_path` and `gene_index_path` parameters.
44+
This config file will inherit the default configuration for the `gwas_catalog_sumstat_preprocess` step and overwrite the `raw_sumstats_path` and `out_sumstats_path` parameters.
4545

46-
Once you have created the configuration file, you can run your own new `my_gene_index`:
46+
Once you have created the configuration file, you can run your own new `my_gwas_catalog_sumstat_preprocess`:
4747

4848
```bash
49-
gentropy step=my_gene_index --config-dir=config --config-name=my_config
49+
gentropy step=my_gwas_catalog_sumstat_preprocess --config-dir=config --config-name=my_config
5050
```

docs/python_api/datasets/gene_index.md

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Target Index
3+
---
4+
5+
::: gentropy.dataset.target_index.TargetIndex
6+
7+
## Schema
8+
9+
--8<-- "assets/schemas/target_index.md"

docs/python_api/datasources/open_targets/target.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/python_api/steps/gene_index.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/gentropy/assets/schemas/gene_index.json

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)