Making research materials Findable, Accessible, Interoperable and Reusable

8 March 2024


To err is human. Yet, when it comes to creating research materials, mistakes can be reduced by sharing more of our work and by using some helpful tools. For instance, we can make our research materials FAIRer—that is, more Findable, Accessible, Interoperable and Reusable (Wilkinson et al., 2016)—. These practices facilitate the reproducibility, revision, modification and expansion of research materials, by the creators themselves and by other researchers, at any point in time, which is convenient due to the vital importance of methods in experimental research (Barsalou, 2019). In the current presentation, I will describe how documentation practices and open-source software (namely, R and OpenSesame) were used to prepare materials for an artificial language study that comprised several sessions and several grammatical properties (cf. Cross et al., 2021; González Alonso et al., 2020; Mitrofanova et al., 2023; Morgan-Short et al., 2012; Pereira Soares et al., 2022). The preparation of the stimuli in R drew on a modular framework formed of interoperable components (Snippet 1). This modularity will facilitate the expansion of the materials within the same languages or to other languages. Specifically, the minimal components of each language were contained in a base file in the ‘stimulus_preparation’ folder (Table 1). Furthermore, for the creation of the final stimuli, several controls were exerted to prevent spurious effects. For instance, gender and number were counterbalanced across experimental conditions, words were rotated across grammatical properties and sessions, and frequency of occurrence was controlled (Snippet 2). The final stimuli can be recreated using the script ‘compile_all_stimuli.R’, and the resulting stimuli are saved to the ‘session_materials’ folder. Furthermore, the final stimuli were presented using OpenSesame, which is a free-of-charge software supporting experiments in the social sciences. I will describe the implementation of several complex sessions in OpenSesame, which involved the use of conditions for controlling the engagement of certain items (Snippet 3). Last, I will describe a custom script in OpenSesame that enables the measurement of event-related potentials by time-locking electroencephalographic measures to the onset of specific stimuli (Snippet 4).

Snippet 1

The use of code scripts facilitates the reproducibility, testability and expandability of materials.

└── stimulus_preparation
    ├── Norway site, base stimuli.csv
    ├── Spain site, base stimuli.csv
    ├── base_images.R
    ├── R_functions
    │   ├── Session2_Pretraining_vocabulary.R
    │   ├── Session2_Training_gender_agreement.R
    │   ├── Session2_Test_gender_agreement.R
    │   ├── Session2_Experiment_gender_agreement.R
    ├── compile_all_stimuli.R

Table 1

The minimal components of each language are contained in a base file.

verb_ID verb_type verb verb_contrast_ID
1 copula_be is
2 copula_be are
3 copula_look looks
4 copula_look look
5 transitive remembered A
6 transitive forgot A
7 transitive chose B
8 transitive refused B

Snippet 2

Tests were set throughout the workflow to control the frequency of some categories (R code).

columns_to_check = c('noun1_gender', 'number', 'person', 
                     'verb', 'noun1', 'wrapup_noun')

for(i in seq_along(columns_to_check)) {
  column = columns_to_check[i]
  number_of_unique_frequencies = 
    combinations %>% 
    filter(complete.cases(get(column)), get(column) != '') %>% 
    group_by(get(column)) %>% tally() %>% select(n) %>% 
  if(number_of_unique_frequencies != 1) {
    warning(paste0('Some elements in the column `', column, 
                   '` appear more often than others.'))

Snippet 3

Seamless adjustment of parameters in each OpenSesame session (Python code).

participant_parameters = 
  pd.read_csv(exp.get_file('../parameters per participant/' + 
              var.study_site + 
              ' site, parameters per participant.csv'))

var.resting_state_order = 
    participant_parameters['participant'] ==

var.language = 
  participant_parameters.loc[participant_parameters['participant'] == 

Snippet 4

Sending serial-port triggers in OpenSesame to record ERPs (Python code).

# Open the first serial port available
serialport = serial.Serial([0].device)

# Send triggers to the port
def send_trigger(trigger):
    serialport.write(trigger.to_bytes(length = 1, byteorder = 'big'))
    # 10 ms separation from next trigger (see BrainVision Recorder manual)
    # reset port
    serialport.write(int(0).to_bytes(length = 1, byteorder = 'big')) 


Barsalou, L. W. (2019). Establishing generalizable mechanisms. Psychological Inquiry, 30(4), 220–230.

Cross, Z. R., Zou-Williams, L., Wilkinson, E. M., Schlesewsky, M., & Bornkessel-Schlesewsky, I. (2021). Mini Pinyin: A modified miniature language for studying language learning and incremental sentence processing. Behavior Research Methods, 53(3), 1218–1239.

González Alonso, J., Alemán Bañón, J., DeLuca, V., Miller, D., Pereira Soares, S. M., Puig-Mayenco, E., Slaats, S., & Rothman, J. (2020). Event related potentials at initial exposure in third language acquisition: Implications from an artificial mini-grammar study. Journal of Neurolinguistics, 56, 100939.

Mitrofanova, N., Leivada, E., & Westergaard, M. (2023). Crosslinguistic influence in L3 acquisition: Evidence from artificial language learning. Linguistic Approaches to Bilingualism, 13(5), 717-742.

Morgan-Short, K., Finger, I., Grey, S., & Ullman, M. T. (2012). Second language processing shows increased native-like neural responses after months of no exposure. PLOS ONE, 7(3), e32974.

Pereira Soares, S. M., Kupisch, T., & Rothman, J. (2022). Testing potential transfer effects in heritage and adult L2 bilinguals acquiring a mini grammar as an additional language: An ERP approach. Brain Sciences, 12(5), Article 5.

Wilkinson, M. D., Dumontier, M., Aalbersberg, Ij. J., Appleton, G., Axton, M., Baak, A., Blomberg, N., Boiten, J.-W., da Silva Santos, L. B., Bourne, P. E., Bouwman, J., Brookes, A. J., Clark, T., Crosas, M., Dillo, I., Dumon, O., Edmunds, S., Evelo, C. T., Finkers, R., … Mons, B. (2016). The FAIR Guiding Principles for scientific data management and stewardship. Scientific Data, 3(1), Article 1.

comments powered by Disqus