Commit 6b25414c authored by David Hoksza's avatar David Hoksza
Browse files

enable passing parameters file; fixing minerva variants

parent d92ab358
#!/usr/bin/env bash
# Load parameters either from parameters.sh, or from a file provided as the first parameter of the script
if [[ $1 == "" ]]; then
source parameters.sh
else
source $1
fi
# ------------------------- PARAMETERS TO SET -------------------------
source parameters.sh
# ------------------------- PARAMETERS TO SET -------------------------
ASSOCIATIONS_DIR=associations/
......
......@@ -4,6 +4,7 @@ import json
import argparse
from typing import List, Dict, Set
import requests
import copy
def get_dbsnp(ids: List[str]) -> List[Dict]:
......@@ -119,7 +120,7 @@ def get_dbsnp(ids: List[str]) -> List[Dict]:
"position": position,
"original_dna": original_dna,
"alternative_dna": alternative_dna,
"name": name,
"gene_name": name,
"description": description,
"color": color,
"contig": contig,
......@@ -158,13 +159,18 @@ def get_minerva_format(db_snps: List[Dict]) -> str:
if len(db_snps) == 0:
return out
out += "#NAME=DISEASE_ASSOCIATED_VARIANTS\n"
out += "#TYPE=GENETIC_VARIANT\n"
out += "#GENOME_TYPE=UCSC\n"
out += "#GENOME_VERSION=hg19\n"
out += "\t".join(db_snps[0].keys()) + "\n"
keys = list(db_snps[0].keys())
keys.remove('variant_identifier')
out += "\t".join(keys) + "\n"
for snp in db_snps:
out += "\t".join(snp.values()) + "\n"
snp_cp = copy.deepcopy(snp)
del snp_cp['variant_identifier']
out += "\t".join(snp_cp.values()) + "\n"
return out
......
......@@ -12,8 +12,8 @@ USE_OPENTARGETS=1
OPENTARGETS_CNT_THRESHOLD=50
OPENTARGETS_ASSOCIATION_SCORE_THRESHOLD="0.3"
ENRICH_MAX_AREAS_PER_MAP=1
MAX_AREAS_PER_PATHWAY_DB=1
ENRICH_MAX_AREAS_PER_MAP=5
MAX_AREAS_PER_PATHWAY_DB=5
BUILD_MAP_GENERATOR=0 #1 for building it
STOP_AFTER_STAGE=-1
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment