Skip to contents

These functions will return all files in the OneKP object of the given type (protein or DNA FASTA files for download_peptides and download_nucleotides, respectively). If you do not want to retrieve all these files (there are over a thousand), then you should filter the OneKP object first, using the filter_by_* functions.

Usage

download_peptides(x, dir = file.path(tempdir(), "peptides"), absolute = FALSE)

download_nucleotides(
  x,
  dir = file.path(tempdir(), "nucleotides"),
  absolute = FALSE
)

Arguments

x

OneKP object

dir

Directory in which to store the downloaded data

absolute

If TRUE, return absolute paths (default=FALSE)

Value

character vector of paths to the files that were downloaded

Examples

if (FALSE) {
data(onekp)

# Filter by 1KP code (from `onekp@table$code` column)
seqs <- filter_by_code(onekp, c('URDJ', 'ROAP'))

# Download FASTA files to temporary directory 
download_peptides(seqs)
download_nucleotides(seqs)
}