diff --git a/qsirecon/interfaces/anatomical.py b/qsirecon/interfaces/anatomical.py index 0f85ba9e..a10e450f 100644 --- a/qsirecon/interfaces/anatomical.py +++ b/qsirecon/interfaces/anatomical.py @@ -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" diff --git a/qsirecon/interfaces/ingress.py b/qsirecon/interfaces/ingress.py index da6df0e2..ae40672e 100644 --- a/qsirecon/interfaces/ingress.py +++ b/qsirecon/interfaces/ingress.py @@ -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( @@ -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", "") @@ -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) @@ -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 diff --git a/qsirecon/workflows/base.py b/qsirecon/workflows/base.py index a4052608..1764044a 100644 --- a/qsirecon/workflows/base.py +++ b/qsirecon/workflows/base.py @@ -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( @@ -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)