Skip to content

Instantly share code, notes, and snippets.

@lwaldron
Created February 2, 2022 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lwaldron/6ef2641854c2b0a12803dab94f040158 to your computer and use it in GitHub Desktop.
Save lwaldron/6ef2641854c2b0a12803dab94f040158 to your computer and use it in GitHub Desktop.
Download DIABIMMUNE antibiotics cohort .fna.gz files
# See https://diabimmune.broadinstitute.org/diabimmune/antibiotics-cohort/resources/16s-sequence-data
# The provided command `wget -r -np -nd https://pubs.broadinstitute.org/diabimmune/data/15` does not work because files are listed in an html page
library(dplyr)
library(rvest)
url <- "https://diabimmune.broadinstitute.org/diabimmune/data/15/"
url %>%
read_html() %>%
html_elements("a") %>%
html_attr("href") %>%
download.file(., destfile = basename(.))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment