meanConnection {brainKCCA}R Documentation

Calculate percentage of connection in all pairwise brain regions.

Description

This function can create a list of significant (threshold is defined by user) region pairs.

Usage

meanConnection(path = getwd(), threshold = 0.2)

Arguments

path

the path where csv files located

threshold

the threshold for significance of percentage of connection (if percentage exceeds threhold, then the region pair is significant). Typically, it can be 15-30%.

Details

you need to specify the path where csv files (containing KCCA information)locoated. This function will read all csv files listed in the path.

Value

the object containing significant regions.

Author(s)

Xubo Yue, Chia-Wei Hsu (tester), Jian Kang (maintainer)

Examples


#It will take more than 3 min to run
filePath <- tempdir()
#the nii.gz fMRI imaging file is created (toy example)
oro.nifti::writeNIfTI(brainKCCA::input_img, paste(filePath, "/",  "temp", sep=""))
#read fMRI data
testcase1 <- nii2RData(niiFile1 = "temp", resolution = "3mm", imgPath = filePath)
result1<-permkCCA_multipleRegion(imageDat = testcase1, region = c(1,5,10))
summary_result1 <- summary_kcca(kcca_object=result1, saveFormat = "excel")
write.csv(summary_result1, paste(filePath, "/",  "temp.csv", sep=""))
summary_data <- meanConnection(path = filePath, threshold=0.25)
multipleRegion_plot(summary_data, significance=NA)


[Package brainKCCA version 0.1.0 Index]