Skip to content

Commit

Permalink
false manip cancelled
Browse files Browse the repository at this point in the history
  • Loading branch information
JLefortBesnard committed Feb 13, 2024
1 parent f41f630 commit c836798
Showing 1 changed file with 42 additions and 11 deletions.
53 changes: 42 additions & 11 deletions narps_open/pipelines/team_6VV2.firstlevel
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
# version afni used by the reproducibility team :AFNI Version 23.0.02 Commodus
# Last update: June 2023

"""
exemple run:
In a terminal, path /home/jlefortb/narps_open_pipelines, run:
/home/jlefortb/narps_open_pipelines/narps_open/pipelines/team_6VV2.firstlevel /home/jlefortb/narps_open_pipelines/data/results/team_6VV2_afni/firstlevel/, sub-001, /home/jlefortb/narps_open_pipelines/data/original/ds001734/

# exemple run:
# In a terminal, path /home/jlefortb/narps_open_pipelines, run:
# tcsh /home/jlefortb/narps_open_pipelines/narps_open/pipelines/team_6VV2.firstlevel /home/jlefortb/narps_open_pipelines/data/results/team_6VV2_afni/firstlevel/, sub-001, /home/jlefortb/narps_open_pipelines/data/original/ds001734/

"""



Expand Down Expand Up @@ -67,10 +65,43 @@ afni_proc.py \
-execute


# extract beta values
3dbucket -prefix GAIN ${expdir}/${subject}.results.block/stats.sub-001+tlrc.BRIK[3]
3dbucket -prefix LOSS ${expdir}/${subject}.results.block/stats.sub-001+tlrc.BRIK[8]
# # extract beta values
# 3dbucket -prefix GAIN ${expdir}/${subject}.results.block/stats.sub-001+tlrc.BRIK[3]
# 3dbucket -prefix LOSS ${expdir}/${subject}.results.block/stats.sub-001+tlrc.BRIK[8]

# convert BRIK to nii
3dAFNItoNIFTI -prefix GAIN ${subject}_GAIN+tlrc
3dAFNItoNIFTI -prefix LOSS ${subject}_LOSS+tlrc
# # convert BRIK to nii
# 3dAFNItoNIFTI -prefix GAIN ${subject}_GAIN+tlrc
# 3dAFNItoNIFTI -prefix LOSS ${subject}_LOSS+tlrc



# run this file with "tcsh 6VV2_afni_proc.simple"

# create 1D stimuli file :
# import pandas as pd

# df_run1 = pd.read_csv("/home/jlefortb/narps_open_pipelines/data/original/ds001734/sub-001/func/sub-001_task-MGT_run-01_events.tsv", sep="\t")
# df_run1 = df_run1[["onset", "gain", "loss"]].T
# df_run2 = pd.read_csv("/home/jlefortb/narps_open_pipelines/data/original/ds001734/sub-001/func/sub-001_task-MGT_run-02_events.tsv", sep="\t")
# df_run2 = df_run2[["onset", "gain", "loss"]].T
# df_run3 = pd.read_csv("/home/jlefortb/narps_open_pipelines/data/original/ds001734/sub-001/func/sub-001_task-MGT_run-03_events.tsv", sep="\t")
# df_run3 = df_run3[["onset", "gain", "loss"]].T
# df_run4 = pd.read_csv("/home/jlefortb/narps_open_pipelines/data/original/ds001734/sub-001/func/sub-001_task-MGT_run-04_events.tsv", sep="\t")
# df_run4 = df_run4[["onset", "gain", "loss"]].T

# df_gain = pd.DataFrame(index=range(0,4), columns=range(0,64))
# df_gain.loc[0] = ["{}*{}".format(df_run1[col].loc['onset'], df_run1[col].loc['gain']) for col in range(0, 64)]
# df_gain.loc[1] = ["{}*{}".format(df_run2[col].loc['onset'], df_run2[col].loc['gain']) for col in range(0, 64)]
# df_gain.loc[2] = ["{}*{}".format(df_run3[col].loc['onset'], df_run3[col].loc['gain']) for col in range(0, 64)]
# df_gain.loc[3] = ["{}*{}".format(df_run4[col].loc['onset'], df_run4[col].loc['gain']) for col in range(0, 64)]
# df_loss = pd.DataFrame(index=range(0,4), columns=range(0,64))
# df_loss.loc[0] = ["{}*{}".format(df_run1[col].loc['onset'], df_run1[col].loc['loss']) for col in range(0, 64)]
# df_loss.loc[1] = ["{}*{}".format(df_run2[col].loc['onset'], df_run2[col].loc['loss']) for col in range(0, 64)]
# df_loss.loc[2] = ["{}*{}".format(df_run3[col].loc['onset'], df_run3[col].loc['loss']) for col in range(0, 64)]
# df_loss.loc[3] = ["{}*{}".format(df_run4[col].loc['onset'], df_run4[col].loc['loss']) for col in range(0, 64)]


# df_gain.to_csv('/home/jlefortb/narps_open_pipelines/data/original/ds001734/sub-001/func/times+gain.1D',
# sep='\t', index=False, header=False)
# df_loss.to_csv('/home/jlefortb/narps_open_pipelines/data/original/ds001734/sub-001/func/times+loss.1D',
# sep='\t', index=False, header=False)

0 comments on commit c836798

Please sign in to comment.