Read in files
- Gifti files here are mapped to fs_LR 32k surfaces.
- Node sets used can be downloaded from my github
gL <- read_gifti(gL_file)
gR <- read_gifti(gR_file)
# nodes (L/R): Chan_RSFC_Nodes/gifti_multiple_columns/ROI_L/R_dis8_fwhm0_limit3_overlapEXCLUDE.func.gii
# metadata: Chan_RSFC_Nodes/Chan_RSFC_Nodes_PNAS2014_metadata.txt
node_L <- read_gifti(nodeL_file)
node_R <- read_gifti(nodeR_file)
node_order <- read.table(node_meta_table_file, sep="\t", header=T)
# Load motion/tmask files
fd <- read.table(fd_file, col.names = "FD")
fd$vol <- 1:nrow(fd)
motion <- read.table(motion_file, col.names = c("X","Y","Z","P","Y","R"))
dv <- read.table(dv_file, col.names = "DVARS")
dv$vol <- 1:nrow(dv)
tmask <- read.table(tmask_file, col.names = "tmask")
# Tmask the motion files
fd <- data.frame(fd[as.logical(tmask$tmask),])
motion <- motion[as.logical(tmask$tmask),]
dv <- dv[as.logical(tmask$tmask),]
Plot processed mean time series of each node
- Codes for generating this plot are available on my github
g1 <- plot_qc(qc = fd$FD, qc_thres=0.3, qc_name="FD", miny = 0, maxy = 2)
g2 <- plot_qc(qc = dv$DVARS, qc_name="DVARS", qc_color = "blue")
g3 <- plot_motion(motion)
g4 <- plot_time_series(tp, min = 20, max = 20)
plots_aligned <- AlignPlots(g1, g2, g3, g4)
## Warning: Removed 1 rows containing missing values (geom_path).
## Warning in .Primitive("max")(NULL, NULL, NULL, NULL): no non-missing
## arguments to max; returning -Inf
grid.arrange(as.grob(plots_aligned[[1]]),
as.grob(plots_aligned[[2]]),
as.grob(plots_aligned[[3]]),
as.grob(plots_aligned[[4]]),
ncol=1, heights=c(0.15,0.15,0.1,0.6))