Skip to content

Commit

Permalink
require MAF column argument
Browse files Browse the repository at this point in the history
  • Loading branch information
HolEv committed Oct 12, 2023
1 parent ec38c0c commit 120968f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
9 changes: 2 additions & 7 deletions deeprvat/seed_gene_discovery/seed_gene_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def update_config(
simulated_phenotype_file: str,
variant_type: Optional[str],
rare_maf: Optional[float],
maf_column: Optional[str],
maf_column: str,
new_config_file: str,
):
with open(old_config_file) as f:
Expand All @@ -479,12 +479,7 @@ def update_config(
config["data"]["dataset_config"][
"sim_phenotype_file"
] = simulated_phenotype_file
if maf_column is None:
annotations = config["data"]["dataset_config"]["annotations"]
af_pattern = re.compile(r".*(_MAF|_AF|MAF)\b")
rare_maf_col = [s for s in annotations if af_pattern.match(s)]
assert len(rare_maf_col) == 1
maf_column = rare_maf_col[0]
logger.info(f'Reading MAF column from column {maf_column}')

if phenotype is not None:
config["data"]["dataset_config"]["y_phenotypes"] = [phenotype]
Expand Down
1 change: 1 addition & 0 deletions pipelines/seed_gene_discovery.snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ rule config:
"seed_gene_pipeline update-config "
+ "--phenotype {wildcards.phenotype} "
+ "--variant-type {wildcards.vtype} "
+ "--maf-column MAF "
+ "--rare-maf "
+ "{params.rare_maf}"
+ " {input.config} "
Expand Down

0 comments on commit 120968f

Please sign in to comment.