Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: copy over spec.yaml to reduced datasets #97

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 42 additions & 6 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -276,24 +276,42 @@ rule all:
f"output/reduced-dev/viguno/hpo-{DV.hpo}+{PV.viguno}/hpo.bin",
# -- annonars
f"output/reduced-dev/annonars/cadd-grch37-{DV.cadd}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/cadd-grch37-{DV.cadd}+{PV.annonars}/spec.yaml",
f"output/reduced-dev/annonars/cadd-grch38-{DV.cadd}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/cadd-grch38-{DV.cadd}+{PV.annonars}/spec.yaml",
f"output/reduced-dev/annonars/cons-grch37-{DV.ucsc_cons_37}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/cons-grch37-{DV.ucsc_cons_37}+{PV.annonars}/spec.yaml",
f"output/reduced-dev/annonars/cons-grch38-{DV.ucsc_cons_38}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/dbsnp-grch37-{DV.dbsnp}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/dbsnp-grch38-{DV.dbsnp}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/cons-grch38-{DV.ucsc_cons_38}+{PV.annonars}/spec.yaml",
f"output/reduced-dev/annonars/dbnsfp-grch37-{DV.dbnsfp}a+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/dbnsfp-grch38-{DV.dbnsfp}a+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/dbnsfp-grch37-{DV.dbnsfp}a+{PV.annonars}/spec.yaml",
f"output/reduced-dev/annonars/dbnsfp-grch37-{DV.dbnsfp}c+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/dbnsfp-grch37-{DV.dbnsfp}c+{PV.annonars}/spec.yaml",
f"output/reduced-dev/annonars/dbnsfp-grch38-{DV.dbnsfp}a+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/dbnsfp-grch38-{DV.dbnsfp}a+{PV.annonars}/spec.yaml",
f"output/reduced-dev/annonars/dbnsfp-grch38-{DV.dbnsfp}c+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/dbnsfp-grch38-{DV.dbnsfp}c+{PV.annonars}/spec.yaml",
f"output/reduced-dev/annonars/dbscsnv-grch37-{DV.dbscsnv}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/dbscsnv-grch37-{DV.dbscsnv}+{PV.annonars}/spec.yaml",
f"output/reduced-dev/annonars/dbscsnv-grch38-{DV.dbscsnv}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/dbscsnv-grch38-{DV.dbscsnv}+{PV.annonars}/spec.yaml",
f"output/reduced-dev/annonars/dbsnp-grch37-{DV.dbsnp}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/dbsnp-grch37-{DV.dbsnp}+{PV.annonars}/spec.yaml",
f"output/reduced-dev/annonars/dbsnp-grch38-{DV.dbsnp}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/dbsnp-grch38-{DV.dbsnp}+{PV.annonars}/spec.yaml",
f"output/reduced-dev/annonars/gnomad-exomes-grch37-{DV.gnomad_v2}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/gnomad-exomes-grch37-{DV.gnomad_v2}+{PV.annonars}/spec.yaml",
f"output/reduced-dev/annonars/gnomad-exomes-grch38-{DV.gnomad_v4}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/gnomad-exomes-grch38-{DV.gnomad_v4}+{PV.annonars}/spec.yaml",
f"output/reduced-dev/annonars/gnomad-genomes-grch37-{DV.gnomad_v2}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/gnomad-genomes-grch37-{DV.gnomad_v2}+{PV.annonars}/spec.yaml",
f"output/reduced-dev/annonars/gnomad-genomes-grch38-{DV.gnomad_v4}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/annonars/gnomad-genomes-grch38-{DV.gnomad_v4}+{PV.annonars}/spec.yaml",
# -- mehari
f"output/reduced-dev/mehari/freqs-grch37-{DV.gnomad_v2}+{DV.gnomad_v2}+{DV.gnomad_mtdna}+{DV.helixmtdb}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/mehari/freqs-grch37-{DV.gnomad_v2}+{DV.gnomad_v2}+{DV.gnomad_mtdna}+{DV.helixmtdb}+{PV.annonars}/spec.yaml",
f"output/reduced-dev/mehari/freqs-grch38-{DV.gnomad_v4}+{DV.gnomad_v4}+{DV.gnomad_mtdna}+{DV.helixmtdb}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-dev/mehari/freqs-grch38-{DV.gnomad_v4}+{DV.gnomad_v4}+{DV.gnomad_mtdna}+{DV.helixmtdb}+{PV.annonars}/spec.yaml",
#
# == exomes (reduced data) directories ==================================================
#
Expand All @@ -307,24 +325,42 @@ rule all:
f"output/reduced-exomes/viguno/hpo-{DV.hpo}+{PV.viguno}/hpo.bin",
# -- annonars
f"output/reduced-exomes/annonars/cadd-grch37-{DV.cadd}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/cadd-grch37-{DV.cadd}+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/annonars/cadd-grch38-{DV.cadd}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/cadd-grch38-{DV.cadd}+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/annonars/cons-grch37-{DV.ucsc_cons_37}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/cons-grch37-{DV.ucsc_cons_37}+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/annonars/cons-grch38-{DV.ucsc_cons_38}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/dbsnp-grch37-{DV.dbsnp}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/dbsnp-grch38-{DV.dbsnp}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/cons-grch38-{DV.ucsc_cons_38}+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/annonars/dbnsfp-grch37-{DV.dbnsfp}a+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/dbnsfp-grch38-{DV.dbnsfp}a+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/dbnsfp-grch37-{DV.dbnsfp}a+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/annonars/dbnsfp-grch37-{DV.dbnsfp}c+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/dbnsfp-grch37-{DV.dbnsfp}c+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/annonars/dbnsfp-grch38-{DV.dbnsfp}a+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/dbnsfp-grch38-{DV.dbnsfp}a+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/annonars/dbnsfp-grch38-{DV.dbnsfp}c+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/dbnsfp-grch38-{DV.dbnsfp}c+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/annonars/dbscsnv-grch37-{DV.dbscsnv}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/dbscsnv-grch37-{DV.dbscsnv}+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/annonars/dbscsnv-grch38-{DV.dbscsnv}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/dbscsnv-grch38-{DV.dbscsnv}+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/annonars/dbsnp-grch37-{DV.dbsnp}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/dbsnp-grch37-{DV.dbsnp}+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/annonars/dbsnp-grch38-{DV.dbsnp}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/dbsnp-grch38-{DV.dbsnp}+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/annonars/gnomad-exomes-grch37-{DV.gnomad_v2}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/gnomad-exomes-grch37-{DV.gnomad_v2}+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/annonars/gnomad-exomes-grch38-{DV.gnomad_v4}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/gnomad-exomes-grch38-{DV.gnomad_v4}+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/annonars/gnomad-genomes-grch37-{DV.gnomad_v2}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/gnomad-genomes-grch37-{DV.gnomad_v2}+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/annonars/gnomad-genomes-grch38-{DV.gnomad_v4}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/annonars/gnomad-genomes-grch38-{DV.gnomad_v4}+{PV.annonars}/spec.yaml",
# -- mehari
f"output/reduced-exomes/mehari/freqs-grch37-{DV.gnomad_v2}+{DV.gnomad_v2}+{DV.gnomad_mtdna}+{DV.helixmtdb}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/mehari/freqs-grch37-{DV.gnomad_v2}+{DV.gnomad_v2}+{DV.gnomad_mtdna}+{DV.helixmtdb}+{PV.annonars}/spec.yaml",
f"output/reduced-exomes/mehari/freqs-grch38-{DV.gnomad_v4}+{DV.gnomad_v4}+{DV.gnomad_mtdna}+{DV.helixmtdb}+{PV.annonars}/rocksdb/IDENTITY",
f"output/reduced-exomes/mehari/freqs-grch38-{DV.gnomad_v4}+{DV.gnomad_v4}+{DV.gnomad_mtdna}+{DV.helixmtdb}+{PV.annonars}/spec.yaml",


# ===============================================================================================
Expand Down
7 changes: 7 additions & 0 deletions rules/reduced/annonars.smk
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ def input_subset_annonars(wildcards):
f"output/full/annonars/{wildcards.name}-{wildcards.genome_release}-"
f"{wildcards.version_multi}/rocksdb/IDENTITY"
),
"spec_yaml": (
f"output/full/annonars/{wildcards.name}-{wildcards.genome_release}-"
f"{wildcards.version_multi}/spec.yaml"
),
}
return result

Expand All @@ -27,6 +31,7 @@ rule subset_annonars: # -- create exomes subset
unpack(input_subset_annonars),
output:
rocksdb_identity="output/reduced-{set_name}/annonars/{name}-{genome_release}-{version_multi}/rocksdb/IDENTITY",
spec_yaml="output/reduced-{set_name}/annonars/{name}-{genome_release}-{version_multi}/spec.yaml",
wildcard_constraints:
name=RE_NAME,
genome_release=RE_GENOME,
Expand All @@ -44,4 +49,6 @@ rule subset_annonars: # -- create exomes subset
--path-in $(dirname {input.rocksdb_identity}) \
--path-out $(dirname {output.rocksdb_identity}) \
--path-beds {input.bed}

cp {input.spec_yaml} {output.spec_yaml}
"""
7 changes: 7 additions & 0 deletions rules/reduced/mehari.smk
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ def input_subset_mehari(wildcards):
f"output/full/mehari/freqs-{wildcards.genome_release}-"
f"{wildcards.version_multi}/rocksdb/IDENTITY"
),
"spec_yaml": (
f"output/full/mehari/freqs-{wildcards.genome_release}-"
f"{wildcards.version_multi}/spec.yaml"
),
}
return result

Expand All @@ -27,6 +31,7 @@ rule subset_mehari: # -- create exomes subset
unpack(input_subset_mehari),
output:
rocksdb_identity="output/reduced-{set_name}/mehari/freqs-{genome_release}-{version_multi}/rocksdb/IDENTITY",
spec_yaml="output/reduced-{set_name}/mehari/freqs-{genome_release}-{version_multi}/spec.yaml",
wildcard_constraints:
genome_release=RE_GENOME,
v_hpo=RE_VERSION,
Expand All @@ -41,4 +46,6 @@ rule subset_mehari: # -- create exomes subset
--path-in $(dirname {input.rocksdb_identity}) \
--path-out $(dirname {output.rocksdb_identity}) \
--path-beds {input.bed}

cp {input.spec_yaml} {output.spec_yaml}
"""
Loading