The context term detection tool detects important context terms such as protein, site, disease, species, tissue, and cell line from both abstracts and full-length articles. It processes text from different sections (Title, Abstract, Methods, Results, Discussion, Conclusion) based on PubTator annotations and dictionaries.
- Proteins, diseases, species, and cell lines are detected using PubTator3.
- Tissues are detected using a comprehensive tissue dictionary named Brenda.
- Sites are detected using an in-house sitedetector tool.
- For dictionary-based detection, the tool uses OGER.
The tool first collects biocxml files for a list of PMIDs using the PubTator3 API, from which texts are parsed for dictionary-based context term detection, site detection, and final output creation.
The output file is generated by running a pmid.txt file through the pipeline to detect context terms from abstracts.
- pmid: Article PMID
- entity: Detected term
- entity_type: Type of the entity (protein, site, disease, species, cell line, or tissue)
- start_offset, end_offset: Position of the entity term in the sentence
- source: Dictionary from which the entity was detected (e.g., Brenda for tissue)
- id: Unique identifier (e.g., MESH ID, Cellosaurus ID, gene ID, etc.)
- doid_for_diseases: Mapped Disease Ontology ID (DOID) for diseases
- uniprot_ac: UniProt accession ID for genes detected by PubTator
- sent_index: Sentence number where the entity was found
- sentence: Extracted sentence containing the entity
- Detected terms are highlighted with multiple colors.
- Legends are available at the beginning to indicate color codes.
- Abstract titles appear as
PMID: <pmid>.
The output file is generated by running a pmid.txt file through the pipeline to detect context terms from full-length articles.
missing_full_length_pmids.txt: List of PMIDs without open access to full-length articles.pmids_pmcids.xlsx: Mapping of PMIDs to PMCIDs (ignore if available in the output sheet).
- pmid, pmcid: Article IDs
- entity, entity_type, start_offset, end_offset
- source: Dictionary from which the entity was detected
- id, doid_for_diseases, uniprot_ac
- sent_index: Sentence number
- section: Section where the entity was found
- sentence: Extracted sentence containing the entity
- Terms are highlighted in each section.
- Sections are labeled as
PMCID_SECTIONNAME(e.g.,PMC2391110_ABSTRACT). - Sentence index matches the Excel sheet.
The GST tool detects glycan structure terms from abstracts and full-length articles based on an ML-based BERT model. The model is currently trained on 400 abstracts but may require further improvements.
- pmid: Article PMID
- sent_index: Sentence number
- sent_text: Sentence containing detected GSTs
- BERT_Output: GST terms detected by the ML model (separated by
|if multiple)
- GST terms are highlighted in blue.
- Abstract titles appear as
PMID: <pmid>.
- pmcid: PMCID
- section: Section where the GST was found
- paragraph, sent_index: Paragraph and sentence index
- sent_text: Extracted sentence
- BERT_Output: Detected GST terms
- GST terms are highlighted in blue.
- Sections appear as
PMCID_SECTION_PARAGRAPH. - Sentence index matches the Excel sheet.
- Docker (v18.09.6 or newer)
- Make the script executable:
chmod +x run_docker.sh
- Run the script:
./run_docker.sh
- Choose an option when prompted:
abstract(Context Term Detection - Abstracts)full-length(Context Term Detection - Full-length articles)both(Both abstract and full-length processing)gst_abstract(GST Detection - Abstracts)gst_full(GST Detection - Full-length articles)
- If asked for a new PMID file, enter
yesand provide the file path (e.g.,/home/user/context_term_docker/pmid.txt). - The process may take 30-45 minutes for 5 PMIDs (Context Term Detection) or 15 minutes for 5 PMIDs (GST Detection).
abstract_xml/bioc_xml_fl: Extracted XML files from PubTator3abstract_text/output_text_section_FL: Text files for PMIDsOutputs_Abstract/Outputs_FL: Output files (Excel, HTML)Scripts_Abstract/Scripts_FL: Processing scriptsDictionary: Brenda dictionary for tissue detectionmesh_to_doid: Mapping files for disease ID conversionOGER: Dictionary-based entity detection toolobo_to_tsv_tissue.py: Updates OGER dictionary with new Brenda terms
Outputs: Output files (Excel, HTML)Scripts: Processing scriptsSaved_Model: ML model weights, tokenizer, and dictionary
requirements.txt: Lists required dependencies for all tools
The context term detection tool detects important context terms such as protein, site, disease, species, tissue, and cell line from both abstracts and full-length articles. It processes text from different sections (Title, Abstract, Methods, Results, Discussion, Conclusion) based on PubTator annotations and dictionaries.
- Proteins, diseases, species, and cell lines are detected using PubTator3.
- Tissues are detected using a comprehensive tissue dictionary named Brenda.
- Sites are detected using an in-house sitedetector tool.
- For dictionary-based detection, the tool uses OGER.
The tool first collects biocxml files for a list of PMIDs using the PubTator3 API, from which texts are parsed for dictionary-based context term detection, site detection, and final output creation.
The output file is generated by running a pmid.txt file through the pipeline to detect context terms from abstracts.
- pmid: Article PMID
- entity: Detected term
- entity_type: Type of the entity (protein, site, disease, species, cell line, or tissue)
- start_offset, end_offset: Position of the entity term in the sentence
- source: Dictionary from which the entity was detected (e.g., Brenda for tissue)
- id: Unique identifier (e.g., MESH ID, Cellosaurus ID, gene ID, etc.)
- doid_for_diseases: Mapped Disease Ontology ID (DOID) for diseases
- uniprot_ac: UniProt accession ID for genes detected by PubTator
- sent_index: Sentence number where the entity was found
- sentence: Extracted sentence containing the entity
- Detected terms are highlighted with multiple colors.
- Legends are available at the beginning to indicate color codes.
- Abstract titles appear as
PMID: <pmid>.
The output file is generated by running a pmid.txt file through the pipeline to detect context terms from full-length articles.
missing_full_length_pmids.txt: List of PMIDs without open access to full-length articles.pmids_pmcids.xlsx: Mapping of PMIDs to PMCIDs (ignore if available in the output sheet).
- pmid, pmcid: Article IDs
- entity, entity_type, start_offset, end_offset
- source: Dictionary from which the entity was detected
- id, doid_for_diseases, uniprot_ac
- sent_index: Sentence number
- section: Section where the entity was found
- sentence: Extracted sentence containing the entity
- Terms are highlighted in each section.
- Sections are labeled as
PMCID_SECTIONNAME(e.g.,PMC2391110_ABSTRACT). - Sentence index matches the Excel sheet.
The GST tool detects glycan structure terms from abstracts and full-length articles based on an ML-based BERT model. The model is currently trained on 400 abstracts but may require further improvements.
- pmid: Article PMID
- sent_index: Sentence number
- sent_text: Sentence containing detected GSTs
- BERT_Output: GST terms detected by the ML model (separated by
|if multiple)
- GST terms are highlighted in blue.
- Abstract titles appear as
PMID: <pmid>.
- pmcid: PMCID
- section: Section where the GST was found
- paragraph, sent_index: Paragraph and sentence index
- sent_text: Extracted sentence
- BERT_Output: Detected GST terms
- GST terms are highlighted in blue.
- Sections appear as
PMCID_SECTION_PARAGRAPH. - Sentence index matches the Excel sheet.
Run the docker file to execute any of the pipeline discussed above.
- Docker (v18.09.6 or newer)
- Make the script executable:
chmod +x run_docker.sh
- Run the script:
./run_docker.sh
- Choose an option when prompted:
abstract(Context Term Detection - Abstracts)full-length(Context Term Detection - Full-length articles)both(Both abstract and full-length processing)gst_abstract(GST Detection - Abstracts)gst_full(GST Detection - Full-length articles)
- If asked for a new PMID file, enter
yesand provide the file path (e.g.,/home/user/context_term_docker/pmid.txt). - The process may take 30-45 minutes for 5 PMIDs (Context Term Detection) or 15 minutes for 5 PMIDs (GST Detection).
abstract_xml/bioc_xml_fl: Extracted XML files from PubTator3abstract_text/output_text_section_FL: Text files for PMIDsOutputs_Abstract/Outputs_FL: Output files (Excel, HTML)Scripts_Abstract/Scripts_FL: Processing scriptsDictionary: Brenda dictionary for tissue detectionmesh_to_doid: Mapping files for disease ID conversionOGER: Dictionary-based entity detection toolobo_to_tsv_tissue.py: Updates OGER dictionary with new Brenda terms
Outputs: Output files (Excel, HTML)Scripts: Processing scriptsSaved_Model: ML model weights, tokenizer, and dictionary
requirements.txt: Lists required dependencies for all tools
- Run each script individually by following the execution process inside
run_container.shbash file. - Scripts are numbered sequentially
context_term_abstract_version: Files for the abstract version of the context term detection toolcontext_term_full_length_version: Files for the full-length version of the context term detection toolgst_abstract_version: Files for the abstract version of the GST detection toolgst_full_version: Files for the full-length version of the GST detection tool
- Model weights are available in saved_model.tar.gz zip file
- Model weights can be found here
- We recommend running the docker to obtain the actual weights of the GST tool
N.B: More details can be found in the documentation.docx file.