Commit fbfc12bf authored by David Hoksza's avatar David Hoksza
Browse files

opnetargets variants in progress

parent 382c637c
......@@ -12,7 +12,7 @@ DISGENET_CNT_THRESHOLD=50
mkdir $RES_DIR
# Extract genes and variants associated with a disease
# -------------- 1. Extract genes and variants associated with a disease --------------
disgenet_out_path=${RES_DIR}/01-disgenet-id_${ORPHANET_IDS_UNDERSCORE}-n_${DISGENET_CNT_THRESHOLD}.json
$PYTHON_BIN $ASSOCIATIONS_DIR/disgenet.py -o ${ORPHANET_IDS} -n ${DISGENET_CNT_THRESHOLD} > ${disgenet_out_path}
echo "Disgenet gene and variant associations stored in ${disgenet_out_path}"
......@@ -37,4 +37,7 @@ echo "Variants stored in ${variants_out_path}"
minerva_variants_out_path=${RES_DIR}/04-minerva-variants-id_${ORPHANET_IDS_UNDERSCORE}.txt
$PYTHON_BIN $ASSOCIATIONS_DIR/minerva_variants.py -f ${variants_out_path} > ${minerva_variants_out_path}
# ------------------------------ 2. Obtain pathways ------------------------------
#R -f path_to_script
......@@ -33,10 +33,12 @@ def get_variants(genes_evidence: List[Dict]):
target = s_ge[0]
disease = s_ge[1]
res = requests.get(
res = requests.os(
"https://platform-api.opentargets.io/v3/platform/public/association/filter",
params={'target': target,
'disease': disease
'disease': disease,
'data_type': 'genetic_association',
'size': 10000
}
)
if res.status_code == requests.codes.ok:
......@@ -62,6 +64,7 @@ if __name__ == '__main__':
genes_evidence = get_genes_and_evidence(args.orphanet, args.score)
get_variants(genes_evidence)
print(json.dumps(genes_evidence, indent=2))
......
Supports Markdown
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