Skip to content

bajicv/pubMLST_scheme_scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

PubMLST API scraper

Description

This R script allows

  • listing all of the available organisms on PubMLST API
  • listing all of the available schemes for a given organisms (including dates of last changes to schemes and numbers of profiles included in each of the schemes)
  • downloading specified scheme
  • downloading specified scheme profiles

Requirements

In case you would like to use this script you can easily install all the required packages by running the code below in your R session:

# Listing required packages
required_packages <- c("tidyverse", "rvest", "knitr", "optparse")

# Check if required packages are installed
missing_packages <- setdiff(required_packages, installed.packages()[,"Package"])

# Install missing packages
if (length(missing_packages) > 0) {
  message("Installing missing packages: ", paste(missing_packages, collapse = ", "))
  install.packages(missing_packages)
}

Usage

The script can be used directly from command line.

To see help

Rscript --vanilla pubMLST_scheme_scraper.R --help

To list available organisms on PubMLST

Rscript --vanilla pubMLST_scheme_scraper.R -f list_organisms

To list available schemes for a given organism

Rscript --vanilla pubMLST_scheme_scraper.R -f list_organism_schemes -o abaumannii

To download scheme profiles for a given organism and scheme ID

Rscript --vanilla pubMLST_scheme_scraper.R -f download_scheme_profiles -o abaumannii -s 1

To download scheme

Rscript --vanilla pubMLST_scheme_scraper.R -f download_scheme -o abaumannii -s 1

About

rest.pubmlst.org webpage scraper. Download and list available schemes and profiles from PubMLST API, and find their last modification date using command line.

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages