Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fix-reports
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Jul 9, 2024
2 parents bce775a + 555556c commit 4489dd2
Show file tree
Hide file tree
Showing 12 changed files with 224 additions and 225 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ orbs:

.dockersetup: &dockersetup
docker:
- image: pennbbl/qsiprep_build:24.4.29
- image: pennbbl/qsiprep_build:24.7.1
working_directory: /src/qsiprep

runinstall: &runinstall
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN pip install build
RUN apt-get update && \
apt-get install -y --no-install-recommends git

FROM pennbbl/qsiprep_build:24.4.29
FROM pennbbl/qsiprep_build:24.7.1

# Install qsiprep
COPY . /src/qsiprep
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ license = {file = "LICENSE"}
requires-python = ">=3.10"
dependencies = [
'importlib_resources; python_version < "3.11"',
"dipy <= 1.5.0",
"dipy>=1.8.0,<1.9.0",
"dmri-amico == 1.5.4",
"fury",
"indexed_gzip <= 1.8.7",
Expand All @@ -27,13 +27,13 @@ dependencies = [
"networkx ~= 2.8.8",
"nibabel <= 5.2.0",
"nilearn == 0.10.1",
"nipype <= 1.8.6",
"nipype == 1.8.6",
"niworkflows >=1.9,<= 1.10",
"numpy <= 1.26.3",
"pandas < 2.0.0",
"psutil <= 5.9.8",
"pyAFQ <= 1.3.2",
"pybids < 0.16.1",
"pyAFQ == 1.3.2",
"pybids",
"pyyaml",
"scikit-image",
"scikit-learn <= 1.4.0",
Expand Down
2 changes: 1 addition & 1 deletion qsiprep/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def init(cls):
"stimuli",
"sourcedata",
"models",
re.compile(r"^\."),
re.compile(r"\/\.\w+|^\.\w+"), # hidden files
re.compile(r"sub-[a-zA-Z0-9]+(/ses-[a-zA-Z0-9]+)?/(beh|func|eeg|ieeg|meg|perf)"),
]
if cls.participant_label and cls.bids_database_dir is None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"dist_to_waypoint": "",
"rng": "",
"return_idx": false,
"presegment_bundle_dict": "",
"presegment_bundle_dict": null,
"presegment_kwargs": "{}",
"filter_by_endpoints": true,
"dist_to_atlas": 4,
Expand All @@ -104,7 +104,7 @@
"csd_tau": 0.1,
"gtol": 0.01,
"brain_mask_definition": "",
"bundle_info": "",
"bundle_info": null,
"reg_template_spec": "mni_T1",
"mapping_definition": "",
"reg_subject_spec": "power_map",
Expand Down
4 changes: 2 additions & 2 deletions qsiprep/data/pipelines/pyafq_tractometry.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"dist_to_waypoint": "",
"rng": "",
"return_idx": false,
"presegment_bundle_dict": "",
"presegment_bundle_dict": null,
"presegment_kwargs": "{}",
"filter_by_endpoints": true,
"dist_to_atlas": 4,
Expand All @@ -68,7 +68,7 @@
"csd_tau": 0.1,
"gtol": 0.01,
"brain_mask_definition": "",
"bundle_info": "",
"bundle_info": null,
"reg_template_spec": "mni_T1",
"mapping_definition": "",
"reg_subject_spec": "power_map",
Expand Down
182 changes: 90 additions & 92 deletions qsiprep/tests/data/pyafq_recon_external_trk_outputs.txt

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions qsiprep/tests/data/pyafq_recon_full_optional_outputs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
qsirecon-PYAFQ/sub-ABCD/dwi/sub-ABCD_acq-10per000_space-T1w_desc-preproc_dwimap/viz_bundles/sub-ABCD_acq-10per000_coordsys-RASMM_trkmethod-probCSD_recogmethod-AFQ_desc-LeftArcuateviz_dwi.html
qsirecon-PYAFQ/sub-ABCD/dwi/sub-ABCD_acq-10per000_space-T1w_desc-preproc_dwimap/bundles/sub-ABCD_acq-10per000_coordsys-RASMM_trkmethod-probCSD_recogmethod-AFQ_desc-LeftArcuate_tractography.trk
qsirecon-PYAFQ/sub-ABCD/dwi/sub-ABCD_acq-10per000_space-T1w_desc-preproc_dwimap/bundles/sub-ABCD_acq-10per000_coordsys-RASMM_trkmethod-probCSD_recogmethod-AFQ_desc-LeftArcuate_tractography.trk
qsirecon-PYAFQ/sub-ABCD/dwi/sub-ABCD_acq-10per000_space-T1w_desc-preproc_dwimap/viz_bundles/sub-ABCD_acq-10per000_coordsys-RASMM_trkmethod-probCSD_recogmethod-AFQ_desc-LeftArcuateviz_dwi.html
219 changes: 108 additions & 111 deletions qsiprep/tests/data/pyafq_recon_full_outputs.txt

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions qsiprep/tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""Utility functions for tests."""

import lzma
import os
import tarfile
from glob import glob
from gzip import GzipFile
from io import BytesIO

import lzma
import requests
from nipype import logging

Expand Down Expand Up @@ -121,7 +121,9 @@ def check_generated_files(qsiprep_dir, output_list_file, optional_output_list_fi
if found_not_expected:
msg += "\nFound but not expected:\n\t"
msg += "\n\t".join(found_not_expected)
raise ValueError(msg)

if msg:
raise ValueError(msg)


def reorder_expected_outputs():
Expand Down
3 changes: 2 additions & 1 deletion qsiprep/utils/sloppy_recon.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def make_sloppy(spec):
("MRTrix3", "global_tractography"): {"niters": 10000},
("pyAFQ", "pyafq_tractometry"): {
"mapping_definition": 'AffMap(affine_kwargs={"level_iters": [10, 10, 10]})',
"bundle_info": '["SLF_L", "ARC_L", "CST_L", "CST_R"]',
"bundle_info": 'default18_bd()["Left Superior Longitudinal", "Left Arcuate", '
'"Left Corticospinal", "Right Corticospinal"]',
"n_seeds": 10000,
"random_seeds": True,
"export": "all_bundles_figure",
Expand Down
13 changes: 5 additions & 8 deletions qsiprep/workflows/recon/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,11 @@ def init_single_subject_recon_wf(subject_id):
(recon_full_inputs[dwi_file], dwi_recon_wfs[dwi_file],
[(trait, "inputnode." + trait) for trait in recon_workflow_input_fields]),

(
anat_ingress_node if config.workflow.recon_input_pipeline == "qsiprep"
else anat_ingress_nodes[dwi_file],
dwi_individual_anatomical_wfs[dwi_file], [
(f"outputnode.{trait}", f"inputnode.{trait}")
for trait in anatomical_workflow_outputs
]
)
(anat_ingress_node if config.workflow.recon_input_pipeline == "qsiprep"
else anat_ingress_nodes[dwi_file],
dwi_individual_anatomical_wfs[dwi_file],
[(f"outputnode.{trait}", f"inputnode.{trait}")
for trait in anatomical_workflow_outputs])
]) # fmt:skip

# Fill-in datasinks and reportlet datasinks for the anatomical workflow
Expand Down

0 comments on commit 4489dd2

Please sign in to comment.