Text-mining with the SimText toolset

Overview

Questions
  • How can I automatically collect PubMed data for a set of biomedical entities such as genes?

  • How can I analyze similarities among biomedical entities based on PubMed data on large-scale?

Objectives
  • Learn how to use the SimText toolset

  • Upload a table with biomedical entities in Galaxy

  • Retrieve PubMed data for each of the biomedical entities

  • Extract biomedical terms from the PubMed data for each biomedical entity

  • Analyze the similarity among the biomedical entities based on the extracted data in an interactive app

Requirements
Time estimation: 1 hour
Supporting Materials
Last modification: Apr 5, 2021
License: Tutorial Content is licensed under Creative Commons Attribution 4.0 International License The GTN Framework is MIT

Introduction

Literature exploration in PubMed on a large number of biomedical entities (e.g., genes, diseases, or experiments) can be time-consuming and challenging, especially when assessing associations between entities. Here, we use SimText, a toolset for literature research that allows you to collect text from PubMed for any given set of biomedical entities, extract associated terms, and analyze similarities among them and their key characteristics in an interactive tool.

This tutorial is based on a proof-of-concept example given in Gramm et al. 2020. We are going to analyze similarities among 95 genes based on their associated biomedical terms in the literature, and compare their pre-existing disorder categories to their grouping based on the literature.

The workflow combines 3 main steps, starting with the retrieval of PubMed data for each of the genes. We then use the PubMed data from each gene to extract related scientific terms that are all combined in one large binary matrix. Finally, we explore the generated data in an interactive tool that performs different unsupervised machine-learning algorithms to analyze the similarities/ the grouping among the genes based on their extracted terms from the literature.

Tutorial overview
Figure 1: Schematic presentation of the workflow.

Agenda

In this tutorial, we will cover:

  1. Input data
  2. Retrieval of PubMed data
  3. Extraction of biomedical terms from PubMed abstracts
  4. Exploration of data in interactive tool

Input data

The input data is a simple table with the genes we want to analyze as well as their pre-existing grouping (the grouping is required later on to compare it to our text-based gene grouping). In order for the tools to recognize the column with the biomedical entities of interest, our 95 genes, the column name should start with “ID_”, and for the grouping variable with “GROUPING_”.

hands_on Hands-on: Data upload

  1. Create a new history for this tutorial

    Tip: Creating a new history

    Click the new-history icon at the top of the history panel.

    If the new-history is missing:

    1. Click on the galaxy-gear icon (History options) on the top of the history panel
    2. Select the option Create New from the menu
  2. Import the input file from Zenodo

    https://zenodo.org/api/files/b7b2b1d8-bb18-423d-9fe4-3bce858265ac/clingen_data
    
    • Copy the link location
    • Open the Galaxy Upload Manager (galaxy-upload on the top-right of the tool panel)

    • Select Paste/Fetch Data
    • Paste the link into the text field

    • Press Start

    • Close the window

    • By default, Galaxy uses the URL as the name, so rename the files with a more useful name.

Retrieval of PubMed data

In the first step we collect PubMed data for each of the genes. The genes are used as search queries to download a defined number of PMIDs, here up to 500, from PubMed. The PMIDs are saved in additional columns of our input data.

details NCBI API key (optional)

To speed up the the download of PubMed data users can obtain an API key from the settings page of their NCBI account (to create an account, visit http://www.ncbi.nlm.nih.gov/account/) and add it to the Galaxy user-preferences (User → Preferences → Manage Information).

hands_on Hands-on: Step 1: PubMed query tool

  1. Run PubMed query Tool: toolshed.g2.bx.psu.edu/repos/iuc/pubmed_by_queries/pubmed_by_queries/0.0.2 with the following parameters:
    • param-file “Input file with query terms”: Input dataset
    • “Number of PMIDs (or abstracts) to save per ID”: 500

    comment Comment

    The tool is also able to save the abstracts as text instead of their PMIDs. This feature is used for another type of analysis (see Gramm et al. 2020), or can be used if the user wants to use the tool independent from a workflow to retrieve many abstract texts at once. For the next step of our example in this tutorial, only PMIDs are required.

Extraction of biomedical terms from PubMed abstracts

Next, we extract the 100 most frequent ‘Disease’ and ‘Gene’ terms (PubTator annotations) from the PubMed data. All genes with their 100 associated terms are then combined in one large binary matrix. Each row represents a gene and each column one of the extracted terms. This matrix is later used to find similar genes, i.e. genes that have many common terms associated with them.

hands_on Hands-on: Extraction of PubTator annotations

  1. Run PMIDs to PubTator Tool: toolshed.g2.bx.psu.edu/repos/iuc/pmids_to_pubtator_matrix/pmids_to_pubtator_matrix/0.0.2 with the following parameters:
    • param-file “Input file with PMID IDs”: output of PubMed query tool
    • “categories”: Genes Diseases
    • “Number of most frequent terms/IDs to extract.”: 100

    comment PubTator

    PubTator annotates terms of the following categories: Gene, Disease, Mutation, Species and Chemical. In this example we chose to only extract gene and disease terms but you can also select other categories if you are interested in those.

Exploration of data in interactive tool

After generating the large binary matrix, we can explore the similarities/ the grouping among the genes in the interactive SimText tool. The following features are generated:

  1. Word clouds for each gene
  2. Dimension reduction and hierarchical clustering of the binary matrix
  3. Calculation of the adjusted rand index (similarity between text-based grouping and the pre-existing disorder categories)
  4. Table with terms and their frequency among the genes

hands_on Hands-on: Explore data interactively

  1. Run interactive_tool_simtext_app Tool: interactive_tool_simtext_app with the following parameters:
    • param-file “Input file”: initial input file with genes and pre-existing grouping
    • param-file “Matrix file”: output of PMIDs to PubTator tool
  2. Open interactive tool

    Tip: Open interactive tool

    1. Go to User > Active InteractiveTools
    2. Wait for the SimText app to be running (Job Info)
    3. Click on SimText app
Wordcloud
Figure 2: Left: For all genes a wordcloud with their associated terms cen be generated. Right: In the dimension reduction plot the similarities among the genes can be explored. The colouring corresponds to the pre-existing disorder categories.
Clustering
Figure 3: Hierarchical clustering of the matrix. Different clustering methods can be selected and the adjusted rand index be calculated.

Conclusion

Key points

  • The SimText toolset allows large-scale literature analysis of a set of biomedical entities such as genes or diseases

  • The similarities among the biomedical entities can be explored interactively

  • The litertaure based grouping can be compared to an existing grouping to discover similarities/ relationships hidden in the literature

Frequently Asked Questions

Have questions about this tutorial? Check out the FAQ page for the Statistics and machine learning topic to see if your question is listed there. If not, please ask your question on the GTN Gitter Channel or the Galaxy Help Forum

References

  1. Gramm, M., E. Perez-Palma, S. Schumacher-Bass, J. Dalton, C. Leu et al., 2020 SimText: A text mining framework for interactive analysis and visualization of similarities among biomedical entities. BioRxiv. 10.1101/2020.07.06.190629

Feedback

Did you use this material as an instructor? Feel free to give us feedback on how it went.

Click here to load Google feedback frame

Citing this Tutorial

  1. Marie Gramm, Dennis Lal group, Daniel Blankenberg, 2021 Text-mining with the SimText toolset (Galaxy Training Materials). https://training.galaxyproject.org/archive/2021-08-01/topics/statistics/tutorials/text-mining_simtext/tutorial.html Online; accessed TODAY
  2. Batut et al., 2018 Community-Driven Data Analysis Training for Biology Cell Systems 10.1016/j.cels.2018.05.012

details BibTeX

@misc{statistics-text-mining_simtext,
author = "Marie Gramm and Dennis Lal group and Daniel Blankenberg",
title = "Text-mining with the SimText toolset (Galaxy Training Materials)",
year = "2021",
month = "04",
day = "05"
url = "\url{https://training.galaxyproject.org/archive/2021-08-01/topics/statistics/tutorials/text-mining_simtext/tutorial.html}",
note = "[Online; accessed TODAY]"
}
@article{Batut_2018,
    doi = {10.1016/j.cels.2018.05.012},
    url = {https://doi.org/10.1016%2Fj.cels.2018.05.012},
    year = 2018,
    month = {jun},
    publisher = {Elsevier {BV}},
    volume = {6},
    number = {6},
    pages = {752--758.e1},
    author = {B{\'{e}}r{\'{e}}nice Batut and Saskia Hiltemann and Andrea Bagnacani and Dannon Baker and Vivek Bhardwaj and Clemens Blank and Anthony Bretaudeau and Loraine Brillet-Gu{\'{e}}guen and Martin {\v{C}}ech and John Chilton and Dave Clements and Olivia Doppelt-Azeroual and Anika Erxleben and Mallory Ann Freeberg and Simon Gladman and Youri Hoogstrate and Hans-Rudolf Hotz and Torsten Houwaart and Pratik Jagtap and Delphine Larivi{\`{e}}re and Gildas Le Corguill{\'{e}} and Thomas Manke and Fabien Mareuil and Fidel Ram{\'{\i}}rez and Devon Ryan and Florian Christoph Sigloch and Nicola Soranzo and Joachim Wolff and Pavankumar Videm and Markus Wolfien and Aisanjiang Wubuli and Dilmurat Yusuf and James Taylor and Rolf Backofen and Anton Nekrutenko and Björn Grüning},
    title = {Community-Driven Data Analysis Training for Biology},
    journal = {Cell Systems}
}
                

Congratulations on successfully completing this tutorial!