<filename>mvpa_itab/script/carlo/sherlock/gsbs.py
from pyitab.analysis.states.gsbs import GSBS
from pyitab.io.loader import DataLoader

from pyitab.analysis.configurator import AnalysisConfigurator
from pyitab.preprocessing import SampleSlicer, FeatureSlicer
from pyitab.analysis.roi import RoiAnalyzer
import os
import numpy as np


conf_file = "/home/robbis/mount/permut1/sherlock/bids/bids.conf"
loader = DataLoader(configuration_file=conf_file, 
                    loader='bids', task='preproc', 
                    bids_task=['day1'])

subjects = ['marcer', 'matsim', 'simpas']
for s in subjects:

    ds = loader.fetch(subject_names=[s], 
                      prepro=[SampleSlicer(trial_type=np.arange(1, 32))])

    roi_analyzer = RoiAnalyzer(analysis=GSBS())
    roi_analyzer.fit(ds, roi=['aal'], kmax=50)

    roi_analyzer.save()



################## Resting state ##########################
conf_file = path = "/home/robbis/mount/permut1/sherlock/bids/bids.conf"
loader = DataLoader(configuration_file=conf_file,
                    data_path="/home/robbis/mount/permut1/sherlock/bids/",
                    subjects='participants.tsv',
                    loader='bids', task='preproc', 
                    bids_task=['day1'])

subjects = ['marcer', 'matsim', 'simpas']
for s in subjects:

    ds = loader.fetch(subject_names=[s])
<filename>mvpa_itab/script/carlo/sherlock/gsbs.py
from pyitab.analysis.states.gsbs import GSBS
from pyitab.io.loader import DataLoader

from pyitab.analysis.configurator import AnalysisConfigurator
from pyitab.preprocessing import SampleSlicer, FeatureSlicer
from pyitab.analysis.roi import RoiAnalyzer
import os
import numpy as np


conf_file = "/home/robbis/mount/permut1/sherlock/bids/bids.conf"
loader = DataLoader(configuration_file=conf_file, 
                    loader='bids', task='preproc', 
                    bids_task=['day1'])

subjects = ['marcer', 'matsim', 'simpas']
for s in subjects:

    ds = loader.fetch(subject_names=[s], 
                      prepro=[SampleSlicer(trial_type=np.arange(1, 32))])

    roi_analyzer = RoiAnalyzer(analysis=GSBS())
    roi_analyzer.fit(ds, roi=['aal'], kmax=50)

    roi_analyzer.save()



################## Resting state ##########################
conf_file = path = "/home/robbis/mount/permut1/sherlock/bids/bids.conf"
loader = DataLoader(configuration_file=conf_file,
                    data_path="/home/robbis/mount/permut1/sherlock/bids/",
                    subjects='participants.tsv',
                    loader='bids', task='preproc', 
                    bids_task=['day1'])

subjects = ['marcer', 'matsim', 'simpas']
for s in subjects:

    ds = loader.fetch(subject_names=[s])
################## Resting state ##########################