PGx: ClinPGx variant-based genes (PGX-008) and --guideline dpwg (PGX-025)
- fetch_sources.sh downloads ClinPGx clinicalVariants (CC BY-SA 4.0); pgx db build adds genotype-only variant-based genes (levels 1A-2B, level 3 for the parity list), rsIDs resolved from the manifest's probes: 70 genes in the DB. - pgx phenotype --guideline dpwg: CPIC mappings for CPIC genes (as ClinPGx curates DPWG), no phenotype for DPWG-only genes (flags dpwg_via_cpic_mapping / dpwg_mapping_not_available). K-029 updated.
This commit is contained in:
1 parent
4d9efab2fc
commit
cc89e9b334
8 files changed
+161
-10
No files matched your search
@@ -56,3 +56,20 @@ files = {p.name: hashlib.sha256(p.read_bytes()).hexdigest() for p in sorted(d.gl
|
||||
"files": files}, indent=1))
|
||||
print("PharmVar version", ",".join(sorted(vers)))
|
||||
PY
|
||||
|
||||
# ---- ClinPGx (formerly PharmGKB; CC BY-SA 4.0): clinical-annotation variants (variant-based genes, genotype only)
|
||||
CP="$OUT/clinpgx-$DATE"
|
||||
mkdir -p "$CP"
|
||||
curl -sSfL --retry 3 -o "$CP/clinicalVariants.zip" "https://api.clinpgx.org/v1/download/file/data/clinicalVariants.zip"
|
||||
python3 - "$CP" <<'PY'
|
||||
import hashlib, json, pathlib, sys, zipfile
|
||||
d = pathlib.Path(sys.argv[1])
|
||||
z = zipfile.ZipFile(d / "clinicalVariants.zip")
|
||||
created = next((n.split("_", 1)[1].rsplit(".", 1)[0] for n in z.namelist() if n.startswith("CREATED_")), "")
|
||||
(d / "source.json").write_text(json.dumps({"name": "ClinPGx clinical variants", "version": created,
|
||||
"retrieved": d.name.split("-")[1], "url": "https://www.clinpgx.org",
|
||||
"license": "CC BY-SA 4.0",
|
||||
"files": {"clinicalVariants.zip": hashlib.sha256(
|
||||
(d / "clinicalVariants.zip").read_bytes()).hexdigest()}}, indent=1))
|
||||
print("ClinPGx clinical variants", created)
|
||||
PY
|
||||
Reference in new issue
Block a user