Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasGensollen committed Nov 7, 2024
1 parent b951aad commit 8afcddf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion clinica/pipelines/pet_surface/pet_surface_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def _build_input_node_cross_sectional(self):
if pet_errors:
all_errors.append(format_clinica_file_reader_errors(pet_errors))

patterns = [query_pattern_factory(QueryPatternName.T1_FREESURFER_ORIG_NU)]
patterns = [query_pattern_factory(QueryPatternName.T1_FREESURFER_ORIG_NU)()]
patterns.extend(
[
query_pattern_factory(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _build_input_node(self):
import nipype.pipeline.engine as npe

from clinica.utils.exceptions import ClinicaException
from clinica.utils.input_files import t1_volume_dartel_input_tissue
from clinica.utils.input_files import QueryPatternName, query_pattern_factory
from clinica.utils.inputs import clinica_list_of_files_reader
from clinica.utils.stream import cprint
from clinica.utils.ux import (
Expand Down Expand Up @@ -91,16 +91,18 @@ def _build_input_node(self):
fields=self.get_input_fields(), mandatory_inputs=True
),
)

patterns = [
query_pattern_factory(QueryPatternName.T1_VOLUME_DARTEL_INPUT_TISSUE)(
tissue_number
)
for tissue_number in self.parameters["dartel_tissues"]
]
try:
d_input = clinica_list_of_files_reader(
self.subjects,
self.sessions,
self.caps_directory,
[
t1_volume_dartel_input_tissue(tissue_number)
for tissue_number in self.parameters["dartel_tissues"]
],
patterns,
)
# d_input is a list of size len(self.parameters['dartel_tissues'])
# Each element of this list is a list of size len(self.subjects)
Expand Down
2 changes: 1 addition & 1 deletion clinica/utils/input_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def get_dwi_preprocessed_brainmask(*args, **kwargs) -> QueryPattern:
def get_dwi_fmap_phasediff_file(filetype: Union[str, DWIFileType]) -> QueryPattern:
filetype = DWIFileType(filetype)
return QueryPattern(
f"fmap/sub-*_ses-*_phasediff.{filetype.value}",
f"fmap/sub-*_ses-*_phasediff.{filetype.value}*",
f"phasediff {filetype.value} file",
"",
)
Expand Down

0 comments on commit 8afcddf

Please sign in to comment.