Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
remlfit = afni.Remlfit()
remlfit.inputs.in_files = img_path
remlfit.inputs.matrix = design_fname
remlfit.inputs.out_file = "glt_results.nii.gz"
remlfit.inputs.var_file = "glt_extra_variables.nii.gz"
remlfit.inputs.tout = True
remlfit.inputs.rout = True
remlfit.inputs.fout = True
remlfit.inputs.verb = True
remlfit.inputs.usetemp = True
remlfit.inputs.goforit = True
remlfit.inputs.mask = self.inputs.mask_file
reml_res = remlfit.run()
# get pvals and zscore buckets (niftis with heterogenous intent codes)
pval = Pval()
pval.inputs.in_file = reml_res.outputs.out_file
pval.inputs.out_file = "pval_maps.nii.gz"
pvals = pval.run()
zscore = Pval()
zscore.inputs.in_file = reml_res.outputs.out_file
zscore.inputs.out_file = "zscore_maps.nii.gz"
zscore.inputs.zscore = True
zscores = zscore.run()
# create maps object
maps = {
"stat": nb.load(reml_res.outputs.out_file),
"effect_variance": nb.load(reml_res.outputs.var_file),
"z_score": nb.load(zscores.outputs.out_file),
"p_value": nb.load(pvals.outputs.out_file),
remlfit.inputs.tout = True
remlfit.inputs.rout = True
remlfit.inputs.fout = True
remlfit.inputs.verb = True
remlfit.inputs.usetemp = True
remlfit.inputs.goforit = True
remlfit.inputs.mask = self.inputs.mask_file
reml_res = remlfit.run()
# get pvals and zscore buckets (niftis with heterogenous intent codes)
pval = Pval()
pval.inputs.in_file = reml_res.outputs.out_file
pval.inputs.out_file = "pval_maps.nii.gz"
pvals = pval.run()
zscore = Pval()
zscore.inputs.in_file = reml_res.outputs.out_file
zscore.inputs.out_file = "zscore_maps.nii.gz"
zscore.inputs.zscore = True
zscores = zscore.run()
# create maps object
maps = {
"stat": nb.load(reml_res.outputs.out_file),
"effect_variance": nb.load(reml_res.outputs.var_file),
"z_score": nb.load(zscores.outputs.out_file),
"p_value": nb.load(pvals.outputs.out_file),
}
maps["effect_size"] = maps["stat"]
self.save_remlfit_results(maps, contrasts, runtime)
#########################
# Results are saved to self in save_remlfit_results, if the
def _parse_inputs(self, skip=None):
if skip is None:
skip = []
return super(Pval, self)._parse_inputs(skip)