Learn R Programming

pubchem.bio (version 1.0.5)

get.pubchem.ftp: get.pubchem.ftp

Description

first step to building a local selective, biologically focused, pubchem data repository focused on metabolomics informatics

Usage

get.pubchem.ftp(
  pc.directory = NULL,
  timeout = 50000,
  rm.tmp.files = TRUE,
  threads = 2
)

Value

nothing. all data are saved to disk for later loading

Arguments

pc.directory

character. directory to which data will be saved

timeout

numeric. timeout setting for FTP download. setting options(timeout) value too small will generate errors for large files. default = 50000.

rm.tmp.files

logical. should temporary files be removed after completion of download and parsing? Default = TRUE.

threads

integer. the number of parallel threads to be used by foreach %dopar% during processing of taxonomy hierarchy data.

Author

Corey Broeckling

Details

this function downloads and unzips files from pubchem and NCBI taxonomy FTP sites as a first step in building a local metabolomics repository.

Examples

Run this code
if (FALSE) {
my.dir <- "C:/Temp/20250725"
# or some other valid directory.
# this will be created assuming 'C:/Temp' exists.
get.pubchem.ftp(
    pc.directory = my.dir,
    timeout = 50000,
    rm.tmp.files = TRUE
)
}

Run the code above in your browser using DataLab