Skip to content

Commit

Permalink
update from dbsc -> scattr
Browse files Browse the repository at this point in the history
  • Loading branch information
kaitj committed Feb 12, 2023
1 parent fc1deb5 commit 67bcd32
Show file tree
Hide file tree
Showing 55 changed files with 45 additions and 56 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ RUN mkdir -p /opt \

# Stage: runtime
FROM build AS runtime
COPY ./dbsc /opt/dbsc
# ENTRYPOINT ["/opt/dbsc/run.py"]
COPY ./scattr /opt/scattr
# ENTRYPOINT ["/opt/scattr/run.py"]
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
## Deep Brain Structural Connectivity (DBSC)
## Structural Connectivity Applied To Targetted Regions (SCATTR)

**Development in-progress** (conversion from shell scripts)

DBSC is a BIDS App that performs tractography to identify
SCATTR is a BIDS App that performs tractography to identify
connections between subcortical structures (i.e. map the subcortical
connectome), making use of existing neuroimaging tools like `prepdwi`,
`Freesurfer`, and `Mrtrix3`.
Expand All @@ -11,7 +9,7 @@ This workflow was used to process the data for the analysis from
[`hcp_subcortical_repo`](https://github.com/kaitj/hcp_subcortical_repro).

### Contributing
Clone the git repository. DBSC dependencies are managed with Poetry
Clone the git repository. SCATTR dependencies are managed with Poetry
(version 1.2.x), which you'll need installed on your machine.
You can find instructions on the Poetry
[website](https://python-poetry.org/docs/).
Expand All @@ -23,7 +21,7 @@ poetry install
poetry run poe setup
```

DBSC uses poethepoet as a task runner.
SCATTR uses poethepoet as a task runner.
You can see what commands are available by running:

```
Expand All @@ -33,7 +31,7 @@ poetry run poe
If you wish, you can also run poe [command] directly by installing poethepoet
on your system. Follow the install instructions at the link above.

DBSC uses pre-commit hooks (installed via the poe setup command above) to lint
SCATTR uses pre-commit hooks (installed via the poe setup command above) to lint
and format code (we use black, isort, flake8). By default, these hooks are
run on every commit.

Expand Down
14 changes: 0 additions & 14 deletions dbsc/pipeline_description.json

This file was deleted.

9 changes: 0 additions & 9 deletions dbsc/resources/zona_bb_subcortex/transforms/README.md

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
26 changes: 13 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "Deep Brain Structural Connectivity"
name = "scattr"
version = "0.1.0-pre.1"
description = "Snakebids app for mapping the subcortical connectome"
description = "Snakebids app for structural connectivity between targetted regions"
authors = [
"Jason Kai <tkai@uwo.ca>",
"Tristan Kuehn",
Expand Down Expand Up @@ -38,13 +38,13 @@ build-backend = "poetry.core.masonry.api"
setup = "pre-commit install"
yamlfix = { shell = "find . -type f \\( -iname \\*.yaml -o -iname \\*.yml ! -iname snakemake* ! -iname snakebids* \\) -exec yamlfix {} \\;" }
yamlfix-check = { shell = "find . -type f \\( -iname \\*.yaml -o -iname \\*.yml ! -iname snakemake* ! -iname snakebids* \\) -exec yamlfix --check {} \\;" }
isort = "isort dbsc"
isort-check = "isort -c dbsc"
black = "black dbsc"
black-check = "black --check dbsc"
flake8 = "flake8 dbsc"
snakefmt = "snakefmt dbsc"
snakefmt-check = "snakefmt --check dbsc"
isort = "isort scattr"
isort-check = "isort -c scattr"
black = "black scattr"
black-check = "black --check scattr"
flake8 = "flake8 scattr"
snakefmt = "snakefmt scattr"
snakefmt-check = "snakefmt --check scattr"
quality = ["yamlfix", "isort", "black", "flake8", "snakefmt"]
quality-check = [
"yamlfix-check",
Expand All @@ -53,10 +53,10 @@ quality-check = [
"flake8",
"snakefmt-check",
]
test_base = { shell = "python ./dbsc/run.py ./test/data/bids ./test/data/derivatives/ participant -np --force-output" }
test_freesurfer = { shell = "python ./dbsc/run.py ./test/data/bids test/data/derivatives/ participant --freesurfer_dir ./test/data/derivatives/freesurfer -np --force-output" }
test_responsemean = { shell = "python ./dbsc/run.py ./test/data/bids test/data/derivatives/ participant --responsemean_dir ./test/data/derivatives/mrtrix/avg -np --force-output" }
test_dwi = { shell = "python ./dbsc/run.py ./test/data/bids_nodwi test/data/derivatives/ participant --dwi_dir ./test/data/derivatives/prepdwi -np --force-output" }
test_base = { shell = "python ./scattr/run.py ./test/data/bids ./test/data/derivatives/ participant -np --force-output" }
test_freesurfer = { shell = "python ./scattr/run.py ./test/data/bids test/data/derivatives/ participant --freesurfer_dir ./test/data/derivatives/freesurfer -np --force-output" }
test_responsemean = { shell = "python ./scattr/run.py ./test/data/bids test/data/derivatives/ participant --responsemean_dir ./test/data/derivatives/mrtrix/avg -np --force-output" }
test_dwi = { shell = "python ./scattr/run.py ./test/data/bids_nodwi test/data/derivatives/ participant --dwi_dir ./test/data/derivatives/prepdwi -np --force-output" }
test = ["test_base", "test_freesurfer", "test_responsemean", "test_dwi"]

[tool.isort]
Expand Down
16 changes: 8 additions & 8 deletions dbsc/config/snakebids.yml → scattr/config/snakebids.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@ freesurfer:
# Containers
# NOTE: Update from latest to use specific tags
singularity:
freesurfer: /project/6050199/akhanf/singularity/bids-apps/pwighton_freesurfer_7.1.0.sif # "docker://pwighton/freesurfer:7.2.0"
neuroglia-core: /project/6050199/akhanf/singularity/bids-apps/khanlab_neuroglia-core_latest.sif # "docker://khanlab/neuroglia-core:latest"
ants: /project/6050199/akhanf/singularity/kaczmarj_ants_2.3.4.sif # "docker://kaczmarj/ants:2.3.4"
mrtrix: /project/6050199/tkai/singularity/mrtrix3_3.0.3_parallel.sif # "docker://brainlife/mrtrix3:3.0.3"
labelmerge: /project/6050199/tkai/singularity/labelmerge_v0.1.0.sif # "docker://kaitj/labelmerge:v0.1.0"
dbsc: /project/6050199/tkai/singularity/dbsc_v0.1.0.sif # "docker:kaitj/dbsc:v0.1.0"

fs_license: /project/6050199/akhanf/opt/freesurfer/.license # /path/to/fs/license
freesurfer: "docker://pwighton/freesurfer:7.2.0"
neuroglia-core: "docker://khanlab/neuroglia-core:latest"
ants: "docker://kaczmarj/ants:2.3.4"
mrtrix: "docker://brainlife/mrtrix3:3.0.3"
labelmerge: "docker://kaitj/labelmerge:v0.1.0"
scattr: "docker:kaitj/scattr:v0.1.0"

fs_license: /path/to/fs/license
14 changes: 14 additions & 0 deletions scattr/pipeline_description.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"Name": "Structural Connectivity Applied To Targetted Regions (SCATTR)",
"BIDSVersion": "1.4.0",
"DatasetType": "derivative",
"GeneratedBy": [
{
"Name": "Structural Connectivity Applied To Targetted Regions (SCATTR)",
"Version": "0.1.0",
"CodeURL": "https://github.com/khanlab/scattr",
"Author": "Jason Kai",
"AuthorEmail": "tkai@uwo.ca"
}
]
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion dbsc/run.py → scattr/run.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

def get_parser():
"""Exposes parser for sphinx doc generation, cwd is the docs dir"""
app = SnakeBidsApp("../dbsc", skip_parse_args=True)
app = SnakeBidsApp("../scattr", skip_parse_args=True)
return app.parser


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ rule get_num_nodes:
group:
"subcortical_2"
container:
config["singularity"]["dbsc"]
config["singularity"]["scattr"]
script:
"../scripts/zona_bb_subcortex/get_num_labels.py"

Expand Down Expand Up @@ -340,6 +340,6 @@ rule create_convex_hull:
group:
"subcortical_2"
container:
config["singularity"]["dbsc"]
config["singularity"]["scattr"]
script:
"../scripts/zona_bb_subcortex/convexHull_roi.py"

0 comments on commit 67bcd32

Please sign in to comment.