A tool to fetch research papers with non-academic authors from PubMed
Project description
Bio-Info
A Python tool to fetch research papers from PubMed and identify those with authors affiliated with pharmaceutical or biotech companies.
Features
- Search PubMed using the full PubMed query syntax
- Identify papers with authors affiliated with pharmaceutical or biotech companies
- Extract corresponding author emails
- Output results to CSV or console
Code Organization
The project is organized as follows:
bio_info/: Main package directory__init__.py: Package initializationapi.py: Module for interacting with the PubMed APIaffiliations.py: Module for identifying non-academic authors and company affiliationsoutput.py: Module for generating and formatting CSV outputcli.py: Command-line interface implementation
tests/: Test directorytest_bio_info.py: Unit tests for the package
Installation
This project uses Poetry for dependency management.
- Make sure you have Python 3.8+ and Poetry installed
- Clone the repository
git clone https://github.com/yourusername/pubmed-papers.git
cd pubmed-papers
- Install dependencies
poetry install
Usage
After installation, you can use the get-papers-list command to search for papers:
# Basic usage, prints results to console
poetry run get-papers-list "cancer therapy"
# Save results to a CSV file
poetry run get-papers-list "artificial intelligence AND medicine" -f results.csv
# Enable debug mode
poetry run get-papers-list "COVID-19 vaccine" -d
# Limit results (default is 100)
poetry run get-papers-list "gene therapy" -m 50
Command Line Arguments
query: PubMed search query (enclose in quotes for complex queries)-h, --help: Show help message and exit-f, --file: Specify the filename to save the results (if not provided, print to console)-d, --debug: Print debug information during execution-m, --max-results: Maximum number of results to fetch from PubMed (default: 100)
Dependencies
This project uses the following key libraries:
- Biopython: For accessing the PubMed API
- Pandas: For data manipulation and CSV handling
- Requests: For HTTP requests
Development
Running Tests
poetry run pytest
Tools Used
The following tools were used in the development of this project:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bio_info_pubmed-0.1.0.tar.gz.
File metadata
- Download URL: bio_info_pubmed-0.1.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60b9bb1e9a978ad4cca2e6f0df67a586328518605830fb56107ed69b7690482e
|
|
| MD5 |
106508843b91a177a5aa2c83581c8fa6
|
|
| BLAKE2b-256 |
5e0a1ebb061130b185a28f322fd6b989f1ceebf5b56e07235104de8cacc077a0
|
File details
Details for the file bio_info_pubmed-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bio_info_pubmed-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
151e86d64f422d609df2adfc0da6a23486bc0dae86a74ee6096e194fae6dd18f
|
|
| MD5 |
b09d915b6eddbe336dafa4a19637231e
|
|
| BLAKE2b-256 |
585fa22bcf2a48b2382b55d3c53d818b4a9baafda38437de4df92b7cc5f9bb5b
|