• gPPI analyses are conducted in CONN by predicting each target time series with a seed ROI, psychological parametric modulators, convolved with the HRF, and the seed x psych interaction terms.

  • The connectivity change (interaction beta estimate) for each seed-target pair per subject and condition was then extracted and further analyzed at the group level here.

  • Connectivity beta estimates reflects the postive or negative change in connectivity estimates with increasing memory during ‘remember’ events.

  • Analyses use MNI-space unsmoothed data.

Memory Quality

Change in connectivity between each target-seed pair with increasing memory detail (min 0, max 3 on any trial)

Overall and Hipp connectivity

model <- 'Overall-Complexity-noEmot'
contrast <- "DetailRemembered"      # memory parametric modulator
# GET PPI MATRIX ------------------------------------------------------------------
### fmri subjects for this model:
subjects = list.dirs(path = paste(matrixPath,model,'_ROI-to-ROI/',sep = ""), full.names = FALSE, recursive = FALSE)
### get ppi matrix per subject for this contrast
ppiMatrix <- format_conn(matrixPath, seeds, subjects, model, contrast, event)
MemoryQualityPPI <- ppiMatrix
### get overall change in connectivity with memory:
meanConn <- data.frame(ConnectivityChange = apply(ppiMatrix, c(3), mean))
sum <- meanConn %>% summarise(Mean.Connectivity = mean(ConnectivityChange), SE.Connectivity = se(ConnectivityChange))
print(kable(sum))


| Mean.Connectivity| SE.Connectivity|
|-----------------:|---------------:|
|         0.3581262|       0.1649264|
# test against zero
pander(t.test(meanConn$ConnectivityChange, mu=0, alternative=type))

----------------------------------------------------------------------
 Test statistic   df    P value    Alternative hypothesis   mean of x 
---------------- ---- ----------- ------------------------ -----------
     2.171        27   0.01943 *          greater            0.3581   
----------------------------------------------------------------------

Table: One Sample t-test: `meanConn$ConnectivityChange`
### focus on on aHIPP and pHIPP in terms of mean inter-network connectivity change with PM and AT networks (both as seeds and targets)
meanHipp <- mean_hipp_change(subjects, ppiMatrix, seeds, networks)
p <- plot_hipp(meanHipp)
plot(p)

ggsave('Remember_Hipp-to-Network.jpg',plot=last_plot(),dpi=300,width=5,height=5)
# Anova:
pander(ezANOVA(data = meanHipp, dv = MeanConnectivity, wid = Subject, 
        detailed = TRUE, within = .(Network,Region)))


  * **ANOVA**:

    --------------------------------------------------------------------------------------
         Effect       DFn   DFd     SSn      SSd       F         p       p<.05     ges
    ---------------- ----- ----- --------- ------- --------- ---------- ------- ----------
      (Intercept)      1    27     26.04    82.33    8.539    0.006949     *      0.1882

        Network        1    27    0.7554    12.83    1.589     0.2182            0.006681

         Region        1    27    0.9274    12.82    1.954     0.1736            0.008191

     Network:Region    1    27    0.01325   4.319   0.08285    0.7757            0.000118
    --------------------------------------------------------------------------------------


<!-- end of list -->
# test against zero
pander(t.test(meanHipp$MeanConnectivity[meanHipp$Network == 'AT' & meanHipp$Region == 'aHIPP'], mu=0, alternative=type))

--------------------------------------------------------------------
 Test statistic   df   P value   Alternative hypothesis   mean of x 
---------------- ---- --------- ------------------------ -----------
     1.666        27   0.05363          greater            0.2982   
--------------------------------------------------------------------

Table: One Sample t-test: `meanHipp$MeanConnectivity[meanHipp$Network == "AT" & meanHipp$Region ==     "aHIPP"]`
pander(t.test(meanHipp$MeanConnectivity[meanHipp$Network == 'PM' & meanHipp$Region == 'aHIPP'], mu=0, alternative=type))

------------------------------------------------------------------------
 Test statistic   df     P value     Alternative hypothesis   mean of x 
---------------- ---- ------------- ------------------------ -----------
     2.484        27   0.00974 * *          greater            0.4842   
------------------------------------------------------------------------

Table: One Sample t-test: `meanHipp$MeanConnectivity[meanHipp$Network == "PM" & meanHipp$Region ==     "aHIPP"]`
pander(t.test(meanHipp$MeanConnectivity[meanHipp$Network == 'AT' & meanHipp$Region == 'pHIPP'], mu=0, alternative=type))

-------------------------------------------------------------------------
 Test statistic   df     P value      Alternative hypothesis   mean of x 
---------------- ---- -------------- ------------------------ -----------
     2.797        27   0.004692 * *          greater            0.5019   
-------------------------------------------------------------------------

Table: One Sample t-test: `meanHipp$MeanConnectivity[meanHipp$Network == "AT" & meanHipp$Region ==     "pHIPP"]`
pander(t.test(meanHipp$MeanConnectivity[meanHipp$Network == 'PM' & meanHipp$Region == 'pHIPP'], mu=0, alternative=type))

------------------------------------------------------------------------
 Test statistic   df     P value     Alternative hypothesis   mean of x 
---------------- ---- ------------- ------------------------ -----------
     2.993        27   0.00292 * *          greater            0.6444   
------------------------------------------------------------------------

Table: One Sample t-test: `meanHipp$MeanConnectivity[meanHipp$Network == "PM" & meanHipp$Region ==     "pHIPP"]`
write.csv(meanHipp, "Hipp-Network_MemoryQuality.csv", row.names=FALSE)

Network connectivity

# GET CONNECTIVITY CHANGE BY NETWORK ---------------------------------------------
networkMatrix <- ppi_Network_connectivity(subjects, ppiMatrix, networks)
### p-value for each network comparison:
netStats <- get_network_pValues(networkMatrix, networkNames, nOrder, type)
print(kable(netStats))


|seed |target | connectivity|        SE|        t| df|         p|      FDRp|sig |
|:----|:------|------------:|---------:|--------:|--:|---------:|---------:|:---|
|PM   |PM     |    0.3518018| 0.2053519| 1.713165| 27| 0.0490720| 0.0616889|*   |
|HIPP |PM     |    0.5424819| 0.2269288| 2.390538| 27| 0.0120315| 0.0270708|**  |
|AT   |PM     |    0.4899392| 0.2350950| 2.084005| 27| 0.0233762| 0.0420771|**  |
|PM   |HIPP   |    0.5860639| 0.1781285| 3.290118| 27| 0.0013948| 0.0066537|**  |
|HIPP |HIPP   |    0.5912764| 0.1894669| 3.120738| 27| 0.0021324| 0.0066537|**  |
|AT   |HIPP   |    0.5019440| 0.1616612| 3.104913| 27| 0.0022179| 0.0066537|**  |
|PM   |AT     |    0.3652216| 0.1856076| 1.967708| 27| 0.0297260| 0.0445889|**  |
|HIPP |AT     |    0.2981062| 0.1802124| 1.654194| 27| 0.0548346| 0.0616889|NA  |
|AT   |AT     |    0.1343305| 0.1833791| 0.732529| 27| 0.2350788| 0.2350788|NA  |
### plot:
p <- plot_Network(netStats, type)
plot(p)

ggsave('Remember_MemoryQuality_Network.jpg',plot=last_plot(),dpi=300,width=7.5,height=6)

ROI-ROI connectivity

### get p-values for each individual seed-target comparison
ppiStats <- get_ppi_stats(ppiMatrix, seeds, sOrder, type)
### plot mean PPI matrix
p <- plot_meanPPI(ppiStats, 1, 2.6)
plot(p)

# now print the individually significant connections:
print(kable(subset(ppiStats,sig == '*')))


|    |seeds |targets | value_conn|  value_t|    pvalue|   pFDRAll|  pFDRSeed|sig |
|:---|:-----|:-------|----------:|--------:|---------:|---------:|---------:|:---|
|25  |ANG   |PCC     |  1.0036129| 3.946562| 0.0002548| 0.0067279| 0.0019687|*   |
|26  |PREC  |PCC     |  1.4031553| 3.576778| 0.0006701| 0.0088447| 0.0024569|*   |
|28  |RSC   |PCC     |  0.5203776| 3.377105| 0.0011186| 0.0133139| 0.0061522|*   |
|31  |aHIPP |PCC     |  0.7851660| 3.199720| 0.0017510| 0.0154088| 0.0064203|*   |
|36  |OFC   |PCC     |  1.2789153| 4.464415| 0.0000642| 0.0067279| 0.0007060|*   |
|37  |ANG   |RSC     |  2.0721737| 3.817466| 0.0003579| 0.0075763| 0.0019687|*   |
|38  |PREC  |RSC     |  2.1996787| 4.070193| 0.0001837| 0.0067279| 0.0020211|*   |
|42  |pHIPP |RSC     |  2.0711676| 4.177157| 0.0001383| 0.0067279| 0.0015211|*   |
|43  |aHIPP |RSC     |  1.2322646| 3.224484| 0.0016455| 0.0154088| 0.0064203|*   |
|47  |ITC   |RSC     |  1.5128082| 3.230886| 0.0016193| 0.0154088| 0.0178122|*   |
|48  |OFC   |RSC     |  2.4255781| 3.751671| 0.0004252| 0.0075763| 0.0023388|*   |
|62  |PREC  |pHIPP   |  1.1824905| 3.722271| 0.0004592| 0.0075763| 0.0024569|*   |
|64  |RSC   |pHIPP   |  0.6454269| 4.005134| 0.0002183| 0.0067279| 0.0024013|*   |
|65  |PHC   |pHIPP   |  0.5655404| 3.038121| 0.0026160| 0.0203124| 0.0287760|*   |
|67  |aHIPP |pHIPP   |  0.6869242| 3.579561| 0.0006653| 0.0088447| 0.0064203|*   |
|69  |AMYG  |pHIPP   |  0.5882459| 2.709897| 0.0057745| 0.0381114| 0.0534271|*   |
|70  |FUS   |pHIPP   |  0.6568556| 2.594449| 0.0075635| 0.0475419| 0.0831983|*   |
|72  |OFC   |pHIPP   |  0.9329880| 3.346097| 0.0012104| 0.0133139| 0.0044380|*   |
|74  |PREC  |aHIPP   |  0.8807560| 2.929966| 0.0034085| 0.0249957| 0.0074987|*   |
|134 |PREC  |OFC     |  0.9351170| 3.096148| 0.0022666| 0.0186996| 0.0062332|*   |
|136 |RSC   |OFC     |  0.4348673| 2.906713| 0.0036064| 0.0250551| 0.0132235|*   |

Color Precision

Calculates the change in connectivity between each target-seed pair with increasing color precision ## Overall connectivity

model <- 'Features-SuccessPrecision-noEmot'
contrast <- "ColorPrecision"      # memory parametric modulator
# GET PPI MATRIX ------------------------------------------------------------------
### fmri subjects for this model:
subjects = list.dirs(path = paste(matrixPath,model,'_ROI-to-ROI/',sep = ""), full.names = FALSE, recursive = FALSE)
### get ppi matrix per subject for this contrast
ppiMatrix <- format_conn(matrixPath, seeds, subjects, model, contrast, event)
ColorPrecisionPPI <- ppiMatrix
### get overall change in connectivity with memory:
meanConn <- data.frame(ConnectivityChange = apply(ppiMatrix, c(3), mean))
sum <- meanConn %>% summarise(Mean.Connectivity = mean(ConnectivityChange), SE.Connectivity = se(ConnectivityChange))
print(kable(sum))


| Mean.Connectivity| SE.Connectivity|
|-----------------:|---------------:|
|          0.238302|        0.112872|
# test against zero
pander(t.test(meanConn$ConnectivityChange, mu=0, alternative=type))

----------------------------------------------------------------------
 Test statistic   df    P value    Alternative hypothesis   mean of x 
---------------- ---- ----------- ------------------------ -----------
     2.111        27   0.02207 *          greater            0.2383   
----------------------------------------------------------------------

Table: One Sample t-test: `meanConn$ConnectivityChange`

Network connectivity

# GET CONNECTIVITY CHANGE BY NETWORK ---------------------------------------------
networkMatrix <- ppi_Network_connectivity(subjects, ppiMatrix, networks)
### p-value for each network comparison:
netStats <- get_network_pValues(networkMatrix, networkNames, nOrder, type)
print(kable(netStats))


|seed |target | connectivity|        SE|         t| df|         p|      FDRp|sig |
|:----|:------|------------:|---------:|---------:|--:|---------:|---------:|:---|
|PM   |PM     |    0.1289932| 0.1455641| 0.8861609| 27| 0.1916779| 0.1916779|NA  |
|HIPP |PM     |    0.3285191| 0.1803347| 1.8217183| 27| 0.0397974| 0.0716353|*   |
|AT   |PM     |    0.3539786| 0.1672092| 2.1169807| 27| 0.0218099| 0.0597240|*   |
|PM   |HIPP   |    0.3277346| 0.1620115| 2.0229098| 27| 0.0265440| 0.0597240|*   |
|HIPP |HIPP   |    0.2112116| 0.1678587| 1.2582700| 27| 0.1095334| 0.1408286|NA  |
|AT   |HIPP   |    0.3131076| 0.1397033| 2.2412333| 27| 0.0167163| 0.0597240|*   |
|PM   |AT     |    0.2894520| 0.1416849| 2.0429283| 27| 0.0254666| 0.0597240|*   |
|HIPP |AT     |    0.2323645| 0.1565907| 1.4838970| 27| 0.0747087| 0.1120630|NA  |
|AT   |AT     |    0.1605088| 0.1383712| 1.1599875| 27| 0.1281045| 0.1441175|NA  |
### plot:
p <- plot_Network(netStats, type)
plot(p)

ggsave('Remember_ColorPrecision_Network.jpg',plot=last_plot(),dpi=300,width=7.5,height=6)

ROI-ROI connectivity

### get p-values for each individual seed-target comparison
ppiStats <- get_ppi_stats(ppiMatrix, seeds, sOrder, type)
# plot significant PRC/AMYG/PHC/RSC connections
p <- plot_seed_connections(ppiMatrix, ppiStats, 'Color', seeds)
plot(p)

ggsave('Remember_ColorPrecision_Connections.jpg',plot=last_plot(),dpi=300,width=6,height=4.5)
# now print the individually significant connections:
connections <- subset(ppiStats, pFDRSeed < .05 & (seeds == 'RSC' | seeds == 'PHC' | seeds == 'PRC' | seeds == 'AMYG'))
connections <- connections[,-c(5,6,8)]
print(kable(connections))


|   |seeds |targets | value_conn|  value_t|  pFDRSeed|
|:--|:-----|:-------|----------:|--------:|---------:|
|8  |PRC   |ANG     |  0.5321694| 2.965276| 0.0344033|
|20 |PRC   |PREC    |  0.3920330| 2.382290| 0.0449355|
|21 |AMYG  |PREC    |  0.5027065| 2.843077| 0.0462563|
|65 |PHC   |pHIPP   |  0.5000328| 2.848443| 0.0456634|
|80 |PRC   |aHIPP   |  0.3680478| 2.506254| 0.0449355|

Scene Precision

Calculates the change in connectivity between each target-seed pair with increasing scene precision ## Overall connectivity

model <- 'Features-SuccessPrecision-noEmot'
contrast <- "ScenePrecision"      # memory parametric modulator
# GET PPI MATRIX ------------------------------------------------------------------
### fmri subjects for this model:
subjects = list.dirs(path = paste(matrixPath,model,'_ROI-to-ROI/',sep = ""), full.names = FALSE, recursive = FALSE)
### get ppi matrix per subject for this contrast
ppiMatrix <- format_conn(matrixPath, seeds, subjects, model, contrast, event)
ScenePrecisionPPI <- ppiMatrix
### get overall change in connectivity with memory:
meanConn <- data.frame(ConnectivityChange = apply(ppiMatrix, c(3), mean))
sum <- meanConn %>% summarise(Mean.Connectivity = mean(ConnectivityChange), SE.Connectivity = se(ConnectivityChange))
print(kable(sum))


| Mean.Connectivity| SE.Connectivity|
|-----------------:|---------------:|
|         0.2503445|         0.12929|
# test against zero
pander(t.test(meanConn$ConnectivityChange, mu=0, alternative=type))

----------------------------------------------------------------------
 Test statistic   df    P value    Alternative hypothesis   mean of x 
---------------- ---- ----------- ------------------------ -----------
     1.936        27   0.03168 *          greater            0.2503   
----------------------------------------------------------------------

Table: One Sample t-test: `meanConn$ConnectivityChange`

Network connectivity

# GET CONNECTIVITY CHANGE BY NETWORK ---------------------------------------------
networkMatrix <- ppi_Network_connectivity(subjects, ppiMatrix, networks)
### p-value for each network comparison:
netStats <- get_network_pValues(networkMatrix, networkNames, nOrder, type)
print(kable(netStats))


|seed |target | connectivity|        SE|         t| df|         p|      FDRp|sig |
|:----|:------|------------:|---------:|---------:|--:|---------:|---------:|:---|
|PM   |PM     |    0.4252629| 0.1478766| 2.8757954| 27| 0.0038864| 0.0177074|**  |
|HIPP |PM     |    0.3568793| 0.2162420| 1.6503695| 27| 0.0552270| 0.1396308|NA  |
|AT   |PM     |    0.5241402| 0.1825858| 2.8706509| 27| 0.0039350| 0.0177074|**  |
|PM   |HIPP   |    0.0322058| 0.1970698| 0.1634231| 27| 0.4357012| 0.4644029|NA  |
|HIPP |HIPP   |    0.0238647| 0.2646186| 0.0901852| 27| 0.4644029| 0.4644029|NA  |
|AT   |HIPP   |    0.3166132| 0.2159388| 1.4662169| 27| 0.0770700| 0.1396308|NA  |
|PM   |AT     |    0.0579253| 0.1619561| 0.3576604| 27| 0.3616891| 0.4644029|NA  |
|HIPP |AT     |    0.1382595| 0.1912239| 0.7230241| 27| 0.2379411| 0.3569117|NA  |
|AT   |AT     |    0.2252702| 0.1540299| 1.4625096| 27| 0.0775727| 0.1396308|NA  |
### plot:
p <- plot_Network(netStats, type)
plot(p)

ggsave('Remember_ScenePrecision_Network.jpg',plot=last_plot(),dpi=300,width=7.5,height=6)

ROI-ROI connectivity

### get p-values for each individual seed-target comparison
ppiStats <- get_ppi_stats(ppiMatrix, seeds, sOrder, type)
# plot significant PRC/AMYG/PHC/RSC connections
p <- plot_seed_connections(ppiMatrix, ppiStats, 'Scene', seeds)
plot(p)

ggsave('Remember_ScenePrecision_Connections.jpg',plot=last_plot(),dpi=300,width=7,height=4.5)
# now print the individually significant connections:
connections <- subset(ppiStats, pFDRSeed < .05 & (seeds == 'RSC' | seeds == 'PHC' | seeds == 'PRC' | seeds == 'AMYG'))
connections <- connections[,-c(5,6,8)]
print(kable(connections))


|   |seeds |targets | value_conn|  value_t|  pFDRSeed|
|:--|:-----|:-------|----------:|--------:|---------:|
|4  |RSC   |ANG     |  0.4340115| 3.716394| 0.0033008|
|5  |PHC   |ANG     |  0.7010383| 3.158638| 0.0158123|
|8  |PRC   |ANG     |  0.6048164| 2.908155| 0.0395320|
|16 |RSC   |PREC    |  0.2804193| 2.918363| 0.0128551|
|28 |RSC   |PCC     |  0.4001136| 3.619339| 0.0033008|
|29 |PHC   |PCC     |  0.6116341| 2.999701| 0.0158123|

Color vs Scene Connections

  1. Similarity - pearson’s correlation - between the connectivity change patterns associated with item color and spatial precision
  2. PM seed (PHC & RSC) vs AT seed (PRC & AMYG) to ANG/PREC by feature
# a) calculate the overall pattern simiarity between the color precision and scene precision ROIxROI matrices within each subject
similarity <- feature_similarity(ColorPrecisionPPI, ScenePrecisionPPI)
sum <- similarity %>% summarise(Mean.Z = mean(Similarity), SE.Z = se(Similarity))
print(kable(sum))


|    Mean.Z|      SE.Z|
|---------:|---------:|
| 0.0185993| 0.0375638|
# test against zero
pander(t.test(similarity$Similarity, mu=0, alternative=type))

--------------------------------------------------------------------
 Test statistic   df   P value   Alternative hypothesis   mean of x 
---------------- ---- --------- ------------------------ -----------
     0.4951       27   0.3123           greater            0.0186   
--------------------------------------------------------------------

Table: One Sample t-test: `similarity$Similarity`
# b) compare PM and AT seeds to common ANG/PREC targets by feature
features <- feature_connections(ColorPrecisionPPI, ScenePrecisionPPI, seeds, subjects)
feature_data <- features[[1]]
sum <- feature_data %>% group_by(SeedNetwork, Feature) %>%
                     summarise(Conn = mean(Connectivity), SE.Conn = se(Connectivity))
print(kable(sum))


|SeedNetwork |Feature |      Conn|   SE.Conn|
|:-----------|:-------|---------:|---------:|
|AT          |Color   | 0.4227308| 0.1196378|
|AT          |Scene   | 0.4392161| 0.1555691|
|PM          |Color   | 0.1284684| 0.0923896|
|PM          |Scene   | 0.4343643| 0.1176139|
# Anova:
pander(ezANOVA(data = feature_data, dv = Connectivity, wid = SubID,
        detailed = TRUE, within = .(SeedNetwork,Feature)))


  * **ANOVA**:

    ------------------------------------------------------------------------------
           Effect          DFn   DFd    SSn      SSd      F         p       p<.05
    --------------------- ----- ----- -------- ------- ------- ----------- -------
         (Intercept)        1    27    14.21    22.35   17.17   0.0003025     *

         SeedNetwork        1    27    0.6263   7.371   2.294    0.1415

           Feature          1    27    0.7275   12.41   1.583    0.2191

     SeedNetwork:Feature    1    27    0.5863   3.904   4.055    0.0541
    ------------------------------------------------------------------------------

    Table: Table continues below

    ---------
       ges
    ---------
     0.2359

     0.01342

     0.01556

     0.01258
    ---------


<!-- end of list -->
# t-test for PM (color vs scene):
pander(t.test(Connectivity ~ Feature, data=feature_data[feature_data$SeedNetwork == 'PM',], paired=TRUE))

----------------------------------------------------------
 Test statistic   df    P value    Alternative hypothesis 
---------------- ---- ----------- ------------------------
     -2.667       27   0.01276 *         two.sided        
----------------------------------------------------------

Table: Paired t-test: `Connectivity` by `Feature` (continued below)

 
-------------------------
 mean of the differences 
-------------------------
         -0.3059         
-------------------------
# t-test for AT (color vs scene):
pander(t.test(Connectivity ~ Feature, data=feature_data[feature_data$SeedNetwork == 'AT',], paired=TRUE))

----------------------------------------------------------------------------------
 Test statistic   df   P value   Alternative hypothesis   mean of the differences 
---------------- ---- --------- ------------------------ -------------------------
    -0.09518      27   0.9249          two.sided                 -0.01649         
----------------------------------------------------------------------------------

Table: Paired t-test: `Connectivity` by `Feature`
plot(features[[2]])

ggsave('Remember_Network-to-ANGPREC.jpg',plot=last_plot(),dpi=300,width=6,height=7)
write.csv(feature_data, "Feature_Connections.csv", row.names=FALSE)
### save data
save(ROIs, MemoryQualityPPI, ColorPrecisionPPI, ScenePrecisionPPI, file = "Memory_gPPI_data.RData")
LS0tCnRpdGxlOiAiT3JiaXQgZk1SSSAtIENPTk4gZ2xtIFJPSSBQUEkgQW5hbHlzZXMiCm91dHB1dDoKICBodG1sX25vdGVib29rOgogICAgY29kZV9mb2xkaW5nOiBoaWRlCiAgICBmb250c2l6ZTogNnB0CiAgICB0aGVtZTogc3BhY2VsYWIKICAgIHRvYzogeWVzCiAgICB0b2NfZmxvYXQ6IHllcwogIGh0bWxfZG9jdW1lbnQ6CiAgICBkZl9wcmludDogcGFnZWQKICAgIHRvYzogeWVzCi0tLQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgpib2R5eyAvKiBOb3JtYWwgICovCiAgICAgIGZvbnQtc2l6ZTogMTRweH0KdGQgeyAgLyogVGFibGUgICovCiAgZm9udC1zaXplOiAxMnB4fQpoMS50aXRsZSB7CiAgZm9udC1zaXplOiAzMHB4fQpoMSB7IC8qIEhlYWRlciAxICovCiAgZm9udC1zaXplOiAyNHB4fQpoMiB7IC8qIEhlYWRl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