Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
smeisler committed Aug 17, 2024
1 parent 1fa7373 commit bd32719
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion qsirecon/interfaces/anatomical.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ def _run_interface(self, runtime):
self._results["t1_brain_mask"] = conformed_mask_file

return runtime



class HCPAnatomicalIngressInputSpec(QSIReconAnatomicalIngressInputSpec):
recon_input_dir = traits.Directory(
exists=True, mandatory=True, help="directory containing a single subject's results"
Expand Down
9 changes: 5 additions & 4 deletions qsirecon/interfaces/ingress.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def _run_interface(self, runtime):
self._results["dwi_ref"] = dwiref_file
return runtime


class _HCPDWIIngressInputSpec(QsiReconDWIIngressInputSpec):
dwi_file = File(exists=False, help="The name of what a BIDS dwi file may have been")
data_dir = traits.Directory(
Expand All @@ -198,7 +199,7 @@ def _run_interface(self, runtime):
hcp_bval_file = op.join(dwi_dir, "bvals")
hcp_bvec_file = op.join(dwi_dir, "bvecs") # These are the same as eddy rotated
hcp_dwi_file = op.join(dwi_dir, "data.nii.gz")
#hcp_dwiref_file = op.join(dwi_dir, "dti_FA.nii.gz")
# hcp_dwiref_file = op.join(dwi_dir, "dti_FA.nii.gz")

# The bids_name is what the images will be renamed to
bids_name = Path(self.inputs.dwi_file).name.replace(".nii.gz", "")
Expand All @@ -207,7 +208,7 @@ def _run_interface(self, runtime):
bvec_file = str(runpath / (bids_name + ".bvec"))
b_file = str(runpath / (bids_name + ".b"))
btable_file = str(runpath / (bids_name + "btable.txt"))
#dwiref_file = str(runpath / (bids_name.replace("_dwi", "_dwiref") + ".nii.gz"))
# dwiref_file = str(runpath / (bids_name.replace("_dwi", "_dwiref") + ".nii.gz"))

dwi_conform = ConformDwi(
dwi_file=str(hcp_dwi_file), bval_file=str(hcp_bval_file), bvec_file=str(hcp_bvec_file)
Expand All @@ -231,6 +232,6 @@ def _run_interface(self, runtime):
self._results["b_file"] = b_file

# Create a dwi ref file
#to_lps(nb.load(hcp_dwiref_file)).to_filename(dwiref_file)
#self._results["dwi_ref"] = dwiref_file
# to_lps(nb.load(hcp_dwiref_file)).to_filename(dwiref_file)
# self._results["dwi_ref"] = dwiref_file
return runtime
3 changes: 2 additions & 1 deletion qsirecon/workflows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def init_qsirecon_wf():
)
elif config.workflow.recon_input_pipeline == "hcpya":
from ..utils.ingress import collect_hcp_participants, create_hcp_layout

# The hcp input will always be specified as the bids input - we can't preproc it first
hcp_layout = create_hcp_layout(config.execution.bids_dir)
to_recon_list = collect_hcp_participants(
Expand Down Expand Up @@ -321,7 +322,7 @@ def _get_iterable_dwi_inputs(subject_id):

elif config.workflow.recon_input_pipeline == "ukb":
return create_ukb_layout(ukb_dir=config.execution.bids_dir, participant_label=subject_id)

elif config.workflow.recon_input_pipeline == "hcpya":
return create_hcp_layout(hcp_dir=config.execution.bids_dir, participant_label=subject_id)

Expand Down

0 comments on commit bd32719

Please sign in to comment.