Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question regarding running the package #78

Open
ShreyasFadnavis opened this issue Mar 10, 2022 · 1 comment
Open

Question regarding running the package #78

ShreyasFadnavis opened this issue Mar 10, 2022 · 1 comment

Comments

@ShreyasFadnavis
Copy link

ShreyasFadnavis commented Mar 10, 2022

Hi @ilogue,

I am trying to run the code as follows, but am unable to do so. Here is a sample of how I am trying to do it:

from glmdenoise import GLMdenoise
from dipy.io.image import load_nifti
import pandas as pd

design = pd.read_csv("/fmri_Denoise/sub-01_ses-retest_func_sub-01_ses-retest_task-linebisection_events.tsv", sep='\t')
data, affine = load_nifti('/fmri_Denoise/sub-01_ses-retest_func_sub-01_ses-retest_task-covertverbgeneration_bold.nii.gz')

gd = GLMdenoise()
gd.fit(design, data, tr=2.0)
gd.plot_figures()

Is there something I am missing? I am using the data you mentioned in the README : https://openneuro.org/datasets/ds000114/versions/1.0.1

My guess is that I should not use pandas to load the tsv?

Thanks in advance!

@JasperVanDenBosch
Copy link
Member

JasperVanDenBosch commented Mar 11, 2022

hi @ShreyasFadnavis,

the fit() method expects design and data to both be lists of runs, so change the penultimate line to:

gd.fit([design], [data], tr=2.0)

And it'll get further. However it then complains about a dimensions mismatch which probably has to do with the events file containing events (79) that are not represented in the data (64). This might not be an issue with your own data.

You're very much welcome to ask further questions here but I should warn that I am not actively maintaining this right now..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants