-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
## Rules to create build annonars regions annotation database.. | ||
|
||
|
||
rule work_annonars_regions_download: # -- download clingen regions | ||
output: | ||
"work/download/clingen/{genome_release}/{today}/ClinGen_region_curation_list_{genome_release}.tsv", | ||
shell: | ||
r""" | ||
if [[ "{wildcards.genome_release}" == "grch38" ]]; then | ||
GENOME=GRCh37 | ||
else | ||
GENOME=GRCh38 | ||
fi | ||
wget -O {output} \ | ||
ftp://ftp.clinicalgenome.org/ClinGen_region_curation_list_$GENOME.tsv | ||
""" | ||
|
||
rule output_annonars_regions: # -- build annonars regions RocksDB file | ||
input: | ||
"work/download/clingen/{genome_release}/{date}/ClinGen_region_curation_list_{genome_release}.tsv", | ||
output: | ||
rocksdb_identity=( | ||
"output/full/annonars/regions-{genome_release}-{date}+{v_annonars}/" | ||
"rocksdb/IDENTITY" | ||
), | ||
spec_yaml=( | ||
"output/full/annonars/regions-{genome_release}-{date}+{v_annonars}/spec.yaml" | ||
), | ||
wildcard_constraints: | ||
v_refseq=RE_VERSION, | ||
v_annonars=RE_VERSION, | ||
shell: | ||
r""" | ||
if [[ "$(date +%Y%m%d)" != "{wildcards.date}" ]] && [[ "{FORCE_TODAY}" != "True" ]]; then | ||
>&2 echo "{wildcards.date} is not today" | ||
exit 1 | ||
fi | ||
annonars regions import -vvv \ | ||
--genome-release {wildcards.genome_release} \ | ||
--path-in-clingen {input} \ | ||
--path-out-rocksdb $(dirname {output.rocksdb_identity}) | ||
varfish-db-downloader tpl \ | ||
--template rules/output/annonars/regions.spec.yaml \ | ||
--value today={TODAY} \ | ||
\ | ||
--value version={wildcards.date}+{wildcards.v_annonars} \ | ||
\ | ||
--value v_annonars={wildcards.v_annonars} \ | ||
--value v_downloader={PV.downloader} \ | ||
> {output.spec_yaml} | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
dc.identifier: annonars/regions:{{ version }}-{{ genome_release }} | ||
dc.title: annonars regions annotation RocksDB | ||
dc.creator: VarFish Developer Teams | ||
dc.format: application/x-rocksdb | ||
dc.date: {{ today }} | ||
x-version: {{ version }} | ||
x-genome-release: {{ genome_release }} | ||
dc.description: | | ||
RocksDB with region annotation. | ||
dc.source: | ||
- https://search.clinicalgenome.org/kb/gene-dosage | ||
x-created-from: | ||
- name: ClinGen Region Dosage Pathogenicity | ||
version: {{ today }} |