makeSAS: Creates a SAS datafile from metabolomics data

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/makeSAS.R

Description

makeSAS() will import metabolomics data and convert it to a SAS file. You can subset the metabolomics files based on IDs or COMP_IDs. See details how to finish the import in SAS

Usage

1
makeSAS(dat,IDlist=NULL,compid=NULL,filepath)

Arguments

dat

Character vector of the dataset you are requesting (see details below). Options are NOT case sensitive.

IDlist

Optional: Character vector of a subset of IDs. If you have already prepared your covariate dataset, you can include a vector of IDs for subsetting the metabolite data. If you leave it NULL, all data will be returned.

compid

Optional: Character vector of a subset of COMP_IDs. If you know what metabolites you are looking for, you can enter a vector of these COMP_IDs and only pull these data.

filepath

File path to save the files. Remember that R requires forward slashes "/" in file paths. Example: "S:/user/bcarter/" NOT "S:\user\bcarter"

Details

Users can pull data from any of 7 metabolomics projects using the following character strings. For more information, you can find documentation by searching the BERGMets documentation:

makeSAS() will create 4 files at the output location. Two .txt files will be fore the actual metabolites files and a metadata file listing all the relevant data describing each metabolite including biochemical name, pathway information, platform, and some QC metrics.

The other two files are .SAS programs. In order to get the metabolite data into SAS, simply run these SAS programs. This will create a dataset in the WORK library that you can work with in whatever way you want.

Value

Four files will be created in your output folder. Naming conventions based on the specific metabolomics project you are working on (see examples)

1. breast_metabolomics_date.txt 2. breast_metabolomics_metadata_date.txt 3. import Breast_metabolomics_date.SAS 4. import breast_metabolomics_metadata_date.SAS

Author(s)

Brian Carter

See Also

getMetabolites

Examples

1
2
makeSAS(dat="breast_metabolomics",
        filepath="s:/users/bcarter/")

buddha2490/BERGMets documentation built on Sept. 6, 2020, 5:11 p.m.