diff --git a/Snakefile b/Snakefile index 93b15b7..782ad31 100644 --- a/Snakefile +++ b/Snakefile @@ -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 ================================================== # @@ -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", # =============================================================================================== diff --git a/rules/reduced/annonars.smk b/rules/reduced/annonars.smk index 0ad7134..67c0b61 100644 --- a/rules/reduced/annonars.smk +++ b/rules/reduced/annonars.smk @@ -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 @@ -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, @@ -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} """ diff --git a/rules/reduced/mehari.smk b/rules/reduced/mehari.smk index 2e0a0b0..e7a1b16 100644 --- a/rules/reduced/mehari.smk +++ b/rules/reduced/mehari.smk @@ -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 @@ -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, @@ -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} """