Skip to content

pallavisurana1/dbSNP-text-summarization

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SNP Literature Information Fetcher

This script fetches literature information for a given list of SNP IDs using NCBI E-utilities, processes the information to extract diseases mentioned in the titles and abstracts, and summarizes the relevance of each SNP variant. The summarized information is saved to a CSV file.

Requirements

  • Python 3.8+
  • requests library
  • beautifulsoup4 library
  • pandas library
  • spacy library
  • nltk library
  • lxml parser

Setup

  1. Create a new conda environment:

    conda create -n variant_analysis python=3.8
    conda activate variant_analysis
    pip install requests beautifulsoup4 pandas spacy nltk lxml
    python -m spacy download en_core_web_sm
    
    chmod +x run.sh
    ./run.sh ./data/input.txt ./data/output.csv
    

Main Functionality

  1. Fetch Literature Information:

The script fetches literature information for each SNP ID using the NCBI E-utilities API. It sends a search request to obtain the PubMed IDs (PMIDs) and then fetches the details of each publication.

  1. Extract Diseases from Text:

The script uses spaCy's NLP model to extract diseases mentioned in the titles and abstracts of the publications. It identifies entities labeled as "DISEASE" or "CONDITION" and also looks for specific keywords related to diseases.

  1. Summarize Relevance:

For each SNP ID, the script summarizes the relevance based on the diseases mentioned in the titles and abstracts. It categorizes the relevance as "High" if any diseases are mentioned; otherwise, it categorizes it as "Low".

  1. Save to CSV:

The summarized information is saved to a CSV file.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.2%
  • Shell 0.8%