Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ Use `--help` to see all options.
Notes on the steps:
* Overall, make sure your scripts are executable:

chmod -R 777 _/enigma/Parent_Folder/scripts
chmod -R +x _/enigma/Parent_Folder/scripts
* If the error `./enigma_fs_wrapper_script.sh: line 143: printf: ****.*: invalid number` appears try running the script again with the prefix `LC_NUMERIC=C`.
* The extraction steps (i.e., Step 1 & 2) have been updated in April 2021 to correctly extract the full intracranial volume (ICV) value using %f to avoid rounding up of the values when the CSV is opened and edited. The result of these steps will be three comma-separated (CSV) files (“LandRvolumes.csv” for the subcortical measures, “CorticalMeasuresENIGMA_ThickAvg.csv” and “CorticalMeasuresENIGMA_SurfAvg.csv” for the cortical measures) that can be opened in your favorite spreadsheet application (i.e., Excel). After running the script, open the CSV files and make sure that only subjects are listed in the rows of the file. Sometimes if there are other folders in your parent directory those folders can sometimes become included in your final files, if that happens just delete those from your CSV files and save. [When you edit the files in Excel, be sure to keep them in CSV format when you save!] The first row in all csv's are headers describing the extracted regions and names for each column. Each row after the first gives the subcortical volumes (in mm3), cortical thickness average or total surface area measures respectively for each subject found in your FreeSurfer directory.
* To make the visual QC process faster, this script will create webpages in the same folder as your respective QC outputs: multiple webpages (e.g. "ENIGMA_Amyg_volume_QC.html") and one per subcortical ROI and one called "ENIGMA_Subortical_QC.html" for the Subcortical PNGs, "ENIGMA_Cortical_QC.html" for the Cortical Internal PNGs, and "QC_external.html" for the Cortical External PNGs.
You can open these in any browser, just make sure all of the .png files are in the same folder if you decide to move the html file to a different location (like a local computer). Zoom in and out of the window to adjust the size of the images per row, or click on a subject’s file to see a larger version. To open the webpage in a browser in a Linux environment you can probably just type the following from the QC folder, e.g.,:
Expand Down
22 changes: 20 additions & 2 deletions enigma_fs_wrapper_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function Usage(){

Usage:

`basename $0` --subjects <subject.txt> --fsdir </freesufer/path> --outdir <output/directory> --script <ENIGMA/scripts/path> --matlab <MATLAB/path> --step_N 1 <other options>
`basename $0` --subjects <subject.txt> --fsdir </freesufer/path> --outdir <output/directory> --script <ENIGMA/scripts/path> --matlab <MATLAB/path> --step_N 1 <other options> --fs7 <other options>

Mandatory arguments:
--subjects Provide a list of subjects stored in a text file
Expand Down Expand Up @@ -109,7 +109,25 @@ done

# Checking mandatory arguments
if [[ -z ${subjectIDs} || -z ${fs_dir} || -z ${scripts_dir} || -z ${matlab_dir} || -z ${out_dir} || -z ${fs_version} ]]; then
echo "ERROR: --subjects --fsdir, --script, --matlab, --outdir are mandatory arguments. Please see usage: \n"
if [[ -z ${subjectIDs} ]]; then
echo "--subjects missing" >&2
fi
if [[ -z ${fs_dir} ]]; then
echo "--fsdir missing"
fi
if [[ -z ${scripts_dir} ]]; then
echo "--script missing"
fi
if [[ -z ${matlab_dir} ]]; then
echo "--matlab missing";
fi
if [[ -z ${out_dir} ]]; then
echo "--outdir missing"
fi
if [[ -z ${fs_version} ]]; then
echo "--fs7 missing"
fi
echo "ERROR: --subjects --fsdir, --script, --matlab, --outdir, --fs7 are mandatory arguments. Please see usage:"
Usage >&2
fi

Expand Down