Skip to content

Commit

Permalink
more linting
Browse files Browse the repository at this point in the history
  • Loading branch information
akhanf committed Feb 15, 2024
1 parent d9373c7 commit e85329b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
16 changes: 11 additions & 5 deletions hippunfold/workflow/rules/downloads.smk
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# create rules for downloading each atlas, since output files need to be specified
# without using wildcards
for atlas in config['atlas']:
rule:
name: f"download_atlas_{atlas}"
for atlas in config["atlas"]:

rule:
name:
f"download_atlas_{atlas}"
params:
url=config["atlas_links_url"][atlas],
output:
Expand All @@ -13,13 +15,17 @@ for atlas in config['atlas']:
"wget https://{params.url} -O {output.model_zip}"

rule:
name: f"unzip_download_atlas_{atlas}"
name:
f"unzip_download_atlas_{atlas}"
input:
model_zip=os.path.join(download_dir, atlas + ".zip"),
params:
dir=os.path.join(download_dir, atlas),
output:
[expand(Path(download_dir)/path,hemi=config['hemi']) for key,path in config['atlas_files'][atlas].items()]
[
expand(Path(download_dir) / path, hemi=config["hemi"])
for key, path in config["atlas_files"][atlas].items()
],
shell:
"unzip {input.model_zip} -d {params.dir}"

Expand Down
3 changes: 2 additions & 1 deletion hippunfold/workflow/rules/qc.smk
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ rule get_subfield_vols_subj:
hemi=config["hemi"],
allow_missing=True,
),
lookup_tsv=lambda wildcards: Path(download_dir) / config["atlas_files"][wildcards.atlas]["subfields_list"]
lookup_tsv=lambda wildcards: Path(download_dir)
/ config["atlas_files"][wildcards.atlas]["subfields_list"],
group:
"subj"
output:
Expand Down

0 comments on commit e85329b

Please sign in to comment.