GithubHelp home page GithubHelp logo

pubmedtextminer's Introduction

pubMedTextMiner

A text miner for PubMed abstracts

Mines PubMed's API for a query (eg. a couple of gene names, proteins, etc...), runs the resulting abstracts through Neji (a biomedical named entity recognizer), tallies the named entities into an .xlsx file, and creates pretty word clouds for found genes, anatomy features, and disorders/diseases.

Setup:

  1. Clone this repository
  2. Run sudo packagehelper.py
  3. Download and unzip the latest version of neji
  4. Update nerPath , threads, and email at the top of pmcTextMiner.py (to streamline command line interface)
  5. Refer to Usage!

Usage:

python pmcTextMiner.py --query <string> --ofilepath <path> [--mineBodies] [--retmax <int>] [--email <string>] [--nerPath <path>] [--threads <int>]

  • --query: the query string to search in PubMed.
  • --ofilepath: the directory to output results to. Mac users: don't use ~/
  • --email: optional (if not given, uses value specified in this file). email required for PubMed API access (idk why). Probably a good idea to update this for your machine.
  • --nerPath: optional (if not given, uses value specified in this file). the path to Neji. Probably a good idea to update this for your machine.
  • --threads: optional (if not given, uses value specified in this file). the number of threads available for your task. more threads will speed up Neji named entity recognition.
  • --mineBodies: optional. if specified, program will mine full pubmed central article bodies instead of just pubmed abstracts
  • --retmax: optional, default is 20 (PubMed API's default). Maximum number of articles to mine. Must be smaller than 10,000.

Dependencies

Non-standard Python packages:

If don't have any of these packages installed, just run sudo python packagehelper.py, and all of the needed packages will be installed using pip!

  • beautifulsoup: xml parsing
  • unirest: api handling
  • lxml: xml parsing (required by BeautifulSoup)
  • wordcloud: for word cloud output
  • xlsxwriter: for xlsx output

Other Programs

-Neji: biomedical named entity recognition. For documentation and download, see [https://github.com/BMDSoftware/neji]

pubmedtextminer's People

Contributors

russell-stewart avatar

Stargazers

 avatar

Watchers

 avatar  avatar

pubmedtextminer's Issues

Future Update: Specify the number of abstracts to read from PubMed

Currently, the PubMed API returns 20 results. For poorly-studies queries, this may be too many and return junk results. For well-studied queries, this may be too few to get the full picture. Add a way to tune the number of abstracts mined.

P.S: does PubMed have some kind of score attached to search queries? If so, that could be the cutoff.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.