Skip to content

ESPERANTO User Guide

dilemanu edited this page Apr 23, 2023 · 2 revisions

Table of Contents

1. Aim

ESPERANTO ensures a streamlined and standardised toxicogenomics (TGx) metadata harmonisation and the construction of a customised vocabulary in compliance with Good Laboratory Practice (GLP) standards, resulting in curated datasets characterised by higher FAIRness (from FAIR: Findable, Accessible, Interoperable and Reusable data).
Return to the index

2. Guiding Principles

ESPERANTO aims to merge the speed of automated curation with the quality of a human curator. Under this premise, the friendly graphical interface guides the user throughout the whole curation process by requesting authorisation for any modification before implementing it on the data.

At the same time, each operation is recorded, resulting in a detailed report about the entire curation of the processed dataset. Besides, the generated reports ensure the reproducibility of the curation of the processed dataset.
To strengthen its GLP compliance and reduce the impact of human subjectivity, this manual wants also to guide the user about specific considerations he/she may face during the curation. To make their identification easier, they are provided in italics.

Return to the index

3. Cornerstone files

The functioning of ESPERANTO is based on the cross comparison between the entries of a toxicogenomics (TGx) phenodata dataset to curate and a reference vocabulary.
Return to the index

3.1 Nomenclature

The user is invited to think to both dataset and vocabulary in terms of data tables. As a table, there are "labels" naming the columns, and "contents” stored in the different cells. Occasionally, contents can also be indicated as "instances".
Return to the index

3.2 Phenodata dataset

ESPERANTO was designed to work with toxicogenomics (TGx) phenodata datasets publicly available on Gene Expression Omnibus (GEO) repository. Nevertheless, an open flexible approach was privileged, giving the user the possibility to curate datasets of any type, once provided a different reference vocabulary. Regarding GEO, the stored metadata are highly heterogenous in terms of data model, but some columns are commonly present and identically named (i.e. "contact_address", "platform_id") throughout the datasets. To simplify the curation, such column names are listed in always.txt file in the folder file, later recalled automatically by the app.
Return to the index

3.3 Vocabulary structure

The concepts of “labels” and “contents” described in 3.1 are translated into the dictionary structure shown in Fig. 1. In fact, the functionality of ESPERANTO is based on a nested synonym vocabulary, structured on 4 different fields: “reference label”, “label synonyms”, “reference content”, “content synonyms”. Each reference label is linked to its specific synonyms, but also to its typical contents and the synonyms of all those reference contents.


Fig. 1 – Vocabulary panel. The column names identifies the 4 fields according to the described structure.

Despite the starting version of the vocabulary being empty, each round of curation gives the opportunity to enrich the dictionary with new terms.

Return to the index

4. Getting Started

When not differently specified, the following paragraphs require to enter the code lines in R (or Rstudio) environment. More details are given in the README file.

For reference, here are indicated the version of the used dependencies.
magrittr 2.0.3
dplyr 1.0.10
data.table 1.14.4
zeallot 0.1.0
collections 0.3.6
reshape2 1.4.4
tibble 3.1.8
shinyWidgets 0.7.4
stringr 1.4.1
readxl 1.4.1
DT 0.26
xlsx 0.6.5
tidyverse 1.3.2
shinycssloaders 1.0.0
kableExtra 1.3.4
knitr 1.40
plotly 4.10.1
shiny 1.7.3
shinyjs 2.1.0
shinyBS 0.61.1
shinyalert 3.0.0
shinyFeedback 0.4.0
shinydashboard 0.7.2
rhandsontable 0.3.8

Return to the index

4.1 Launch from Dockerfile

If needed, you can download and install Docker by following the instructions at Get-Docker.

ESPERANTO Dockerfile is available here.
Once downloaded, open the terminal, select the folder containing the Docker image and launch it:

bash ./run_esperanto.sh 

Open the browser and add the following line in the URL-bar.

localhost:3838     

The input files to upload must be placed in the same folder where the Dockerfile is located.

4.2 Launch from GitHub

4.2.1 Install R Dependencies

cran_pkgs <- c("magrittr", "dplyr", "data.table", "zeallot", "collections", "reshape2", "tibble", "shinyWidgets", 
               "stringr", "readxl", "DT", "xlsx", "tidyverse", "shinycssloaders", "kableExtra",  "knitr", "plotly", 
               "shiny", "shinyjs", "shinyBS", "shinyalert", "shinyFeedback", "shinydashboard", "rhandsontable")       
cran_pkgs.inst <- cran_pkgs[!(cran_pkgs %in% rownames(installed.packages()))]
if(length(cran_pkgs.inst)>0){
  print(paste0("Missing ", length(cran_pkgs.inst), " CRAN Packages:"))
  for(pkg in cran_pkgs.inst){
    print(paste0("Installing Package:'", pkg, "'..."))
    install.packages(pkg, repo="http://cran.rstudio.org", dependencies=TRUE)
    print("Installed!!!")
  }
}
If packages based on rJava (i.e. rlang) are not installed correctly, the user should try to update the rJava package and update/install the most recent Java version from www.java.com.
remove.packages(”rJava”)    

If the error holds after the update/install of Java, it is probably originated by rJava and Java using different versions (i.e 32 vs 64 bits). In this case, the solution is to install the same Java version and update manually the Java path with the new Java version: i.e, version jre1.8.0_121 (64-bits).

Sys.setenv(JAVA_HOME='C:/Program Files/Java/jre1.8.0_121')    

4.2.2 Run ESPERANTO locally

# Clone the git repository
  git clone https://github.com/fhaive/esperanto ESPERANTOclone

# Start R session, set the folder where the clone was stored and run by using runApp()
  setwd("./ESPERANTOclone")
  library(shiny)
  runApp(".")    
Return to the index

5. Workflow Interface Layout

Fig. 2 displays the workflow interface. It is designed to show input and operational controls on the left sidebar (marked by green line) and consulting tabs on the top panel bar (marked by red line). The corresponding output is visualised in the main display area (marked by the blue line) window. Both tabs and controls may be modified or disabled according to the selections made during the curation process.

Fig. 2 – Workflow Interface Layout. On the left, input and operational controls are framed by the green line. In the top bar, consulting tabs are marked by the blue line), while the corresponding output is visualised in the main display area delimited by the red line

Return to the index

6. Initialisation windows

6.1 User identification

Once the app is launched, ESPERANTO requires the user to identify him/herself for documentation purposes in the GLP-compliant report. Filling the blank identification box shown in Fig. 3 is compulsory to proceed further with the tool.

Fig. 3 – Identification box
Return to the index

6.2 Type of Operating Session

The user must select what kind of input(s) provide to ESPERANTO. By pressing “Load”, it is possible to restore a previously saved curation session through a new popup window (par. 7.4). When selecting “New”, it is compulsory to upload metadata (par. 7.1 and 7.2) and a customisable precompiled vocabulary (par. 7.3). As a starting vocabulary, a properly structured, empty template comes with the app.

Fig. 4 – Box to select the type of operating session. The user can load new metadata and vocabulary, or restore a previously saved session
Return to the index

6.3 Type of Phenodata

According to the operating session selected in par. 6.2, Fig. 5 displays the box where ESPERANTO asks the user to determine if the current session will deal with the curation of single uncurated metadata (“Single”), or the integration of multiple curated datasets (“Multiple”).

Fig. 5 – Selection box to set the type of dataset(s) to upload
Return to the index

7. Loading windows

Regardless of the working mode of ESPERANTO, this section will group the windows in which single or multiple metadata (respectively par. 7.1 and 7.2), reference vocabulary (par. 7.3) or previous session file (par. 7.4) are loaded.
Return to the index

7.1 Load Phenodata – Single case

As the “Load Phenodata” box in the sidebar is clicked (Fig. 6), it reveals the “Import Single Phenodata” button (Fig. 7), which launches “Import Phenodata” popup window (FIGURE123). It contains the controls to configure the phenotype file import.

Fig. 6 – Sidebar menu to import single phenodata
Return to the index

7.1.1 Phenodata file

As shown in Fig. 7, “Browse” allows to navigate in the computer folders to retrieve the dataset of interest.

Fig. 7 – "Import phenodata" window to set the importing parameters
Return to the index

7.1.2 Field Separator

In the window displayed in Fig. 7, the user can open the "Separator" dropdown menu. It allows the user to specify either tab, comma, semi-colon, space or other as separator for phenodata columns (Fig. 8).

Fig. 8 – Dropdown menu showing the different types of separator to use when importing the metadata file
Return to the index

7.1.3 Custom Separator

Fig. 8 shows the option "Other". It enables the “Other Separator” input widget, where the user can configure a custom alternative absent in the predefined set provided in “Field Separator” (par. 7.1.2).
Return to the index

7.1.4 Preview and Import

Once the user has configured the different importing parameters shown in Fig. 7, “Preview” button displays the phenotype file content. The number of samples and variables is shown above the table diplayed in Fig. 9. In Gene Expression Omnibus (GEO) phenodata, there are some columns present in every dataset that typically do not require curation.

For this reason, each variable is highlighted with a different color depending on whether the column needs ($\fcolorbox{red}{red}{\textsf{red}}$) or not ($\fcolorbox{green}{green}{\textsf{green}}$) curation.

At the bottom of the window, the user can find “Import” button. As it is clicked, the dataset is loaded assigning to the current working session a unique sha-256 ID based on R package digest. This ID will be added to each file name and to any generated report to link everything together in a univocal fashion.

Fig. 9 – Preview of the imported metadata. Colors indicates whether the column would need curation (red) or not (green)
Return to the index

7.2 Load Phenodata – Multiple case

As the "Load Phenodata" box in the sidebar is pressed, it reveals the "Import Multiple Phenodata" button (Fig. 10), which launches "Import Phenodata" popup window (Fig. 11).

Fig. 10 – Sidebar menu to import multiple phenodata

It is possible to “Browse” multiple datasets to “Open” and “Import”. Once uploaded, a table listing the imported datasets and their entry size is displayed in the lower part of the popup window (Fig. 11). It is possible to inspect the content of each of them by simply clicking on the name of the dataset.

Fig. 11 – Preview of the imported multiple metadata. Their name and size are listed in the middle section of the window. At the bottom, the user can have a preview of their content

Open Integration Support” closes the popup window and takes the user to the tab panel “Multiple Integration Tool Check” (par. 19). “Open Integration Support” also generates a unique sha-256 ID based on R package digest. This ID will be added to each file name, current session and to any report created, resulting in linking everything together in a univocal fashion.
Return to the index

7.3 Load Vocabulary

This window has a similar structure to that used to load phenodata (respectively par. 7.1 and 7.2). “Load Vocabulary” in the sidebar and the following “Import Vocabulary” (Fig. 12), launch “Import Vocabulary” popup window (Fig. 13).

Fig. 12 – Sidebar menu to import the reference vocabulary

Then, “Browse” the folders to retrieve, “Open” and “Import” the latest updated version of the reference vocabulary (Fig. 13).

Fig. 13 – Window to import the reference vocabulary
Return to the index

7.4 Restore Previous Session

Fig. 14 shows the popup window activated as consequence of selecting the option to restore a previous session, as described in par. 6.2. “Browse” computer folders to retrieve the session file of interest. If not renamed, the file name has a pattern similar to the following:

2022-11-19_16-03-22_dataset_name_current_session.RData

Once clicked the “Open” button and the full progression of the uploading bar, it is possible to finally restore the session by pressing the “Load” button. A notification in the lower right corner informs the user about the success of the procedure.

Fig. 14 – Window to restore a previously stored session

At the same time, consistently with the restored session, sidebar buttons may change color becoming green and data may be displayed in the main "display area" (par. 5).
Return to the index

8. GLP Mode

GLP mode b>” sidebar menu contains a toggle button that indicates if the GLP mode is enabled (green) or disabled (red) (Fig. 15).

Fig. 15 – Sidebar menu to activate (green) or deactivate (red) the GLP mode

GLP mode should be enabled if the user wishes to enclose in the curation report not only the series of operations, but also the reasons motivating the actions performed to harmonise the metadata.
Return to the index

9. Structure Homogenisation

This section describes the different phases by which the dataset is homogenised (Fig. 16). In particular, the first phase (“Relabelling” in par. 9.1 and “Duplicate Removal” in par. 9.2) are based only on respectively associating current column names on labels already present in the vocabulary or on phenodata contents, without active data entry from the user.

Fig. 16 – Sidebar menu to select the type of operation to perform during curation process

In order to speed the "Content Homogenisation" phase up as much as possible, the user should proceed along the list of operations, performing "Relabelling" and "Duplicate Removal" first.
Return to the index

9.1 Relabelling

Fig. 17 displays the popup window where potential suggestions to relabel column(s) of the processed dataset are provided in the dropdown menu on the left.

Fig. 17 – Relabelling window. On the left, the dropdown menu provides suggestions which are later accepted or rejected by the user on the right. The operation is recorded in the “Procedural Track” box in the bottom left corner

Once one of the proposals is selected, the whole column is automatically shown below, allowing the user to evaluate the content and a conscious choice between “Accept” or “Reject” the suggestion (Fig. 18). As the action is selected, the procedural track in the lower right corner is filled with a dynamic message describing the performed operation. The button “**Add**”, encloses the message as a new step in the general report listing all performed operations ([par. 17](#17), “Procedures/GLP”).

Fig. 18 – Relabelling window, example of rejecting the proposed relabelling. On the left, the column subject of the relabelling is shown for consulting purposes. On the right, after rejecting the proposal, the operation is recorded in the “Procedural Track” box in the bottom right corner

Regardless of the type of operation, each click of the “Undo” button allows the user to undo the last operation. At the same time, a message characterised by “UNDO” tag is printed at screen (Fig. 19) and it is reported to the list of actions performed on the dataset downloadable in section “Procedures/GLP” (par. 17).

Fig. 19 – Example of the UNDO message of the rejection of one of the suggestions in the “Relabelling” phase. The message printed at screen is also recorded in the “Procedural Track” report

Due to the automatic nature of the retrieval during “Relabelling”, it is preferable to run this section before the “Duplicate Removal” and above all on the “Content Homogenisation” phase, where the user is actively involved not only in supervision but also in the modification of the entries.

Return to the index

9.2 Duplicate Removal

ESPERANTO is able to identify groups of (almost) identical columns, if present. As shown in Fig. 20, the structure of the popup window is similar to the one of “Relabelling”. The dropdown menu on the left provides the groups of identical columns to select. Columns of the selected set are shown together to evaluate potential differences and select which column(s) to keep and which one(s) to delete through the radiobutton menu on the top right corner. If wished, it is possible to keep (“All”) or to remove the whole group (“None”). In agreement to the selection, the procedural track in the lower right corner shows a specific dynamic message reporting kept and discarded columns. The button “Add” encloses the message as the most recent step in the updated general report listing all performed operations (par. 17).

Fig. 20 – Duplicate Removal window. Once selected one group of duplicates in the dropdown menu on the left, below all columns are displayed. On the right, after selecting and accepting the column(s) to keep, the operation is recorded in the “Procedural Track” box in the bottom right corner

As in par. 9.1, regardless of the type of the operation, each click of the “Undo” button allows the user to undo the last performed action. Each of them will be printed at screen (Fig. 21) and will also be included in the “Procedures/GLP” report par. 17 and highlighted by an “UNDO” tag at the beginning of the message.

Fig. 21 – Example of the UNDO message of one Duplicate Removal. The message printed at screen is also recorded in the “Procedural Track” report

This section is particularly important in case of GEO metadata. In fact, they often present identical columns with different column names, or where the content differs for a starting word related to the type of content (see the table in Fig. 20).
The considerations did in the “Relabelling” section still holds and provides a consistent renaming of the columns for the following evaluation of potential duplicates. At the end, the user should consider duplicate removal as a powerful way to simplify and accelerate the “Content Homogenisation” step through a direct recoding of the entries by the user.

Return to the index

9.3 Content Homogenisation

9.3.1 First window: Content Homogenisation panels

The left side-part of the popup window follows the structural implant common to “Relabelling” (par. 9.1),and “Duplicate Removal” (par. 9.2) sections, where one of the columns can be selected and its content displayed (Fig. 22). The right part highlights the different aspects of interest of the chosen column.

Fig. 22 – Content Homogenisation window, example of recoding. On the left, the user selects the column to recode, which is shown right below. On the right, the editable box are coloured according on whether the entry is already present in the vocabulary (green as reference entry, blue as synonym), or not (red).

At first, on the top of Fig. 22, the current column name is shown in an box editable from the user (“Recoded column name”).
Right below, there is a dropdown menu enlisting a recoding map structured according to the following pattern:

"Current_content” recoded as “suggestion”

The association between each unique column content (“Current_content”) and “Suggestion” is determined by the cross-comparison between dataset and vocabulary. It is equal to:

  • Reference content of the vocabulary if it matches the current content;
  • Reference content of the vocabulary if current content is identical to one of the reference content´s synonyms;
  • Current content, if cross comparison returns no hits.

Once one of the entries of recoding-map is selected, the correspondent “suggestion” is shown in “Recoded unique content”, where it is freely editable.
The colours around the boxes “Recoded column name” and “Recoded unique content” work as hint for the user. They follow the same principle of the recoding map, where the label/content currently selected can match a vocabulary reference label/content (${\color{green}green}$), a vocabulary label/content´s synonym (${\color{blue}blue}$) or nothing (${\color{red}red}$). In particular, the color of “Recoded unique content” box depends not only on the principles described above, but also on the direct association of the content with the label present in “Recoded column name” box. A potential example is shown in Fig. 23.

Fig. 23 – Content Homogenisation window, right column. It shown a different color-based suggestion (green indicates it is a reference entry in the vocabulary, blue if it is a synonym, red if it is not included. The user can validate the suggestion by checking the entries in the vocabulary panel present in the right bottom corner of Fig. 22.

Just below the recoding boxes, there are a vocabulary consultation panel and a barplot, described in more detail in par. 9.3.1.1 and 9.3.1.2.
As in par. 9.1 and 9.2, regardless of the type of operation, each click of the “Undo” button allows the user to restore the last operation. Each of them will be printed at screen and will also be included in the performed actions report (par. 17, “Procedures/GLP”) and highlighted by an “UNDO” tag at the beginning of the message. At the bottom of the page, it is possible to decide the type of action to perform on the selected data, such as “Delete”, “Modify and/or Save”, “Specials”. A “Next” button leads to a second Content Homogenisation window.

Fig. 24 – Type of action the user can run in Content Homogenisation section
Return to the index

9.3.1.1 Vocabulary Consultation Panel

The panel on the lower part of the windows offers the possibility to type and search in the entry options for consultation purposes. The panel is splitted in two sections: the dropdown above (“Labels and synonyms”) enlists all reference labels and their synonyms, while the one below (“Contents and synonyms”) reports the reference label, their reference contents and specific content synonyms. As shown in Fig. 25, if the "Recoded column name" box stores a value already present in the vocabulary, the dropdowns automatically show the retrieved reference label and its synonyms above, and if present the connected reference content with its synonyms below.

Fig. 25 – Vocabulary consultation panel. The user can search for label and contents, but if the "Recoded column name" box (see Fig. 22 and 23) above stores a value already present in the vocabulary, the dropdowns automatically show the retrieved reference label and its synonyms above, and if present the connected reference content with its synonyms below.

Alternatively, the box remains in the configuration shown in Fig. 22 and the user can self-search labels and contents.

Return to the index

9.3.1.2 Barplot

In the lower right corner, a barplot displays the distribution of the data of the selected column and highlights the sample (light blue) specifically selected in the recoding map listed in the second dropdown menu above.

Fig. 26 – Example of barplot. It shows the distribution of the unique contents of the selected column. Light-blue indicates the entry currently selected in the reconding map box (the second dropdown menu from above in the right column (see Fig. 22 and 23)
Return to the index

9.3.2 Second window: Delete

Once “Delete” step is selected on the radiobuttons at the bottom of the first window of “Content Homogenisation”, a window with the message delivering the deletion of the selected column appears on the screen (Fig. 27).

Fig. 27 – Content Homogenisation – Delete. In the background, at the bottom of the image, there is “Delete” in the radiobutton options. Once pressed, the deletion of the column selected is notified at screen

By pressing “Ok”, a new popup window displays a descriptive message recorded to the “Procedures/GLP” final report once clicked “Add” (Fig. 28).

Fig. 28 – Example of message recorded in the “Procedural Track” after column deletion

The "Undo" button nullifies the previous operation, prints at screen a message and records the action on the procedural track (Fig. 29).

Fig. 29 – Example of UNDO message related to the deletion of a column. It will also be recorded in the “Procedural Track”
Return to the index

9.3.3 Second window: Modify and/or Save – “Recoding and Storing”

“Modify and/or Save” in the radiobuttons at the bottom of the first window of “Content Homogenisation” (Fig. 24) leads to “Recoding and Storing” window. It is divided into three different sections regarding specifically the dataset, the vocabulary and the actions to report: “Curated Dataset”, “Vocabulary Enrichment”, “Procedural Track”. The second box appears only once the options in the first are selected.
Return to the index

9.3.3.1 Curated Dataset

In this sub-panel, displayed in Fig. 30, the potentially edited label and content of previous window (Fig. 22) are displayed once again. First, they can be "Edited" or "Confirmed". In the latter case, the label/content were modified by editing in the previous window or during the "Relabelling" section, while "Confirmed" implies the identity with the original values in the pristine dataset. The colour of the label/entry still obeys the previous principles: ${\color{green}green}$ if they are reference values in the vocabulary, ${\color{blue}blue}$ if they are stored as synonyms, ${\color{red}red}$ if absent.
It is important to notice that the content color can differ from the one in the previous window. There, a red content means a newly edited reference content for that specific reference label; here in the current window, if the edited content appears green, it implies the content is already present in the vocabulary as reference content. Despite being confusing at a first glance, it invites the user to pay attention to the consistency of the editing. The same dualism may occur with labels.

Fig. 30 – Content Homogenisation – Recoding and Storing, "Save" case. On the top, once again, selected label and content are shown. They are described as “edited” or “confirmed” depending on being modified. Once pressed "Save", in the middle panel, the user can allocate the original label and content in a temporary vocabulary-like intermediate structure. At the bottom, the “Procedural Track” box describes the performed operation. The shown example refers to the case where user wants to "Save" the curated versions

The two buttons identify the type of action to perform. “Save” allows the user to recode label and content with their edited versions; “Skip full column recoding” if the user wants to use the edited label but confirm the whole column content.

It is possible to conclude that differences in colour aim to get user´s attention for a double check. When colours match, they just supports the choices of the user.
Green leads directly to the next step.

Blue means that the editing job should be refined: the user should return to the previous window, eventually consult the vocabulary to identify the reference value of the blue one and edit it in the correspondent “Recoded unique label (or content)” box(es).

If consciously edited, the red suggests that it is probably useful to store one or both edited and original label(s) and/or content(s) in a sort of pre-vocabulary structure (more details in par. 9.3.3.2). The user should be careful to understand if the red is due to the “new-term-status” or to some mistake, or wrong allocation (i.e. missing identification of the correct label/content to allocate the new term in)
.

As mentioned before, the "Undo" button restore the phenodata state to the previous operation. A message is displayed and recorded.

Fig. 31 – Example of UNDO message related to the recoding of a column. The message printed at screen will also be recorded in the “Procedural Track”

Return to the index .

9.3.3.2 Vocabulary Enrichment

The entries evaluated in the box at the top of the page (par. 9.3.3.1) are automatically considered potential reference terms for the vocabulary, but also the original label/content can be important for enrichment. This is because they may contain some synonym key word (i.e. edited: gender – original: sex), or be a typical way that column/content is named (i.e. edited: gender – original: gender.ch1).

Fig. 32 – Content Homogenisation – Recoding and Storing, "Skip full column recoding" case. On the top, once again, selected label and content are shown. They are described as “edited” or “confirmed” depending on being modified. Once “Skip full column recoding” is pressed, in the “Vocabulary Enrichment” panel, the user can allocate the original label. Since the content will not be recoded, the user can ignore it, or store it as “Reference Content(s)” in the temporary vocabulary-like intermediate structure

This sub-panel determines whether the user wants to store the original label and/or content versions. The two boxes in the first row automatically show the original version of the edited label/content. The radiobuttons below determine how to store the original value: “as Label Synonym”, “Do not store” (equivalent options are available for contents). Please note that the edited versions are automatically taken as reference values.

The panel design changes according to “Save” or “Skip full column recoding” selection. The former is shown in par. 9.3.3.1, the latter is here in Fig. 32. In fact, despite the selection of “Skip full column recoding”, the user may want to store one or more original contents through the checkbox. Only in this specific case, the user should be aware that the selected contents are allocated as reference entries and not as synonyms(“as Reference Content” substitutes “as Content Synonym”.

The selection made in this panel also determines the type of message shown in the “Procedural track” box below. “Store” button will store the label and/or content.

It is of extreme importance to maintain the consistency of the vocabulary. For this reason, the user is requested to authorise the incorporation of new terms in another section of ESPERANTO, “Updated Vocabulary” (par. 15). The current section builds a temporary pre-vocabulary structure, later used as input in “Updated Vocabulary” section.

If the user is aware that the original values are already present in the vocabulary, it is preferable to “Do not store” them. In this case, the lower amount of combinations of words will shorten the time required for the analysis of the temporary pre-vocabulary structure.

Return to the index

9.3.3.3 Procedural Track

As mentioned in par. 9.3.3.2, the message describing the action taken in “Curated dataset” and “Vocabulary enrichment” sub-panels) is automatically shown in the “Procedural track” box. The structure is similar, but the message depends on the selection made in the "Vocabulary Enrichment" panel and to "Save" (Fig. 33) or "Skip full column recoding" (Fig. 34). Example figures from both cases are reported here.

Fig. 33 – Example of "Procedural Track" message related to "Save" case of recoding a column. The message printed at screen will also be recorded in the “Procedural Track”. The configuration of the message varies with the performed operation

Fig. 34 – Example of "Procedural Track" message related to "Skip full column recoding" case of recoding a column. The message printed at screen will also be recorded in the “Procedural Track”. The configuration of the message varies with the performed operation

Generally speaking, the first two lines of the message report edited/confirmed label and content. In case of skipping the full column recoding, here are indicated the number of contents temporarily stored, leaving their explicit citation to the following lines. The last two lines describe if and how the original dataset column name and content were stored in the pre-vocabulary structure.
Return to the index

9.3.4 Second window: Specials – “Special Actions”

The selection of "Specials" in the radiobuttons shown in Fig. 24 (par. 9.3.1) opens a new popup window. This section consists of a tab panel with the following voices: “Agilent”, “Adding empty columns” and “Splitting column". Due to the faculty given to the user to customise some of their aspects, ESPERANTO was designed to do not have a direct undo of these actions. If the user wants to undo one of them, the correct way to do that is to Delete (par. 9.3.2) the newly generated column(s).
Return to the index

9.3.4.1 Agilent

This section is specifically implemented to deal with typical metadata from Agilent microarrays. They deliver array, slide and are information by means of specific strings. The user can find immediately more information about the pattern of the strings given by Agilent machines in the link in the top part of “Agilent” window. For example, such strings must present the following pattern:
US11263921_257236348514_S01_GE2_1200_Jun14_2_1.txt
.
The selected column is shown on the central left are of the window, while on the right it will be displayed the 3 newly generated splitted columns GSM, slide and array.

Since the splitting is targeted on a specific pattern, the button “Test” allows to verify the correct separation of the string. If it is correct, “Save” adds the newly generated columns into the phenodata. Otherwise, it is possible to “Reset” the simulated splitting test table on the right of the window.
As "Save" is clicked, the “Procedural Track” box displays the message reporting the outcome of the operation, while "Add" records it into the final procedural report (par. 17).

Return to the index

9.3.4.2 Adding Empty Columns

Fig. 35 shows the dedicated panel. Once the wished number of new empty columns to add is set, a text input box appears to enter the name(s) of the new column(s) separated only by commas.

Fig. 35 – Content Homogenisation – Specials, "Adding empty columns" case. The user can insert number and column name of the newly added column(s). The operation is recorded in the “Procedural Track” box at the bottom of the popup window

As the “Add” button on the right is clicked, the “Procedural track” frame shows the related message. As mentioned for any other “Procedural track” box, its “Add” button records the message to the final report in “Procedures/GLP” section.

Return to the index

9.3.4.3 Splitting Columns

Fig. 36 shows the related panel in the "Specials" popup window. The actions will be performed on the column selected in the first window of “Content Homogenization” (par. 9.3.1). If wished, it is possible to select a different column by ticking the checkbox above.
. This window allows to split the content of the selected column by means of a “Separator” or a “Regular expression”. On the left a link opens a popup window with some info about the splitting methods.

If “Separator” is selected, the user is required to choose the type of separator to use as splitter. There are some predefined, but in alternative the user can highlight “Other” and write a new separator in the newly-appeared box right next to "Type of Separator" menu.

Fig. 36 – Content Homogenisation – Specials, "Splitting column", “Separator” case. The user can select the type of splitting, the separator and can also add the new column names. “Test” allows to test the splitting and compare the original column on the left table vs the newly splitted contents on the right. Once “Separate” is clicked, the operation is performed. The functioning is analogous in “Regular Expression” case

The user can accept to name the new columns by ticking the correspondent checkbox and supplying the new column names separated only by comma. If “Regular Expression” is selected, the correspondent regular expression must be entered, together with the new column names (always separated only by comma). The regular expression section is build on regex parameter of function extract of R package tidyr: so it is important to provide the regular expression according to the rules of "extract" function.

For both splitting methods, “Test” button allows to verify the correct separation of the string. If the splitting is correct, “Save” the newly generated columns are added to the phenodata. Otherwise, it is possible to “Reset” the simulated test table on the right of the window.

Below the buttons, there are two tables, showing on the left the selected column and on the right the columns resulting from the splitting.

The procedural track and its “Add” button, works like the equivalent in other sections of ESPERANTO, showing and recording a message describing the operation performed.
.

The option based on separator is more suitable for simple splitting, while regular expression offers more complex solutions.
.
Due to the higher complexity, the user has the possibility to test if the set regular expression works properly before effectively modify the data and save the result
.

Return to the index

10. Session Management

This section is located in the lower part of the right sidebar and it is composed by the three controls “Load session”, “Save session” and “Reset session” here described and displayed in Fig. 37.

Fig. 37 – Sidebar menu to manage current session (“Load”, “Save” and “Reset”)
Return to the index

10.1 Load session

Load Session” takes the user to the same popup window of “Restore previous session” (par. 7.4).
Return to the index

10.2 Save session

Save Session” stores the current status of ESPERANTO in a .RData file automatically named according to the following format:
2022-11-19_16-03-22_dataset_name_current_session.RData
A notification in the lower right corner informs the user when the procedure is successfully accomplished.
Despite of the stability of the software, it is advised to save the session relatively often. The files do not only allow to rebuild the progress of the curation, but they offer also a fully working backup if needed.
Return to the index

10.3 Reset session

The button “Reset Session” re-initializes the app, deleting any unsaved value or modification, re-launching the series of initialization windows presented in par. 6.

Fig. 38 – Reset Session popup window. By pressing “Reset” any unsaved progress will be lost

Once "Reset Session" is clicked (Fig. 37), the popup window shown in Fig. 38 is launched. It notifies the user the risk of proceeding further by pressing button "Reset".

Return to the index

11. Download Report

Despite the working session being focused on curate a single dataset, or multiple curated datasets, the user needs to download several reports. This is possible by clicking “Export Reports” (Fig. 39) and accessing to “Analysis Reports” window.

Fig. 39 – Sidebar menu to download all generated files and

In alternative, every single report can be downloaded in the corresponding section of ESPERANTO.
Return to the index

11.1 Analysis Reports

Regardless on processing single or multiple datasets, the structure of the window is almost, differing only for the number and type of downloadable reports. This is described by the following table (Fig. 40).

Fig. 40 – Synthesis of the type of files and reports generated in “Single” and “Multiple” mode

In the middle of Fig. 41, it is possible to see 2 rows of boxes, for the majority initially red.

Fig. 41 – Analysis report popup window

The first row identifies the file/reports that are always present in that specific working mode and are those above the blue line in the table. The main report summarises the whole process, by synthesizing the features of the starting files, the type and number of performed operations. It reports the unique sha-256 ID, the name of all Curators and Arbiters judging the entries which will generate the files in the second row. Also, the first rows of these latter files will be enlisted, together with the procedural track. The ID will be added to any downloaded file name to supply them a univocal link. The second row depends not only on the working mode, but also on the outcomes of the analysis. If one of the boxes is grey, it means that no entries were allocated there and no file will be downloaded. More details about the type of files will be given in the next paragraphs (par. 15 for single- and par. 19 for multiple-mode).

Fig. 42 – Analysis report popup window, downloads in progress

By clicking “Download All” button on the left corner, a cascade download is triggered, turning the red boxes into green as the progress bars complete, as shown in Fig. 42. “Reset Windows Setting” allows the user to stop the download and reset the parameters as soon as the current partial download is over.

Return to the index

12. More Info

Github”, “Manual” and “Sample phenodata” are self-explicative links to lead the user to the indicated resources (Fig. 43).

Fig. 43 – Sidebar menu to retrieve further information. The links allows the user to access easily to the Github repository, the user guide or the sample phenodata
Return to the index

13. Tabs: Phenodata

Fig. 44 shows the panel where the loaded phenodata is shown in its original state, readily available for the user if a comparison with the modified current version (par. 16) is needed.

Fig. 44 – Tabs: Phenodata. It is in the bar above the main window and it displays the original loaded phenodata
Return to the index

14. Tabs: Vocabulary

The user can consult the loaded vocabulary in this tab. While each label synonym is separated from other row by row, the content synonyms are presented together in correspondence of each reference content.

Fig. 45 – Tabs: Vocabulary. It is in the bar above the main window and it displays the original loaded vocabulary
Return to the index

15. Tabs: Updated Vocabulary

ESPERANTO bases its ability to curate datasets on a reference vocabulary. For this reason, it is fundamental to maintain the consistency of it and explains why it was chosen to do not update the vocabulary automatically but to make the user to double check the candidate entries.
This tab is active only when the “Type of Metadata” (par. 6.3) is set on “Single” and it requires the upload of a reference vocabulary.
This section is structured similarly to “Multiple Integration Tool Check” (par. 19) using also a similar color-code to guide the user through the evaluation of the candidates temporarily stored during the recoding phase (in par. 9.3.3.2).
Load new terms suggestions” processes and categorises the entries according to the loaded vocabulary. The cross-comparison assesses whether the paired candidates are already present in the reference vocabulary. In case of a positive result, the word is color-coded in ${\color{green}green}$, ${\color{red}red}$ otherwise.
The hit-map generated by those allocations originates the three categories “Safe”, “Fast check” and “Slow check” enlisted in the “Potential outcomes” dropdown menu (Fig. 46). If one is missing, no entries were allocated.

Fig. 46 – Color coded classification of candidates to enrich the reference vocabulary

Once one of the categories is selected, a table enlisting the color-coded candidates appears. This table just shows the reference labels (and their synonyms if present) and reference contents (with their synonyms if present), hiding the rest of the information related on how the user wanted to store the original label/content par. 9.3.3.2), which will be later used to generate the updated version of the vocabulary.

Entry appears red because of:

  • being new (i.e. a word the user never encountered and evaluated before for enrichment)
  • being inconsistent with the vocabulary reference values due to the nature of the entry (i.e. same content but they refer to different labels)
  • being inconsistent with the vocabulary reference values due to minor issues (i.e. character mismatch).

${\color{green}Safe}$ is coded in green. It includes candidates where both label and linked contents are green. The cross-comparison generates a "hit-map" (Fig. 47), where the candidate label/content pairs matched the same linked pairs in the vocabulary. Due to the nature of their categorisation, the user cannot really find a clear error here. If some inconsistency is retrieved, it is more likely that it depends on some similar-duplicate recoding operation, creating new label/contents groups slightly overlapping a pre-existing one.

Fig. 47 – Color coded classification of candidates, “Safe” case. All entries are green because the label/content candidate pair match to a label/content pair already present in the vocabulary

${\color{orange}Fast \space check}$ is coded in yellow. It includes rows where both candidate label/content pair do not match to any of the pairs present in the reference vocabulary, resulting in completely new red terms. The entries, which appear in red, are completely new.
${\color{red}Slow \space check}$ is coded in red (Fig. 48). It includes all those rows where the label and at least one among the synonyms or the content is already in the vocabulary. The mix of green and red terms invites the user to evaluate carefully the different candidates.

Fig. 48 – Color coded classification of candidates, “Slow check” case. Entries are both red and green because the label/content candidate pair match partially to a label/content pair in the vocabulary. The user should be careful in their evaluation

As one of the rows is selected, a small box opens above the table, “Correspondent entry retrieved from the dictionary” (Fig. 49). It shows the outcome of the search in the reference vocabulary of the candidate label, so that the user can see the current state in the vocabulary of that specific label, its contents and all their synonyms.

Fig. 49 – “Correspondent entry retrieved from the dictionary”. If possible, this box appearing above the hit-map, shows the outcome of the search of the candidate label in the reference vocabulary. The user can evaluate the current state of the reference label, contents and synonyms

The user evaluates candidate table rows one by one, judging whether it must be “Accepted” (Store Entry), “Discarded” (Discard) or re-curated (Issue) (Fig. 50).

Fig. 50 – Buttons to classify the candidate entries row and to download the related report

Besides par. 11, also in this section it is possible to download the single reports, providing a synthesis about the categorisation of the different entries (Fig. 50).
In collaboration with the procedural track, these reports ensure the reproducibility of the decisions regarding the entry allocation process during the recoding phase.
For example, here are shown two rows of the “Store Entry” report.

ID Label Storing Label Label Syn. Content Storing Content Content Syn. Decision Curator Arbiter
5 2 organism 4 homo_sapiens Accepted SimoI SimoI
30 2 disease 3 healthy_control control Newly Accepted SimoI SimoI

ID identifies the operation number.
Referring to the table above, the numbers in “Label-” and “Content storing” encode how the entry was allocated in the intermediate temporary vocabulary. In the “Vocabulary Enrichment” panel, for example the user could choose to store the original value “as Synonym” or “Do not store”. For Label, these options were coded by “1” and “2”, while for Content “3” and “4”. This stands also in the case of “Skip full column recoding” described in par. 9.3.3.1. Recalling it shortly, the user may wish to recode only the label and skip modification of the contents. In the case where one or more of those pristine contents is of interest for vocabulary enrichment, the user can select “as Reference Content” which is also coded as “3” and requires the “Procedural track” support to distinguish from the “as Synonym Content” case.
Tags listed in Decision can be “Accepted”, “Newly Accepted”, “Issue” or “Discard”. They are self-explicative, but the distinction between “Accepted” and “Newly Accepted” lies on the fact that the first (row 1, “Safe” category) presents values already in the vocabulary, while the second has at least one new term for potentially updating the vocabulary.
For documentation purposes, each entry is enriched with the name of the “Curator” and also of the appraiser as “Arbiter” of the decision.

Once all the entries have been evaluated, the user can “Generate Updated Vocabulary” and download the updated version.

The consistency of the vocabulary is fundamental for the correct functioning of ESPERANTO. Hence, the user should be extremely careful in evaluating which new terms incorporate in the reference vocabulary. This “vocabulary curation” is an occasion to review the curation of the processed dataset, identifying potential errors and inconsistencies.

Return to the index

16. Tabs: Updated Phenodata

This panel shows the loaded phenodata in the current state. It updates with the modifications carried by the user during the curation process. The panel as the same structure as the original phenodata in "Tabs: Phenodata" shown in Fig. 44.
Return to the index

17. Tabs: Procedures/GLP

This tab displays the list of the steps taken by the user along the curation process. It reports each operation performed on the data and whether the entry was stored in the pre-vocabulary intermediate structure during the recoding phase.

If the “GLP mode” was active (par. 8), each recorded action is followed by the tag "COMMENT:" and the related compulsory justification provided by the user during the curation.

Procedural track report is downloadable not only in par. 11, but also through the button “Download” in the current window. It is revealed only if the report version printed at screen is the most recent. Otherwise, the updating is ensured by clicking the “Update to Download” button (Fig. 51).

Fig. 51 – Procedure/GLP panel. By pressing “Update to Download” the report shown in the panel is updates to the last operation or GLP
Return to the index

18. Tabs: Plotting Tool

In this tab, the user can easily plot between each other any variable of the single/multiple dataset (Fig. 52). The user can choose between Barplot and Tile plot (Fig. 52).

Fig. 52 – On the left of the window, selection box to plot single or multiple datasets as Barplot/Tileplot

Once selected whether the plot would be based on a single or on multiple datasets, the variable can be associated to Abscissa, Ordinate or Grouping Condition (Fig. 53).

Fig. 53 – On the left of the window, box to set abscissa, ordinate or grouping condition

The user should also characterise the type of plot (“Stacked”, “Grouped” or regarding grouping “No condition”). It can also be useful to specify if the ordinate axis should be in percentage, and if the legend should be included; at last, the user can enter axis and legend labels (Fig. 54).

Fig. 54 – On the left of the window, box to set plot parameters

Once all settings are specified, the button “Plot” originates the correspondent image (Fig. 55). This is achieved by plotly package, so different actions can be performed on the image by using the plotly self-hiding command bar above the picture (i.e. zooming, downloading).

Fig. 55 – Plotting panel with setting and parameters and related plot

The user should be aware that despite the personalisation, this section was mostly designed to ensure a quick way to examine data and not necessarily plot an image ready for publishing.

Return to the index

19. Tabs: Multiple Integration Tool Check

Correct integration of multiple phenodata is fundamental to legitimate all the previous curation work. This section wants to support the user in checking whether the analysed multi phenodata can integrate consistently or they need some further round of recoding/curation.
This tab is active only when the “Type of Metadata” (par. 6.3) is set on “Multiple” and it requires the upload of a reference vocabulary.
The metadata table is cross-compared to the vocabulary to assess whether the entries of the first are consistent with the reference vocabulary values. In case of a positive result, the word is shown in ${\color{green}green}$, ${\color{red}red}$ otherwise.
The results of this “consistency map” are also the base for the “Potential outcomes” dropdown menu: “Safe”, “Fast check”, “Slow check” (Fig. 56). If one is absent, there were no entries allocated.

Fig. 56 – Color coded classification of the entries in the table of multiple curated datasets regarding their consistency with the reference vocabulary

${\color{green}Safe}$ includes those phenodata columns where both label and each belonging content are green (Fig. 57). Due to the preliminary check through the “consistency map”, all the shown words result in green and the user can be reasonably sure about the positive integration: for this reason, also “Safe” is coded in green.

Fig. 57 – Color coded classification of multiple dataset entries, “Safe” case. The integrated entries are green because the label/contents stored in the integrated dataset are fully consistent with the same label/contents pair already present in the vocabulary

${\color{orange}Fast \space check}$ includes those columns which belongs to the “always columns” (see par. 3.2). The single entry (column and/or content(s)) may appear in red or green, but due to the nature of the column and its marginal importance in terms of data integration, the user can process them quite easily. “Fast check” is coded in yellow.
${\color{red}Slow \space check}$ includes all the columns where the label or at least one of their content(s) is NOT a reference value in the vocabulary according to the “consistency map” (Fig. 58).

Fig. 58 – Color coded classification of multiple dataset entries, “Slow check” case. It includes integrated entries where the label or at least one of the content(s) is not consistent with the reference vocabulary

If the user had previously curated the single datasets now integrated together, he/she had enriched the reference vocabulary by making a certain number of new entries available and evaluating their inclusion.

If this was done, the red entry may be due to:

  • an inconsistency with the vocabulary reference values due to the nature of the entry;
  • an inconsistency with the vocabulary reference values due to minor issues (i.e. character mismatch);
  • the type of entry (i.e. a word the user did not want to include in the vocabulary for some reason).

If the vocabulary enrichment was not done, the user should upload the saved session of the correspondent single dataframe and perform it.
For all the reasons discussed above, the user should be extremely careful in processing the entries of this category, which explains the name (“Slow check”) and the red color.

Once selected the “Potential Outcome”, the labels of the columns included in the chosen category are listed on the left. By clicking one of them, on the right, the corresponding content is shown. All entries are color coded in agreement with the “consistency map” mentioned above in this paragraph.
The user can evaluate the entry and classify it as “Consistent” or “Issue”, ensuring in the latter case a report the user can use as a guide to retrieve the critical entries in the correspondent dataset and fix them. For documentation purposes, ESPERANTO stores as “Arbiter” of the classification the user identity. The lists of the entries allocated in the two categories can also be downloaded with the download buttons at the bottom of the window.

The message describing the decision is automatically shown in the “Procedural Track” box and appended to the “Procedures/GLP” report (par. 17) through “Add”. The example of messages in case of entry classified as "Consistent" (Fig. 59) or "Issue" (Fig. 60)are shown here.

Fig. 59 – Example of "Procedural Track" message related to "Consistent" case assessing the entries of the integrated multiple dataset. The message printed at screen will also be recorded in the “Procedural Track”

Fig. 60 – Example of "Procedural Track" message related to "Issue" case assessing the entries of the integrated multiple dataset. The message printed at screen will also be recorded in the “Procedural Track”

As for previous sections, it is possible to undo the classification of the entry by pressing the "Undo" button. By undoing the operation, a message similar to the one in Fig. 61 is printed at screen and recorded in the "Procedural Track".


Fig. 61 – Example of the UNDO message of the classification as “Consistent” during the integrated multiple dataset entry assessment. The message printed at screen is also recorded in the “Procedural Track” report

The user should be extremely careful in this step. It finalises all the work done during the single dataset curation sessions for each dataset loaded in the multiple mode, but also the incorporation of the new reference and synonyms entries in the vocabulary. For these reasons, even if this step may sound redundant, it is an occasion to verify the consistency of the previous work and easily correct potential mistakes. The tool just supports the user in the whole process and automatises what is possible, but the user must examine all entries with full attention to ensure the consistency in merging multiple datasets.

Return to the index

Clone this wiki locally