Last active
June 30, 2020 12:52
-
-
Save jashapiro/b14cd90156b8173ab67173f9cb81b25b to your computer and use it in GitHub Desktop.
An R function to get a table of ENA FTP urls for an SRA project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_ena_ftp <- function(SRA_project){ | |
ena_url <- stringr::str_interp("http://www.ebi.ac.uk/ena/data/warehouse/filereport?accession=${SRA_project}&result=read_run&fields=run_accession,fastq_ftp,fastq_md5,fastq_bytes") | |
ena_table <- readr::read_tsv(ena_url) %>% | |
tidyr::separate_rows(fastq_ftp, fastq_md5, fastq_bytes, sep = ";") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment