Skip to content

Commit

Permalink
Update HCP_dat_func.R
Browse files Browse the repository at this point in the history
  • Loading branch information
CogBrainHealthLab authored Jun 25, 2024
1 parent 9a93db1 commit 0ecc745
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/HCP_dat_func.R
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ extractFC=function(wb_path,
ciftiTools::ciftiTools.setOption('wb_path', wb_path)

##atlas checks
if(is.na(match(atlas,(1:10)*100))) {stop("Atlas should be a multiple of 100 from 100 to 1000")}
if(is.na(match(atlas,(1:10)*100))) {stop("\nAtlas should be a multiple of 100 from 100 to 1000")}
#download atlas template if it is missing
if(!file.exists(paste(system.file(package='FCtools'),"/data/Schaefer2018_",atlas,"Parcels_7Networks_order.dlabel.nii",sep="")))
{
cat(paste("The",paste("Schaefer2018_",atlas,"Parcels_7Networks_order.dlabel.nii",sep=""),"template file does not exist and will be downloaded\n"),sep=" ")
cat(paste("\nThe",paste("Schaefer2018_",atlas,"Parcels_7Networks_order.dlabel.nii",sep=""),"template file does not exist and will be downloaded\n"),sep=" ")
download.file(url=paste0("https://raw.githubusercontent.com/ThomasYeoLab/CBIG/master/stable_projects/brain_parcellation/Schaefer2018_LocalGlobal/Parcellations/HCP/fslr32k/cifti/Schaefer2018_",atlas,"Parcels_7Networks_order.dlabel.nii"),
destfile =paste(system.file(package='FCtools'),"/data/Schaefer2018_",atlas,"Parcels_7Networks_order.dlabel.nii",sep=""),mode = "wb")

Expand Down

0 comments on commit 0ecc745

Please sign in to comment.