Skip to content

KNOWDYN/CTWizard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

CTWizard - Clinical Trials Mining Tool

CTWizard is a Python-based tool designed to empower medical researchers by streamlining the search, retrieval, and processing of clinical trial data from ClinicalTrials.gov. With this tool, users can quickly generate comprehensive reports summarizing clinical trials related to specific diseases, conditions, or treatments across the globe.

Key Benefits

  • Rapid Insights: Save hours of manual research by automating the retrieval of clinical trial data.
  • Structured Reporting: Generate detailed reports, including trial summaries, statuses, and participant details.
  • Narrative Synthesis: Use large language models to synthesize search results into a cohesive narrative report.

Features

1. Customizable Clinical Trial Search

Users can specify:

  • Query Condition: Search for conditions (e.g., "lung cancer", "COVID-19").
  • Country: Search by country of interest.
  • Result Count: Define how many clinical trial records to retrieve.

2. API Integration

Seamlessly connects to the ClinicalTrials.gov API to fetch clinical trial data, utilizing user-defined parameters for tailored results.

3. Structured Clinical Trial Output

The retrieved trials are presented with key details:

  • NCT ID: A unique identifier for each trial.
  • Title: Brief trial title.
  • Status: Current recruitment status.
  • Enrollment: Expected number of participants.
  • Summary: Brief trial description.
  • URL: Direct link to the trial details on ClinicalTrials.gov.

4. Narrative Report Generation

Uses Huggingface's GPT-based model to generate an enhanced narrative report, summarizing the search results for ease of interpretation and presentation.

5. Automatic Report Saving and Download

Automatically saves the generated report to a local file (Enhanced_ClinicalTrials_Report.txt) and provides a direct download link.

Installation

pip install requests transformers

Usage

  1. Clone this repository:

    git clone https://github.com/your_username/CTWizard.git
    cd CTWizard
  2. Run the script:

    python CTWizard.py
  3. Enter the following inputs when prompted:

    • Clinical trials search query: e.g., lung cancer
    • Country: e.g., United States
    • Number of results to fetch: e.g., 10
  4. The generated report will be available as Enhanced_ClinicalTrials_Report.txt and can be downloaded directly.

Example Output

A sample clinical trial summary in the report includes:

**Title:** Phase II Study on Immunotherapy for Lung Cancer  
**Status:** Recruiting  
**Enrollment:** 500 patients  
**NCT ID:** NCT12345678  
**URL:** https://clinicaltrials.gov/ct2/show/NCT12345678  
**Summary:** This study investigates the effectiveness of immunotherapy in treating non-small cell lung cancer patients...

How It Works

  • Step 1: User inputs are used to query the ClinicalTrials.gov API.
  • Step 2: Relevant trial data is retrieved and structured.
  • Step 3: A GPT-based language model synthesizes the data into an enhanced narrative report.
  • Step 4: The report is saved and made available for download.

Requirements

  • Python 3.7+
  • requests library
  • transformers library

License

This project is licensed under the MIT License. See the LICENSE file for details.