func_processing.resources.reports package

Submodules

func_processing.resources.reports.check_complete module

Functions for checking pre-processing status.

Pull and update logs of completed_preprocessing.tsv.

func_processing.resources.reports.check_complete.check_preproc(proj_dir, code_dir, pat_github_emu, new_df, one_subj=False)

Check for files in expected_dict.

In order to determine which participants need pre-processing, and which have files on either the NAS or HPC, make a dataframe of which participants have which pre-processed files.

This will use strings from expected_dict to create a dataframe. In order to keep things synchronized, it will git clone/pull the repo and add/commit/push the updated logs/completed_preprocessing.tsv.

Subject list is made from pseudo_guid_list, so only consented data is reflected in log.

Parameters
  • proj_dir (str) – Path to BIDS-organized project directory, for finding dset and derivatives

  • code_dir (str) – Path to desired/existing location of https://github.com/emu-project/func_processing.git

  • pat_github_emu (str) – Personal Access Token to https://github.com/emu-project

  • new_df (bool) – Whether to generate a completely new logs/completed_preprocessing.tsv, “True” when expected_dict gets updated with new files.

  • one_subj (bool/str) –

    Whether to check for data from single subject. If true, supply BIDS-formatted subject string.

    (e.g. one_subj=”sub-4001”)

Notes

Internet connection is required!

expected_dict should have the following organization:

  • each key corresponds to a derivatives directory

  • the value of each key is a list of tuples

  • one tuple per file to search for

  • tuple[0] is a string that matches a column in col_names

    and a column of logs/completed_preprocessing.tsv

  • tuple[1] is a string used to find the single file via glob

  • multiple decons are supported for each session via

    decon_<sess>_<int>

func_processing.resources.reports.check_complete.clone_guid(pat_github_emu)

Clone pseudo_guid_list.csv.

Parameters

pat_github_emu (str) – personal access token for github.com/emu-project

Returns

df_guid – dataframe of subject ID, GUIDs, comments

Return type

pandas.DataFrame

Module contents