OSCR

Visual field inhomogeneities and the architectonics of early visual cortex shape visual working memory.

Code ↔ Paper

3 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 3 matches
  1. [1] § Methods › Behavioral analysis methods ↔ behavioral analysis scripts/02_make_measures_17.R, lines 463–501 · score 0.67 · Holm Bonferroni correction, confidence intervals, Pearson, bootstrap, height, correlation
  2. [2] § Results › Behavioral results ↔ behavioral analysis scripts/02_make_measures_17.R, lines 367–453 · score 0.59 · bootstrap CI, visual field asymmetries, polar angle, Pearson, variance, HVA
  3. [3] § Methods › Behavioral task ↔ behavioral analysis scripts/02_make_measures_17.R, lines 367–453 · score 0.58 · confidence interval, visual field asymmetry, polar angle, variance, bootstrapped, axis

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

R · 502 lines · 19 KB · no license · 3 matches

  1. library(tidyr)
  2. library(ez)
  3. library(tidyverse)
  4. library(reshape)
  5. library(ggthemes)
  6. library(dplyr)
  7. library(effsize)
  8. library(boot)
  9. #library(ggpubfigs)
  10. rm(list=ls()) # Clear workspace
  11. # -----------------------------------------------------------------------------------------------------
  12. # Load data
  13. script_folder = "/Users/juliapapiernik-klodzinska/Desktop/PhD/_17_Simon_WM/analysis/"
  14. setwd(script_folder)
  15. DAT = read.csv(paste(script_folder,'all_clean_17_shuffled.csv', sep = ""), header = TRUE, sep = ",") #length(unique(dat$ID))
  16. # Dataframe for distances
  17. datDIST = DAT[,c(1:10)]
  18. datDIST = gather(datDIST, loc, dist, distance0:distance7, factor_key=TRUE)
  19. datDIST = datDIST[order(datDIST$participant,datDIST$trial),]
  20. levels(datDIST$loc) = c(0:7)
  21. datDIST$dist = datDIST$dist / 6.8 # Normalize
  22. mdat = melt(datDIST, id=c("loc","trial"), measure="dist", var = "THS")
  23. cdat = data.frame(cast(mdat, loc+trial ~ ..., mean))
  24. cdat$dist <- cdat$dist*6.8 #Use only for plotting!
  25. # ggplot(data=cdat, aes(x=trial, y=dist, group=loc)) + geom_line(aes(color=loc,linewidth=1)) +
  26. # guides(color = guide_legend(override.aes = list(linewidth = 1)))
  27. # plt_1 <- ggplot(data=cdat, aes(x=trial, y=dist, color=loc)) +
  28. # geom_line(aes(group=loc),linewidth=1) +
  29. # labs(title = "Grand Average of Distance Changes Across Trials", y = "Distance", x = "Trial", color = "Location") +
  30. # scale_color_manual(values = friendly_pal("tol_eight"), labels = c("Right", "Upper Right", "Up", "Upper Left", "Left", "Lower Left", "Down", "Lower Right")) +
  31. # theme_minimal() +
  32. # theme(plot.title = element_text(size = 12), # Title text size
  33. # axis.title.x = element_text(size = 11), # X-axis title size
  34. # axis.title.y = element_text(size = 11), # Y-axis title size
  35. # axis.text.y = element_text(size = 10), # Y-axis tick labels size
  36. # axis.text.x = element_text(size = 10), # X-axis tick labels size
  37. # legend.title = element_text(size = 9), # Legend title size
  38. # legend.text = element_text(size = 8) )
  39. # plt_1
  40. # ggsave("plot_grand_avg_stair.png", plot = last_plot(), width = 15, height = 9, units = "cm")
  41. # Dataframe for reaction times
  42. mdat = melt(DAT, id=c("participant","targetpos"), measure="rt", var = "THS")
  43. datRT = data.frame(cast(mdat, participant+targetpos ~ ..., c(mean,sd) ))
  44. datRT$participant = factor(datRT$participant)
  45. datRT$targetpos = factor(datRT$targetpos)
  46. mdat = melt(datRT, id=c("targetpos"), measure="rt_mean", var = "THS")
  47. cdat = data.frame(cast(mdat, targetpos ~ ..., mean))
  48. ggplot(data=cdat, aes(x=targetpos, y=rt_mean)) +
  49. geom_bar(stat="identity",aes(fill=targetpos)) +
  50. scale_y_continuous(limits = c(0, 1.25), breaks = seq(0, 1.25, by = 0.2))
  51. #------------------------------------------------------------------------------------------------------
  52. #RENAME THE LOCATIONS AND CHANGE THE TITLE BEFORE DOING FINAL PLOTS
  53. mdat <- melt(DAT, id=c('participant'),
  54. measure=c('distance0','distance1','distance2','distance3','distance4','distance5','distance6','distance7'), var = "DISTANCE")
  55. cdat <- cast(mdat, participant ~ ..., mean)
  56. library(tidyr)
  57. data_long <- gather(cdat, distance, mean, distance0:distance7, factor_key=TRUE)
  58. data_long <- data_long[order(data_long$participant),]
  59. cdat <- cast(mdat, participant ~ ..., sd)
  60. fuu <- gather(cdat, distance, sd, distance0:distance7, factor_key=TRUE)
  61. fuu <- fuu[order(fuu$participant),]
  62. data_long$sd = fuu$sd
  63. # for (s in c(1:nrow(cdat))){
  64. # fuu = DAT[DAT$participant == cdat$participant[s],]
  65. # fuu_long <- gather(fuu, distance, val, distance0:distance7, factor_key=TRUE)
  66. # fuu_long <- data.frame(fuu_long[order(fuu_long$trial),])
  67. # str(fuu_long)
  68. #
  69. # participant_number <- fuu_long$participant[1]
  70. #
  71. # custom_labels <- c("distance0" = "Right",
  72. # "distance1" = "Upper right",
  73. # "distance2" = "Up",
  74. # "distance3" = "Upper left",
  75. # "distance4" = "Left",
  76. # "distance5" = "Lower left",
  77. # "distance6" = "Down",
  78. # "distance7" = "Lower right")
  79. #
  80. #
  81. # # Map the levels of the 'distance' variable to the custom labels
  82. # levels(fuu_long$distance) <- custom_labels
  83. #
  84. # # Plots of individual PPs
  85. #
  86. # plt_1 <- ggplot(data=fuu_long, aes(x=trial, y=val, color=distance)) +
  87. # geom_step(aes(group=distance),linewidth=0.7) + ylim(1,12) +
  88. # labs(title = paste("Participant", participant_number, " - Performance Across Locations"),
  89. # y = tools::toTitleCase("distance from the center"),
  90. # x = tools::toTitleCase("trial"),
  91. # color = "Location") +
  92. # theme_light() +
  93. # theme(legend.key.size = unit(0.5, 'cm'),
  94. # legend.title = element_text(size = 8),
  95. # plot.title = element_text(hjust = 0.3, margin = margin(b = 20), size = 12),
  96. # axis.title.x = element_text(size = 8),
  97. # axis.title.y = element_text(size = 8),
  98. # axis.text.x = element_text(size = 10),
  99. # axis.text.y = element_text(size = 10),
  100. # axis.ticks = element_line(size = 0.5))
  101. #
  102. # print(plt_1)
  103. #
  104. # #ggsave(plot = last_plot(), path = "C:/Users/julia/OneDrive/Pulpit/PhD/_17_Simon_WM/analysis/presentation_plots", device = "png", filename = paste("Rplot participant", participant_number, ".png"), units = "cm", width = 10, height = 6)
  105. # }
  106. # -----------------------------------------------------------------------------------------------------
  107. # Group the distance data and calculate necessary statistics
  108. dat <- datDIST %>%
  109. group_by(participant, loc) %>%
  110. summarize(
  111. dist_M = mean(dist, na.rm = TRUE),
  112. dist_SD = sd(dist, na.rm = TRUE),
  113. dist_M_5 = mean(tail(dist, 5), na.rm = TRUE), # Last 5 trials or fewer
  114. dist_SD_5 = sd(tail(dist,5), na.rm = TRUE), # SD of last 5 trials
  115. dist_FIN = tail(dist, 1), # Last trial
  116. dist_M_5_true = mean(tail(unique(dist), 5), na.rm = TRUE),
  117. .groups = 'drop'
  118. )
  119. # Ensure the factors are aligned in datRT
  120. datRT$participant <- factor(datRT$participant)
  121. datRT$targetpos <- factor(datRT$targetpos)
  122. # Join the summarized distance data with reaction time data
  123. dat$rt_mean <- datRT$rt_mean
  124. dat$rt_SD <- datRT$rt_sd
  125. # -----------------------------------------------------------------------------------------------------
  126. # Plot distributions of the distances and SD
  127. # Final distance
  128. stat <- ezANOVA(data=dat, dv=.(dist_FIN), wid=.(participant), within=.(loc), type=3)
  129. print(stat)
  130. mdat <- melt(dat, id=c("loc"), measure="dist_FIN", var = "THS")
  131. cdat <- cast(mdat, loc ~ ..., function(x) c( M=mean(x), SE=sd(x)/sqrt(length(x))))
  132. limits <- aes(ymax = cdat$dist_FIN_M + cdat$dist_FIN_SE, ymin= cdat$dist_FIN_M - cdat$dist_FIN_SE, width=0.2)
  133. p <- ggplot(data=cdat, aes(x=loc, y=dist_FIN_M)) +
  134. geom_bar(stat="identity",aes(fill=loc)) +
  135. geom_errorbar(limits)
  136. p
  137. # Average distance over final 5 trials
  138. stat <- ezANOVA(data=dat, dv=.(dist_M_5), wid=.(participant), within=.(loc), type=3)
  139. print(stat)
  140. mdat <- melt(dat, id=c("loc"), measure="dist_M_5", var = "THS")
  141. cdat <- cast(mdat, loc ~ ..., function(x) c( M=mean(x), SE=sd(x)/sqrt(length(x))))
  142. limits <- aes(ymax = cdat$dist_M_5_M + cdat$dist_M_5_SE, ymin= cdat$dist_M_5_M - cdat$dist_M_5_SE, width=0.2)
  143. p <- ggplot(data=cdat, aes(x=loc, y=dist_M_5_M)) +
  144. geom_bar(stat="identity",aes(fill=loc)) +
  145. geom_errorbar(limits)
  146. p
  147. # Average distance over final 5 trials
  148. stat <- ezANOVA(data=dat, dv=.(dist_M_5_true), wid=.(participant), within=.(loc), type=3)
  149. print(stat)
  150. mdat <- melt(dat, id=c("loc"), measure="dist_M_5_true", var = "THS")
  151. cdat <- cast(mdat, loc ~ ..., function(x) c( M=mean(x), SE=sd(x)/sqrt(length(x))))
  152. limits <- aes(ymax = cdat$dist_M_5_true_M + cdat$dist_M_5_true_SE, ymin= cdat$dist_M_5_true_M - cdat$dist_M_5_true_SE, width=0.2)
  153. p <- ggplot(data=cdat, aes(x=loc, y=dist_M_5_true_M)) +
  154. geom_bar(stat="identity",aes(fill=loc)) +
  155. geom_errorbar(limits)
  156. p
  157. # SD of distance over final 5 trials
  158. stat <- ezANOVA(data=dat, dv=.(dist_SD_5), wid=.(participant), within=.(loc), type=3)
  159. print(stat)
  160. mdat <- melt(dat, id=c("loc"), measure="dist_SD_5", var = "THS")
  161. cdat <- cast(mdat, loc ~ ..., function(x) c( M=mean(x), SE=sd(x)/sqrt(length(x))))
  162. limits <- aes(ymax = cdat$dist_SD_5_M + cdat$dist_SD_5_SE, ymin= cdat$dist_SD_5_M - cdat$dist_SD_5_SE, width=0.2)
  163. p <- ggplot(data=cdat, aes(x=loc, y=dist_SD_5_M)) +
  164. geom_bar(stat="identity",aes(fill=loc)) +
  165. geom_errorbar(limits)
  166. p
  167. # SD over all trials
  168. stat <- ezANOVA(data=dat, dv=.(dist_SD), wid=.(participant), within=.(loc), type=3)
  169. print(stat)
  170. mdat <- melt(dat, id=c("loc"), measure="dist_SD", var = "THS")
  171. cdat <- cast(mdat, loc ~ ..., function(x) c( M=mean(x), SE=sd(x)/sqrt(length(x))))
  172. limits <- aes(ymax = cdat$dist_SD_M + cdat$dist_SD_SE, ymin= cdat$dist_SD_M - cdat$dist_SD_SE, width=0.2)
  173. p <- ggplot(data=cdat, aes(x=loc, y=dist_SD_M)) +
  174. geom_bar(stat="identity",aes(fill=loc)) +
  175. geom_errorbar(limits)
  176. p
  177. # Average over all trials
  178. stat <- ezANOVA(data=dat, dv=.(dist_M), wid=.(participant), within=.(loc), type=3)
  179. print(stat)
  180. mdat <- melt(dat, id=c("loc"), measure="dist_M", var = "THS")
  181. cdat <- cast(mdat, loc ~ ..., function(x) c( M=mean(x), SE=sd(x)/sqrt(length(x))))
  182. limits <- aes(ymax = cdat$dist_M_M + cdat$dist_M_SE, ymin= cdat$dist_M_M - cdat$dist_M_SE, width=0.2)
  183. p <- ggplot(data=cdat, aes(x=loc, y=dist_M_M)) +
  184. geom_bar(stat="identity",aes(fill=loc)) +
  185. geom_errorbar(limits)
  186. p
  187. # SD of reaction times
  188. stat <- ezANOVA(data=dat, dv=.(rt_SD), wid=.(participant), within=.(loc), type=3)
  189. print(stat)
  190. mdat <- melt(dat, id=c("loc"), measure="rt_SD", var = "THS")
  191. cdat <- cast(mdat, loc ~ ..., function(x) c( M=mean(x), SE=sd(x)/sqrt(length(x))))
  192. limits <- aes(ymax = cdat$rt_SD_M + cdat$rt_SD_SE, ymin= cdat$rt_SD_M - cdat$rt_SD_SE, width=0.2)
  193. p <- ggplot(data=cdat, aes(x=loc, y=rt_SD_M)) +
  194. geom_bar(stat="identity",aes(fill=loc)) +
  195. geom_errorbar(limits)
  196. p
  197. write.csv(dat, paste(script_folder,'long_data_final_shuffled.csv',sep=""), row.names = FALSE)
  198. # -----------------------------------------------------------------------------------------------------
  199. # Make indices
  200. inds = data.frame(IDs = unique(dat$participant))
  201. inds$MD = NA # mean distance over all 8 locations
  202. inds$HVA = NA # horizontal-vertical asymmetry
  203. inds$VMA = NA # vertical meridian asymmetry
  204. inds$LRA = NA # left-right asymmetry
  205. inds$LR_VFA = NA #left-right visual field asymmetry
  206. inds$UD_VFA = NA #up-down visual field asymmetry
  207. inds$TA = NA # total asymmetry
  208. inds$RDA = NA # right-down asymmetry
  209. for (r in c(1:nrow(inds))) {
  210. fuu = dat$dist_M_5[which(dat$participant == inds$IDs[r])]
  211. inds$MD[r] = mean(fuu)
  212. inds$HVA[r] = (( mean(fuu[c(1,5)]) - mean(fuu[c(3,7)]) ) / mean(fuu[c(1,3,5,7)]))*100
  213. inds$VMA[r] = ( fuu[7] - fuu[3] ) / mean(fuu[c(3,7)]) * 100
  214. inds$LRA[r] = ( fuu[1] - fuu[5] ) / mean(fuu[c(1,5)])
  215. inds$LR_VFA[r] = ((mean (fuu[c(4,5,6)] - mean(fuu[c(1,2,8)]) / mean(fuu[c(1,2,4,5,6,8)])))) * 100
  216. inds$UD_VFA[r] = (( mean(fuu[c(6,7,8)] - mean (fuu[c(2,3,4)]) / mean(fuu[c(2,3,4,6,7,8)])))) * 100
  217. inds$TA[r] = sd(fuu)
  218. inds$RDA[r] = ( fuu[1] ) / (fuu[7])
  219. }
  220. hist(inds$MD)
  221. hist(inds$HVA)
  222. hist(inds$VMA)
  223. hist(inds$LRA)
  224. hist(inds$LR_VFA)
  225. hist(inds$UD_VFA)
  226. hist(inds$TA)
  227. hist(inds$RDA)
  228. cor.test(inds$HVA,inds$MD)
  229. ggplot(inds, aes(x=HVA, y=MD)) + geom_point(size=2) + geom_smooth(method=lm,col="red")
  230. # -----------------------------------------------------------------------------------------------------
  231. # Add sex and age from DAT
  232. for (i in 1:nrow(inds)) {
  233. participant_id <- inds$IDs[i]
  234. participant_data <- DAT[DAT$participant == participant_id, ]
  235. inds$sex[i] <- participant_data$sex[1]
  236. inds$age[i] <- participant_data$age[1]
  237. inds$eye.dominance[i] <- participant_data$eye.dominance[1]
  238. inds$height[i] <- participant_data$height[1]
  239. inds$weight[i] <- participant_data$weight[1]
  240. }
  241. #Correcting one weird datapoint, as I suppose it was a typo
  242. inds$height[inds$height == 0.57] <- 1.57
  243. # descriptives of HVA and VMA
  244. mean(inds$HVA)
  245. min(inds$HVA)
  246. max(inds$HVA)
  247. sd(inds$HVA)
  248. mean(inds$VMA)
  249. min(inds$VMA)
  250. max(inds$VMA)
  251. sd(inds$VMA)
  252. # descriptives of VFIs
  253. mean(inds$LR_VFA)
  254. min(inds$LR_VFA)
  255. max(inds$LR_VFA)
  256. sd(inds$LR_VFA)
  257. mean(inds$UD_VFA)
  258. min(inds$UD_VFA)
  259. max(inds$UD_VFA)
  260. sd(inds$UD_VFA)
  261. # bootstrapped confidence intervals for indices
  262. # Define a function to calculate variance for bootstrapping
  263. variance_function <- function(data, indices) {
  264. sample_data <- data[indices] # Select the bootstrap sample
  265. return(var(sample_data)) # Calculate and return variance
  266. }
  267. # Perform bootstrapping
  268. set.seed(123) # For reproducibility
  269. bootstrap_results <- boot(data = inds$HVA, statistic = variance_function, R = 1000) # for HVA
  270. # Calculate and display the 95% confidence interval for the variance
  271. boot_ci <- boot.ci(bootstrap_results, type = "perc") # Use percentile method for CI
  272. print(boot_ci)
  273. sample_variance <- var(inds$HVA)
  274. # Calculate the standard error of variance (normal approximation)
  275. n <- length(inds)
  276. se_variance <- sqrt(2 * sample_variance^2 / (n - 1))
  277. # 95% CI using normal approximation
  278. ci_lower <- sample_variance - 1.96 * se_variance
  279. ci_upper <- sample_variance + 1.96 * se_variance
  280. c(ci_lower, ci_upper)
  281. sample_variance <- var(inds$VMA)
  282. # Calculate the standard error of variance (normal approximation)
  283. n <- length(inds)
  284. se_variance <- sqrt(2 * sample_variance^2 / (n - 1))
  285. # 95% CI using normal approximation
  286. ci_lower <- sample_variance - 1.96 * se_variance
  287. ci_upper <- sample_variance + 1.96 * se_variance
  288. c(ci_lower, ci_upper)
  289. # Perform bootstrapping
  290. set.seed(123) # For reproducibility
  291. bootstrap_results <- boot(data = inds$VMA, statistic = variance_function, R = 1000)
  292. # Calculate and display the 95% confidence interval for the variance
  293. boot_ci <- boot.ci(bootstrap_results, type = "perc") # Use percentile method for CI
  294. print(boot_ci)
  295. # Perform bootstrapping
  296. set.seed(123) # For reproducibility
  297. bootstrap_results <- boot(data = inds$UD_VFA, statistic = variance_function, R = 1000) # for UD_VFA
  298. # Calculate and display the 95% confidence interval for the variance
  299. boot_ci <- boot.ci(bootstrap_results, type = "perc") # Use percentile method for CI
  300. print(boot_ci)
  301. sample_variance <- var(inds$UD_VFA)
  302. # Calculate the standard error of variance (normal approximation)
  303. n <- length(inds)
  304. se_variance <- sqrt(2 * sample_variance^2 / (n - 1))
  305. # 95% CI using normal approximation
  306. ci_lower <- sample_variance - 1.96 * se_variance
  307. ci_upper <- sample_variance + 1.96 * se_variance
  308. c(ci_lower, ci_upper)
  309. bootstrap_results <- boot(data = inds$LR_VFA, statistic = variance_function, R = 1000) # for LR_VFA
  310. # Calculate and display the 95% confidence interval for the variance
  311. boot_ci <- boot.ci(bootstrap_results, type = "perc") # Use percentile method for CI
  312. print(boot_ci)
  313. sample_variance <- var(inds$LR_VFA)
  314. # Calculate the standard error of variance (normal approximation)
  315. n <- length(inds)
  316. se_variance <- sqrt(2 * sample_variance^2 / (n - 1))
  317. # 95% CI using normal approximation
  318. ci_lower <- sample_variance - 1.96 * se_variance
  319. ci_upper <- sample_variance + 1.96 * se_variance
  320. c(ci_lower, ci_upper)
  321. write.csv(inds, paste(script_folder,'VFA_17_field_final_shuffled.csv',sep=""), row.names = FALSE)
  322. correlation <-cor.test(inds$VMA, inds$HVA, method = 'pearson')
  323. correlation <- cor(inds$VMA, inds$HVA, method = 'pearson')
  324. ggplot(inds, aes(x = VMA, y = HVA)) +
  325. geom_point(color = "#4477AA",alpha = 0.6, shape = 16, size = 1) +
  326. labs(x = "Vertical Meridian Anisotropy", y = "Horizontal-Vertical Asymmetry", title = "Scatter Plot of Polar Angle\n Asymmetry Indices") +
  327. geom_smooth(method = "lm", se = FALSE, color = "grey40", linetype = "solid", linewidth = 0.75) +
  328. annotate("text", x = max(inds$VMA) * 0.9, y = max(inds$HVA) * 0.4,
  329. label = paste("r =", round(correlation, 2)),
  330. size = 2, color = "grey40") +
  331. theme_minimal() +
  332. theme(plot.title = element_text(size = 9), # Title text size
  333. axis.title.x = element_text(size = 6.5), # X-axis title size
  334. axis.title.y = element_text(size = 6.5), # Y-axis title size
  335. axis.text.y = element_text(size = 7), # Y-axis tick labels size
  336. axis.text.x = element_text(size = 7), # X-axis tick labels size
  337. legend.title = element_text(size = 8), # Legend title size
  338. legend.text = element_text(size = 8) )
  339. #ggsave("plot_cor_VMA_HVA.png", plot = last_plot(), width = 5.5, height = 5, units = "cm")
  340. correlation <-cor.test(inds$LR_VFA, inds$UD_VFA, method = 'pearson')
  341. correlation <- cor(inds$VMA, inds$HVA, method = 'pearson')
  342. ggplot(inds, aes(x = LR_VFA, y = UD_VFA)) +
  343. geom_point(color = "#4477AA",alpha = 0.6, shape = 16, size = 1) +
  344. labs(x = "Left-Right Visual Field Asymmetry", y = "Up-Down Visual Field Asymmetry", title = "Scatter Plot of Visual Field\n Asymmetry Indices") +
  345. geom_smooth(method = "lm", se = FALSE, color = "grey40", linetype = "solid", linewidth = 0.75) +
  346. annotate("text", x = max(inds$LR_VFA) * 0.9, y = max(inds$UD_VFA) * 0.4,
  347. label = paste("r =", round(correlation, 2)),
  348. size = 2, color = "grey40") +
  349. theme_minimal() +
  350. theme(plot.title = element_text(size = 9), # Title text size
  351. axis.title.x = element_text(size = 6.5), # X-axis title size
  352. axis.title.y = element_text(size = 6.5), # Y-axis title size
  353. axis.text.y = element_text(size = 7), # Y-axis tick labels size
  354. axis.text.x = element_text(size = 7), # X-axis tick labels size
  355. legend.title = element_text(size = 8), # Legend title size
  356. legend.text = element_text(size = 8) )
  357. #ggsave("plot_cor_VFI.png", plot = last_plot(), width = 5.5, height = 5, units = "cm")
  358. cor.test(inds$LR_VFA, inds$UD_VFA, method = 'pearson')
  359. cor.test(inds$VMA, inds$HVA, method = 'pearson')
  360. cor.test(inds$VMA, inds$UD_VFA, method = 'pearson')
  361. set.seed(2020)
  362. ## Define a function to calculate the difference of correlations
  363. diff_corr <- function(data, indices) {
  364. data <- data[indices, ]
  365. cor1 <- cor(data$VMA, data$HVA)
  366. cor2 <- cor(data$LR_VFA, data$UD_VFA)
  367. return(cor1 - cor2)
  368. }
  369. ## Apply the bootstrap procedure with 999 draws
  370. res_boot <- boot(data = inds,
  371. R = 999,
  372. statistic = diff_corr,
  373. stype = "i")
  374. ## Retrieve the empirical 95% confidence interval
  375. boot.ci(res_boot, type = "perc", conf = 0.95)
  376. t.test(inds$HVA)
  377. t.test(inds$VMA)
  378. t.test(inds$LR_VFA)
  379. t.test(inds$UD_VFA)
  380. cohen.d(inds$HVA, f = NA)
  381. cohen.d(inds$VMA, f = NA)
  382. cohen.d(inds$LR_VFA, f = NA)
  383. cohen.d(inds$UD_VFA, f = NA)
  384. p <- c(2.2e-16, 7.486e-07, 5.799e-08, 2.2e-16)
  385. # Holm-Bonferroni Correction for the t-tests
  386. p.adjust(p, method = "bonferroni")
  387. hist(inds$HVA)
  388. hist(inds$VMA)
  389. hist(inds$LR_VFA)
  390. hist(inds$UD_VFA)
  391. # Correlations with height
  392. cor.test(inds$UD_VFA, inds$height, method = "pearson", use = "complete.obs")
  393. cor.test(inds$LR_VFA, inds$height, method = "pearson", use = "complete.obs")
  394. cor.test(inds$VMA, inds$height, method = "pearson", use = "complete.obs")
  395. cor.test(inds$HVA, inds$height, method = "pearson", use = "complete.obs")
  396. p <- c(0.5327,0.4609, 0.8535, 0.03606) # 1) UD 2) LR 3) VMA 4) HVA
  397. p.adjust(p, "fdr", n = length(p))

02_make_measures_17.R, no license · at the source

Overview

  1. Consciousness lab, Institute of Psychology, Jagiellonian University, 6 Ingardena Street, 30-060, Kraków, Poland
  2. Doctoral School in the Social Sciences, Jagiellonian University, Main Square 34, 31-010, Kraków, Poland
  3. Centre for Brain Research, Jagiellonian University, 50 Kopernika Street, 31-501, Kraków, Poland
  4. Department of Computer Science, Norwegian University of Science and Technology, Teknologiveien 22NO-2815, Gjøvik, Norway
  5. Center of Functionally Integrative Neuroscience, Department of Clinical Medicine, Aarhus University and Aarhus University Hospital Universitetsbyen, Building 1710, Universitetsbyen 38000, Aarhus, Denmark
  6. Neurobiology Research Unit, Department of Neurology, Copenhagen University Hospital Rigshospitalet, Blegdamsvej 9, DK-2100, Copenhagen, Denmark
  7. Department of Psychology and Center for Neural Science, New York University, 4 Washington Place, New York, NY 10003, United States
Journal: Cerebral cortex (New York, N.Y. : 1991), volume 36, issue 5, article bhag058
Dates: received 9 November 2025; accepted 1 April 2026; published online 22 May 2026; in print May 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1093/cercor/bhag058 · PMID 42172102 · PMCID PMC13196602 · OpenAlex W7162081658
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), human (organism), cognitive (subfield)
Methods: Connectivity, Statistics, fMRI & imaging, Preprocessing
Keywords: multiparametric mapping, polar angle asymmetries, quantitative MRI, V1, visual working memory
MeSH: Memory, Short-Term*, Primary Visual Cortex*, Visual Cortex*, Visual Fields*, Visual Perception*, Adult, Brain Mapping, Female, Humans, Magnetic Resonance Imaging, Male, Young Adult (* major topic)
Topic: Neural and Behavioral Psychology Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: European Cooperation in Science and Technology (COST) (CA18106); Future Society Priority Research Area and the Quality of Life Priority Research Area; Strategic Programme of Excellence Initiative at the Jagiellonian University
Citations: not cited yet (Europe PMC); 123 references in the paper

Abstract

Whether the primary visual cortex (V1) is essential for visual working memory (vWM) remains a topic of scientific debate. The current study expanded upon previous findings by examining whether idiosyncratic architectural properties of V1, particularly those underlying visual field inhomogeneities such as polar angle asymmetries, predict interindividual differences in vWM performance. A total of 292 participants underwent quantitative MRI (qMRI) using a multiparametric mapping sequence to generate four microstructural maps per participant: magnetization transfer, proton density, longitudinal relaxation rate (R1), and transverse relaxation rate (R2*). In a separate session, the participants completed a vWM task designed to probe visual field inhomogeneities. Behavioral results are consistent with previously reported asymmetries in vWM, particularly the inverted polarity of the vertical meridian asymmetry (VMA). Quantitative MRI analysis revealed significant associations between VMA and multiple qMRI parameters within V1, indicating that V1 microarchitecture contributes to variability in vWM performance. Additionally, cortical thickness measures linked V3 to left–right asymmetry, suggesting that structural variability in the early visual cortex beyond V1 also shapes vWM performance. These findings are consistent with the sensory recruitment hypothesis and demonstrate that fine-grained architectural characteristics of early visual areas constrain vWM performance.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above, with 3 matches between paragraphs and lines of code.

OSF pjmgb

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Languages: R (6), Python (1)
Size: 221 files, 7 scripts
Software Heritage: not checked
Found in: “Data availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (6 files), reshape2 (5 files), lme4 (2 files), cowplot (1 file), ggplot2 (1 file), NumPy (1 file), PsychoPy (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
7 files
At the source: osf.io/pjmgb

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 7 scripts, each with its path and the digest of its content;
  • 3 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data availability

The scripts used to run the experimental procedure, as well as the raw behavioral data and scripts used for behavioral analysis, are available at the OSF repository (https://osf.io/pjmgb).

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 5 keywords, 12 MeSH terms, 3 funders, 117 references.

Cite

This paper

Papiernik-Kłodzińska, J., Del Pin, S. H., Sandberg, K., Wierzchoń, M., Carrasco, M., & Rutiku, R. (2026). Visual field inhomogeneities and the architectonics of early visual cortex shape visual working memory. Cerebral cortex (New York, N.Y. : 1991), 36(5), bhag058. https://doi.org/10.1093/cercor/bhag058

BibTeX

@article{papiernikkodzinska2026visual,
author = {Papiernik-Kłodzińska, Julia and Del Pin, Simon Hviid and Sandberg, Kristian and Wierzchoń, Michał and Carrasco, Marisa and Rutiku, Renate},
title = {{Visual field inhomogeneities and the architectonics of early visual cortex shape visual working memory}},
journal = {Cerebral cortex (New York, N.Y. : 1991)},
year = {2026},
month = may,
volume = {36},
number = {5},
pages = {bhag058},
publisher = {Oxford University Press},
issn = {1047-3211},
doi = {10.1093/cercor/bhag058},
url = {https://doi.org/10.1093/cercor/bhag058},
pmid = {42172102},
pmcid = {PMC13196602}
}

RIS

TY - JOUR
AU - Papiernik-Kłodzińska, Julia
AU - Del Pin, Simon Hviid
AU - Sandberg, Kristian
AU - Wierzchoń, Michał
AU - Carrasco, Marisa
AU - Rutiku, Renate
TI - Visual field inhomogeneities and the architectonics of early visual cortex shape visual working memory
T2 - Cerebral cortex (New York, N.Y. : 1991)
J2 - Cereb Cortex
PY - 2026
DA - 2026/05/01
VL - 36
IS - 5
SP - bhag058
SN - 1047-3211
PB - Oxford University Press
DO - 10.1093/cercor/bhag058
UR - https://doi.org/10.1093/cercor/bhag058
LA - en
ER -

CSL-JSON

{
"id": "10.1093/cercor/bhag058",
"type": "article-journal",
"title": "Visual field inhomogeneities and the architectonics of early visual cortex shape visual working memory",
"container-title": "Cerebral cortex (New York, N.Y. : 1991)",
"author": [
{
"family": "Papiernik-Kłodzińska",
"given": "Julia"
},
{
"family": "Del Pin",
"given": "Simon Hviid"
},
{
"family": "Sandberg",
"given": "Kristian"
},
{
"family": "Wierzchoń",
"given": "Michał"
},
{
"family": "Carrasco",
"given": "Marisa"
},
{
"family": "Rutiku",
"given": "Renate"
}
],
"container-title-short": "Cereb Cortex",
"volume": "36",
"issue": "5",
"page": "bhag058",
"DOI": "10.1093/cercor/bhag058",
"PMID": "42172102",
"PMCID": "PMC13196602",
"ISSN": "1047-3211",
"publisher": "Oxford University Press",
"URL": "https://doi.org/10.1093/cercor/bhag058",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
1
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1126/sciadv.aea7764 [code]
Spatial reorganization of object representations in high-level visual cortex distinguishes working memory from perception.
Journal: Science advances
In common: cognitive, 11 references
[2] doi:10.1162/imag.a.1325 [code]
Decoding everyday levels of musical training from subcortical white-matter architecture.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: ggplot2, tidyverse, NumPy, structural MRI / diffusion, 3 references, author Kristian Sandberg
[3] doi:10.3390/vision10030044
Eccentricity Constrains Spatial Working Memory Fidelity: Evidence for the Cortical Maps Hypothesis.
Journal: Vision (Basel, Switzerland)
In common: cognitive, 6 references
[4] doi:10.1016/j.nicl.2026.104039 [code]
The quest for the best: manual, atlas- and spatial prior-based delineation of locus coeruleus.
Journal: NeuroImage. Clinical
In common: structural MRI / diffusion, 6 references
[5] doi:10.3758/s13415-026-01443-z
The oblique effect in visual working memory is enhanced by distraction, regardless of tDCS manipulations.
Journal: Cognitive, affective & behavioral neuroscience
In common: cognitive, 6 references
[6] doi:10.1523/eneuro.0076-26.2026 [code]
Exogenously Driven Neural Reactivation of Spatially Matching Visual Working-Memory Contents.
Journal: eNeuro
In common: PsychoPy, lme4, cowplot, 4 other tools, cognitive
[7] doi:10.1038/s41467-026-73865-9 [code]
Histamine shapes the neurocomputational dynamics of human learning.
Journal: Nature communications
In common: PsychoPy, lme4, cowplot, 3 other tools, cognitive, 1 reference
[8] doi:10.1038/s41380-026-03694-1 [code]
Targeting cortico-striatal-amygdalar networks via theta-band frontoparietal synchronization in opioid use disorder: a randomized tACS-fMRI Trial.
Journal: Molecular psychiatry
In common: PsychoPy, lme4, cowplot, 4 other tools
[9] doi:10.7554/elife.103097 [code]
Canonical neurodevelopmental trajectories of structural and functional manifolds.
Journal: eLife
In common: cowplot, reshape2, ggplot2, 2 other tools, structural MRI / diffusion, 2 references
[10] doi:10.1038/s41467-026-74565-0 [code]
The functional neurobiology of dispositions towards negative emotions.
Journal: Nature communications
In common: lme4, cowplot, reshape2, 3 other tools, cognitive, 1 reference

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.